Browser API Reference Guide

frevvo v11.1 is no longer supported. Please visit the Documentation Directory for our current Cloud Release and other versions.

Browser API Reference Guide

This section describes the basic protocol used to interact with frevvo Data APIs including examples of what Atom requests may look like, what kind of responses to expect, and so on. It is intended for anyone wanting an understanding the general idea of the format and protocol used by the frevvo Data API and it assumes that you understand the basics of XML, namespaces, Atom feeds, and the main HTTP requests GET, POST, PUT and DELETE, as well as the RESTful concept of a resource. Using the API at this level your client application can interact with the frevvo Server using any programming language that lets you issue HTTP requests and consume XML-based responses.

In v9.1 and later frevvo's "Applications" are known as "Projects," and "Themes" are known as "Styles." The API objects and methods still use the words application, 'app', and theme.

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 frevvo UI, for instance users, projects, forms, 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.

On this page:


Basically, for each resource type in frevvo (User, Project, FormType, Schema) an Atom Feed representation is provided. The following table shows the different URI to access the different resource feeds:

frevvo Data API URLs

Resource Description 

 Resource URI

Resource Description 

 Resource URI

UserFeed

/frevvo/web/tn/{tenantId}/api/users

UserEntry

/frevvo/web/tn/{tenantId}/api/user/{id}

ProjectFeed

/frevvo/web/tn/{tenantId}/api/apps?ownerId={userId}

ProjectEntry

/frevvo/web/tn/{tenantId}/api/app/{id}

FormTypeFeed

/frevvo/web/tn/{tenantId}/api/formtypes?ownerId={appId}

FormTypeEntry

/frevvo/web/tn/{tenantId}/api/formtype/{id}

SchemaFeed

/frevvo/web/tn/{tenantId}/api/schemas?ownerId={appId}

SchemaEntry

/frevvo/web/tn/{tenantId}/api/schema/{id}

ControlTypeFeed

/frevvo/web/tn/{tenantId}/api/controltypes?ownerId={formTypeId}

ControlTypeEntry

/frevvo/web/tn/{tenantId}/api/controltype/{id}

SubmissionFeed

/frevvo/web/tn/{tenantId}/api/submissions?ownerId={formTypeId}

SubmissionEntry

/frevvo/web/tn/{tenantId}/api/submission/{id}

The URLs above reference special variables for the ownerId query parameter, which are composed in the following way:

  • {userId}=userId

  • {appId} = applicationId!userId

  • {formTypeId} = formTypeId!applicationId!userId

 Note that the ownerId query parameter is optional when querying any feed but required when inserting a new entry into the feed (more details on this below)

UserFeed

The user feed represents each user that is visible to the currently logged-in user. For all non-administrator users, this feed will always show one user: the current user; for the administrator users it will show all the users in frevvo allowing them to manage user settings.

Getting the UserFeed

In order to get a list of all visible users, send the following request to the frevvo Server:

GET /frevvo/web/tn/{tenantId}/api/users

The server will respond with:

200 OK <feed xmlns="http://www.w3.org/2005/Atom" xml:base="http://localhost:8080"> <title>Users</title> <updated>2010-04-28T17:59:06.337-04:00</updated> <link rel="self" type="application/atom+xml" href="/frevvo/web/tn/d/api/users"/> <entry xmlns:fd="http://schemas.frevvo.com/fdata/2008"> <id>john</id> <title type="text">john</title> <updated>2010-04-28T17:59:06.337-04:00</updated> <link type="application/atom+xml" href="/frevvo/web/tn/d/api/user/john"/> <link rel="self" type="application/atom+xml" href="/frevvo/web/tn/d/api/user/john"/> <link rel="edit" type="application/atom+xml" href="/frevvo/web/tn/d/api/user/john"/> <link rel="apps" type="application/atom+xml"  href="/frevvo/web/tn/d/api/apps?ownerId=john"/> <link rel="themes" type="application/atom+xml" href="/frevvo/web/tn/d/api/themes?ownerId=john"/> </entry> </feed>

Note that since the current logged-in user is johndoe the feed contains only his entry. If the currently logged-in user was the administrator then a full list of all users would be returned by the server. Also note that user feeds are read-only, and so new users cannot be created using the Data API.

Getting a UserEntry

It is also possible to directly get a specific User entry as long as you know the id for that user. In order to do that send the following request to the server:

GET /frevvo/web/tn/{tenantId}/api/user/{id}

And the server will respond with:

200 OK <feed xmlns="http://www.w3.org/2005/Atom" xml:base="http://localhost:8080"> <title>Users</title> <updated>2010-04-28T17:59:06.337-04:00</updated> <link rel="self" type="application/atom+xml" href="/frevvo/web/tn/d/api/users"/> <entry xmlns:fd="http://schemas.frevvo.com/fdata/2008"> <id>john</id> <title type="text">john</title> <updated>2010-04-28T17:59:06.337-04:00</updated> <link type="application/atom+xml" href="/frevvo/web/tn/d/api/user/john"/> <link rel="self" type="application/atom+xml" href="/frevvo/web/tn/d/api/user/john"/> <link rel="edit" type="application/atom+xml" href="/frevvo/web/tn/d/api/user/john"/> <link rel="apps" type="application/atom+xml" href="/frevvo/web/tn/d/api/apps?ownerId=john"/> <link rel="themes" type="application/atom+xml" href="/frevvo/web/tn/d/api/themes?ownerId=john"/> </entry> </feed>

Since User entries are read-only, they can only be used to traverse to related feeds such as the user's project and style ('theme') feeds (see the two link elements with a rel attribute with value apps and themes, respectively, in the entry above.)

Inserting a new UserEntry

Inserting (creating) new users using the Data API is not supported at this time.

Updating a UserEntry

Updating the user profile using the Data API is not supported at this point.

Deleting a UserEntry

Deleting a user using the Data API is not supported at this point.

ThemeFeed

The theme feed lists all styles visible to the currently logged-in user. This includes enabled styles that were uploaded by the current user and all enabled styles that are global, i.e. owned by the admin user.

Getting the ThemeFeed

In order to get a list of all styles, send the following request to the frevvo server:

GET /frevvo/web/tn/{tenantId}/api/themes

The server will respond with:

200 OK <feed xmlns="http://www.w3.org/2005/Atom" xml:base="http://localhost:8080"> <title>Themes</title> <updated>2010-04-28T18:01:00.838-04:00</updated> <link rel="self" type="application/atom+xml" href="/frevvo/web/tn/d/api/themes"/> <entry xmlns:fd="http://schemas.frevvo.com/fdata/2008"> <id>_Q6pJIagiEdyrUJr3HP_61Q!admin</id> <title type="text">Clear</title> <updated>2010-04-28T18:01:00.838-04:00</updated> <link type="application/atom+xml" href="/frevvo/web/tn/d/api/theme/_Q6pJIagiEdyrUJr3HP_61Q!admin"/> <link rel="self" type="application/atom+xml" href="/frevvo/web/tn/d/api/theme/_Q6pJIagiEdyrUJr3HP_61Q!admin"/> <link rel="edit" type="application/atom+xml" href="/frevvo/web/tn/d/api/theme/_Q6pJIagiEdyrUJr3HP_61Q!admin"/> <fd:owner id="admin"/> </entry> <entry xmlns:fd="http://schemas.frevvo.com/fdata/2008"> <id>_w218Ecm4EdyRdaUav2cgrg!admin</id> <title type="text">Professional Blue</title> <updated>2010-04-28T18:01:00.838-04:00</updated> <link type="application/atom+xml" href="/frevvo/web/tn/d/api/theme/_w218Ecm4EdyRdaUav2cgrg!admin"/> <link rel="self" type="application/atom+xml" href="/frevvo/web/tn/d/api/theme/_w218Ecm4EdyRdaUav2cgrg!admin"/> <link rel="edit" type="application/atom+xml" href="/frevvo/web/tn/d/api/theme/_w218Ecm4EdyRdaUav2cgrg!admin"/> <fd:owner id="admin"/> </entry> </feed>

The returned feed above shows two style entries named Clear and Blue Professional, which are the two global styles provided by default by the frevvo version when this example was created. frevvo currently offers additional Global Styles.

Getting a ThemeEntry

It is also possible to directly get a specific Style entry as long as you know the Style id. In order to do that send the following request to the server:

GET /frevvo/web/tn/{tenantId}/api/theme/{id}