Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Section
Column

This section describes the basic protocol used to interact with 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 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 Server using any programming language that lets you issue HTTP requests and consume XML-based responses.

There are various different types of 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 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. The following diagram shows these different resources currently being exposed by the Data API and the ownership relationships among them:

Frevvo Resources.pngImage Added

Column
width240px

On this page:

Table of Contents
maxLevel1

 

Basically, for each resource type

...

in  (User, Application, FormType, Theme, Schema)

...

an Atom Feed representation is provided. The following table shows the different URI to access the different resource feeds:

Column
width240px

On this page:

Table of Contents
maxLevel1

 

...

                                                              Data API URLs

Resource Description  Resource URI
Users Feed /frevvo/web/t/{tenantId}/api/users
User Entry/frevvo/web/t/{tenantId}/api/user/{id}
ApplicationFeed /frevvo/web/t/{tenantId}/api/apps?ownerId={userId}
ApplicationEntry/frevvo/web/t/{tenantId}/api/app/{id}
ThemeFeed/frevvo/web/t/{tenantId}/api/themes?ownerId={userId}
ThemeEntry /frevvo/web/t/{tenantId}/api/theme/{id}
FormTypeFeed/frevvo/web/t/{tenantId}/api/formtypes?ownerId={appId}
FormTypeEntry /frevvo/web/t/{tenantId}/api/formtype/{id}
SchemaFeed/frevvo/web/t/{tenantId}/api/schemas?ownerId={appId}
SchemaEntry/frevvo/web/t/{tenantId}/api/schema/{id}
ControlTypeFeed/frevvo/web/t/{tenantId}/api/controltypes?ownerId={formTypeId}
ControlTypeEntry/frevvo/web/t/{tenantId}/api/controltype/{id}
SubmissionFeed /frevvo/web/t/{tenantId}/api/submissions
SubmissionEntry /frevvo/web/t/{tenantId}/api/submission/{id}

...

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   allowing them to manage user settings.

...

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

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

...

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

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

...

The returned feed above shows two theme entries named Clear and Blue Professional that happen to be the two global themes provided by default by the frevvo installationthe  installation.

Getting a ThemeEntry

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

...

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

Code Block
GET /frevvo/web/tn/{tenantId}/api/apps

...

And the server will respond with:

Code Block
200 OK

FormTypeFeed

The formtype feed contains a list of all forms across all applications owned by the currently logged-in user.

...

In order to get a list of all forms owned by the current user, send the following request to the frevvo server server:

Code Block
GET /frevvo/web/tn/{tenantId}/api/formtypes

...

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

Code Block
GET /frevvo/web/tn/{tenantId}/api/schemas

...

In order to get a list of all ControlType's owned by a given FormType, send the following request to the frevvo server server:

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

...

In order to get a list of DocumentType's owned by a given FormType or Schema, send the following request to the frevvo server server:

Code Block
GET /frevvo/web/tn/{tenantId}/api/doctypes?ownerId={formTypeId}
or
GET /frevvo/web/tn/{tenantId}/api/doctypes?ownerId={SchemaId}

...

DocumentType's cannot be created from scratch using the API. They are either created automatically by frevvo when  when you design your forms or by uploading an XML Schema. They can, however, be added/removed to/from a FormType.

...