Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Column

The frevvo Data API provides a simple protocol for viewing and managing frevvo resources such as forms, applications, themes, schemas, etc. The API extends the Google Data API framework, is HTTP and XML-based, and uses the Atom Syndication Format  with a few extensions following Atom's standard extension model. Java and .Net are the language-specific wrappers around the API.

Atom also provides the Atom Publishing Protocol  (APP), an HTTP-based application protocol for publishing and editing resources on the web. The APP specification is an emerging standard being developed by the IETF that allows you to send an HTTP GET request to ask for a particular resource such as a form or schema; a representation of that resource is returned in the Atom Syndication format. You can also create, edit and delete resources using standard HTTP POST, PUT and DELETE methods, respectively. Atom provides a protocol in line with the REST approach to web service interfaces.

Column
width240px

On this page:

Table of Contents
maxLevel1

...

There are various different types of frevvo resources  resources that can be viewed and manipulated by the Data API. Most of these resources are things that a designer sees when creating new forms and navigating the application using the frevvo UI UI, for instance users, applications, form, themes, schemas, etc. So before delving into the API specifics it is a good idea to understand these different types of resources and how they relate to each other.

...

  • UserFeed  - There is not much that can be done with this collection at this point except for being an optional entry point for applications, tasks and themes.
  • FormTypeTemplateFeed - The collection used to list and manage published forms or flows.
  • SubmissionFeed - The collection used to query form or flow submissions and get associated XML documents, PDF snapshots, attachments, etc.
  • ThemeFeed - The collection used list and manage themes in .
  • ApplicationFeed - The collection used to list and manage applications in .
  • TaskFeed - The collection used to manage the tasks for the current logged-in user.
  • SchemaFeed - The collection used to manage the XSDs uploaded to an application.
  • DocumentType - The collection used to manage top-level XSD elements in frevvo , called DocumentTypes. An XSD has a feed containing all the DocumentTypes (top level elements) that can be added to forms and flows and a form or flow has a feed containing all the DocumentTypes added (in the designer's Data Sources pane).
  • FormTypeFeed - The collection used to manage forms AND flows. This is the core collection in the API that is used to use, design, manage, instantiate, etc forms and flows.
  • ControlTypeFeed - The collection used to list the controls, and their metadata, contained in a form or flow.

...

We have pre-created a simple application that shows the different usages of the API using an interactive command-line approach. Think of this application as the command-line version of the web-base frevvo UI UI, but stripped of all the irrelevant details, libraries, etc., so you can inspect the different API usages as simply as possible using live code with sources included.

Follow this tutorial for a demonstration of the different ways you can interact with frevvo using  using the Data API. It expands on the previous tutorial by focusing on the design-time aspects of the API such as creating new forms and flows, downloading applications, and designing and using forms.

...

Follow this tutorial to see how you can embed  forms and workflows in your web site or web application. In some cases, you may wish to integrate authentication between your application and frevvo so  so that your users don't have to sign in twice yet are automatically authenticated to frevvo . You may want your users to be authenticated for access control, digital signatures, participating in workflows, viewing their task lists, or for maintaining an audit trail.

...

Although our APIs are based on the Atom Publishing Protocol and the Atom Syndication Protocol and can be accessed on any language/platform that can interact with HTTP end points and can process XML documents, we provide a Java Client and a .Net Client that can be used to easily connect to frevvo from to  from Java and Windows or Mono, respectively.

You will need to install a client library in order to use the API. See Installing the Client Library and Dependencies below.

...

If you installed  locally, the installation includes the Javadocs .jar file. The com.frevvo.forms javafiles will are located  are located in the ''<installdrive>:\frevvo\ext\client'' directory. Many IDE's let you view Javadocs.

...

For a list of Frequently Asked question about common tasks using the API with frevvo server server, please see the Live Forms API Java Client FAQ.

...

For your convenience all these required jars can be found in the frevvo Tomcat  Tomcat bundle in the /frevvo/ext/client folder. Make sure you include all of them in your classpath when adding them to your application's classpath.

...

Authentication & Session Management

When interacting with frevvowith , an application first needs to establish a session using the Data API. This is done by using the com.frevvo.forms.client.FormsService class and by providing proper credentials to authenticate.

...

 supports an additional way of logging into frevvo using  using the Data API: the loginAs() method. This new method allows you to login to frevvo as  as any of the existing tenant users provided you can pass in the tenant's admin user and password. This is quite convenient when you want login to  using the same user that is logged into your application without having to know their password.

...

When your tenant was configured with the DelegatingSecurityManager, you can use the overloaded loginAs() method to automatically create virtual users in frevvo . For instance:

Code Block
    ...
    String tenantAdmin = getUsername() + '@' + getTenant();
    String tenantAdminPwd = getPassword();
    String username = getAsUsername();
    FormsService s = new FormsService(getProtocol(), getHost(), getPort(), null);
    s.loginAs(username, tenantAdmin, tenantAdminPwd, true, null, null, null, null,null);
    ...

This will automatically create a new, non-designer user (i.e. will be able to participate in flows but not create forms/flows), if it doesn't yet exist. If you want frevvo to want  to auto create a new virtual user that is also a designer you need to pass in the frevvo.Designer role when calling loginAs(). For instance:

...

For a list of Frequently Asked question about common tasks using the API with frevvo server server, please see the [[frevvo API .Net Client FAQ]] topic.

...

You can use the Resource URIs listed Browser API Reference Guide in the browser address bar when you're logged into . The URIs return data from the frevvo server  server as either web pages or XML files. To use the URIs, you edit the URL in the address bar when you're logged into a Live Forms tenant to include the URI of the resource feed you want to use. For example:

...

This example shows how to use the formtypes feed to have the frevvo server  server return a list of all the forms belonging to the user who's currently logged in.

  1. After logging in, edit the frevvo URL  URL in the browser address bar to insert api/formtypes immediately after the tenant name - which in this example is monahan.com.
  2. So in this example, we change the URL ''from:'' http: //localhost:8082/frevvo/web/tn/monahan.com user/david/app
  3. to:  http: //localhost:8082/frevvo/web/tn/monahan.com/api/formtypes, and press Enter.

...