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

 

 

The Data API Feeds

There are various different types of frevvo 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, 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.

...

It is important to understand this diagram since the source code for the client application maps almost one-to-one to this structure.

Tutorials

...

Tutorial: Getting Started with the Java Client Library

...

[[DataAPI_Getting_Started_Tutorial | Follow this tutorial]] to  to build a simple application to manage a contacts list. The tutorial shows you how to use the frevvo submissions  submissions API to query the submissions repository, to filter submissions, sort, paginate, etc.====

Tutorial: Design-time Integration with the Data API

...

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, 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.

[[DataAPI_DesigntimeIntegration | Follow this tutorial]] for  for a demonstration of the different ways you can interact with frevvo 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.====

Tutorial: Embedding Forms and Workflows

...

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 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.===

Client Libraries

...

Although our APIs are based on the [http://www.ietf.org/rfc/rfc5023.txt Atom Publishing Protocol] and the [http://www.ietf.org/rfc/rfc4287.txt  and the Atom Syndication Protocol] and  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 ''' Java Client and a .Net Client''' that  that can be used to easily connect to frevvo from Java and Windows or Mono, respectively.

You will need to install a client library in order to use the API. See [[New_V4_frevvo_API#Installing_the_Client_Library_and_Dependencies | Installing the Client Library and Dependencies]] below below.

====  

Java Client API

...

Info

The Design-time Integration tutorial is a very good place to get a quick overview of how to use the Java API.

...

The Javadocs generated for frevvo are available here:
* [http://static.frevvo.com/resources/docs/com.frevvo.forms.java-4.1.4-javadoc/index.html 4.1.4 javadoc]
* [http://static.frevvo.com/resources/docs/com.frevvo.forms.java-4.1.5-javadoc/index.html 4.1.5 javadoc]
* [http://static.frevvo.com/resources/docs/com.frevvo.forms.java-4.1.7-javadoc/index.html 4.1.7 javadoc]

If you installed Live Forms locally, the installation includes the Javadocs .jar file. For example, in frevvo v4.1.4, the '''com.frevvo.forms.java-4.1.4-javadoc.jar''' file is located  

Javadocs

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

Java Client API FAQ

...

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

Installing the Client Library and Dependencies

...

The frevvo Java  Java Client Library has the following dependencies:*

  • com.frevvo.forms.java-4.1.4.jar

...

  • com.google.gdata.media-1.40.3.jar

...

  • com.google.gdata.core-1.40.3.jar

...

  • com.google.gdata.client.meta-1.40.3.jar

...

  • com.google.gdata.client-1.40.3.jar

...

  • commons-codec-1.2.jar

...

  • commons-httpclient-3.1.jar

...

  • commons-logging-1.0.4.jar

...

  • google-collections-1.0.jar

...

  • mail-1.4.1.jar

...

  • activation-1.1.jar

...

  • json-1.0.0.jar

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

[[Image:DataAPI_Tutorial_Dependencies.png]]

Image AddedNote that the actual jar versions may be different depending on the version of frevvo being  being used.=====

Authentication & Session Management

...

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

The example below is taken from the tutorial [[DataAPI_Getting_Started_Tutorial | Getting Started with the Java Jave Data Client Library]].

The '''commandLoop()''' method  method in the '''Contacts''' class below shows how this is done in the Contacts application. Note that the FormsService instance is state-full and the same instance needs to be used throughout the session (this is specially the case when rendering form urls in the browser since an API key is automatically appended and bound to the FormsService session - as soon as you logout() the API key becomes invalid). In the case of this command-line application the session spans the life-time of the executable, but in the case of a web application the FormsService instance is usually stored in the HTTP session that the user has with the application.

...


Since there is some overhead associated with logging in and out, you need to keep the '''FormsService''' instance around for as long as you need to interact with frevvo before logging out. Logging out ensures that frevvo will release any unneeded resources and the user count will be decremented, as the number of users is affected by your frevvo license.=====

LoginAs

...

Since version 4.1.1, frevvo supports an additional way of logging into frevvo using the Data API: the loginAs() method. This new method allows you to login to frevvo 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 frevvo using the same user that is logged into your application without having to know their password.

...