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
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={appId}&filter=$formTypeId eq '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}

And the server will respond with:

200 OK
    <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>

It is not possible to download the style using the Data API; support for that will be added in a subsequent release.

Inserting a new ThemeEntry

Inserting a new Style using the Data API is not supported at this point.

Updating a ThemeEntry

Updating a Style is not supported at this point.

Deleting a ThemeEntry

Deleting a Style can be done by sending an HTTP DELETE request to the style entry url.

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

And the server will respond with:

200 OK
<entry xmlns="http://www.w3.org/2005/Atom"
        xmlns:fd="http://schemas.frevvo.com/fdata/2008"
        xml:base="http://localhost:8080">
    <id>_Q6pJIagiEdyrUJr3HP_61Q!admin</id>
    <title type="text">Clear</title>
    <updated>2010-04-28T18:02:16.364-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>

ProjectFeed

The Project feed lists all Projects owned by the currently logged-in user.

Getting the ProjectFeed

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

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

The server will respond with:

200 OK
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="http://localhost:8082">
    <title>Applications</title>
    <updated>2009-05-12T11:55:56.984-04:00</updated>
    <link rel="self" type="application/atom+xml" href="/frevvo/web/api/apps"/>
    <link rel="post" type="application/atom+xml" href="/frevvo/web/api/apps?ownerId=johndoe"/>
    <link rel="post-media" type="application/zip" href="/frevvo/web/api/apps?ownerId=johndoe"/>
    <entry xmlns:fd="http://schemas.frevvo.com/fdata/2008">
        <id>_nv8uAT8KEd6yc_ZDP21S1Q!johndoe</id>
        <title type="text">Expense Reports</title>
        <summary type="text"/>
        <updated>2009-05-12T11:55:56.984-04:00</updated>
        <link type="application/atom+xml" href="/frevvo/web/api/app/_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
        <link rel="self" type="application/atom+xml" href="/frevvo/web/api/app/_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
        <link rel="edit" type="application/atom+xml" href="/frevvo/web/api/app/_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
        <link rel="formtypes" type="application/atom+xml" href="/frevvo/web/api/formtypes?ownerId=_nv8uAT8KEd6yc_ZDP21S1Q!johndoe" title="Expense Reports's Form Types"/>
        <link rel="schemas" type="application/atom+xml"href="/frevvo/web/api/schemas?ownerId=_nv8uAT8KEd6yc_ZDP21S1Q!johndoe" title="Expense Reports's Schemas"/>
        <link rel="forms" type="application/atom+xml" href="/frevvo/web/api/forms?ownerId=_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
        <fd:owner id="johndoe"/>
        <content type="application/zip" src="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/file/content.zip"/>
    </entry>
</feed>

The returned feed above shows one project entry named "Expense Reports" owned by the current user 'johndoe'.

Getting a ProjectEntry

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

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

And the server will respond with:

200 OK
<entry xmlns="http://www.w3.org/2005/Atom"
        xmlns:fd="http://schemas.frevvo.com/fdata/2008"
        xml:base="http://localhost:8081">
    <id>_nv8uAT8KEd6yc_ZDP21S1Q!johndoe</id>
    <title type="text">Expense Reports</title>
    <summary type="text"/>
    <updated>2009-05-12T12:13:44.471-04:00</updated>
    <link type="application/atom+xml" href="/frevvo/web/api/app/_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
    <link rel="self" type="application/atom+xml" href="/frevvo/web/api/app/_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
    <link rel="edit" type="application/atom+xml" href="/frevvo/web/api/app/_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
    <link rel="formtypes" type="application/atom+xml" href="/frevvo/web/api/formtypes?ownerId=_nv8uAT8KEd6yc_ZDP21S1Q!johndoe" title="Expense Reports's Form Types"/>
    <link rel="schemas" type="application/atom+xml" href="/frevvo/web/api/schemas?ownerId=_nv8uAT8KEd6yc_ZDP21S1Q!johndoe" title="Expense Reports's Schemas"/>
    <link rel="forms" type="application/atom+xml" href="/frevvo/web/api/forms?ownerId=_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
    <fd:owner id="johndoe"/>
    <content type="application/zip" src="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/file/content.zip"/>
</entry>

Inserting a New ProjectEntry

POST /frevvo/web/t/{tenantId}/api/apps
 
<entry xmlns="http://www.w3.org/2005/Atom">
    <id>_nv8uAT8KEd6yc_ZDP21S1Q!johndoe</id>
    <title type="text">Expense Reports</title>
    <summary type="text"/>
</entry>

And the server will respond with:

200 OK
 
<entry xmlns="http://www.w3.org/2005/Atom"
        xmlns:fd="http://schemas.frevvo.com/fdata/2008"
        xml:base="http://localhost:8082">
    <id>_nv8uAT8KEd6yc_ZDP21S1Q!johndoe</id>
    <title type="text">Expense Reports</title>
    <summary type="text"/>
    <updated>2009-05-12T12:13:44.471-04:00</updated>
    <link type="application/atom+xml" href="/frevvo/web/api/app/_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
    <link rel="self" type="application/atom+xml" href="/frevvo/web/api/app/_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
    <link rel="edit" type="application/atom+xml" href="/frevvo/web/api/app/_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
    <link rel="formtypes" type="application/atom+xml" href="/frevvo/web/api/formtypes?ownerId=_nv8uAT8KEd6yc_ZDP21S1Q!johndoe" title="Expense Reports's Form Types"/>
    <link rel="schemas" type="application/atom+xml" href="/frevvo/web/api/schemas?ownerId=_nv8uAT8KEd6yc_ZDP21S1Q!johndoe" title="Expense Reports's Schemas"/>
    <link rel="forms" type="application/atom+xml" href="/frevvo/web/api/forms?ownerId=_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
    <fd:owner id="johndoe"/>
    <content type="application/zip" src="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/file/content.zip"/>
</entry>

Updating a ProjectEntry

Updating project properties using the Data API is not supported at this point in time.

Deleting a ProjectEntry

Deleting an project can be done by sending an HTTP DELETE request to the project entry url.

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

And the server will respond with:

200 OK

FormTypeFeed

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

Getting the FormTypeFeed

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

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

The server will respond with:

200 OK

<pre>
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="http://localhost:8082"
        xml:lang="en">
    <title>Form Types</title>
    <updated>2009-05-12T12:20:19.986-04:00</updated>
    <link rel="self" type="application/atom+xml" href="/frevvo/web/api/formtypes"/>
    <entry xmlns:fd="http://schemas.frevvo.com/fdata/2008" xml:lang="en">
        <id>_0vNZwD8KEd6yc_ZDP21S1Q!_nv8uAT8KEd6yc_ZDP21S1Q!johndoe</id>
        <title type="text">Expense Report</title>
        <summary type="text">Edit the form to change this description.</summary>
        <updated>2009-05-12T12:20:19.986-04:00</updated>
        <link type="application/atom+xml" 
              href="/frevvo/web/api/formtype/_0vNZwD8KEd6yc_ZDP21S1Q!_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
        <link rel="self" type="application/atom+xml" 
              href="/frevvo/web/api/formtype/_0vNZwD8KEd6yc_ZDP21S1Q!_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
        <link rel="edit" type="application/atom+xml" 
              href="/frevvo/web/api/formtype/_0vNZwD8KEd6yc_ZDP21S1Q!_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
        <link rel="formtype" type="text/html"
              href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q?
              embed=true&amp;_method=post&amp;apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
              title="Link to the FormType Expense Report HTML"/>
        <link rel="formtype" type="text/javascript"
              href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/embed?  
              apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
              title="Link to Javascript code that can be used to embed this FormType in an HTML page"/>
        <link rel="controltypes" type="application/atom+xml"
              href="/frevvo/web/api/controltypes?ownerId=_0vNZwD8KEd6yc_ZDP21S1Q!_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"
              title="Expense Report's Control Types"/>
        <link rel="formtype-editor" type="text/html"
              href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q?
              edit=true&amp;embed=true&amp;_method=post&amp;apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
              title="Link to the FormType Designer Expense Report HTML"/>
        <link rel="formtype-editor" type="text/javascript"
              href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/embed?
              edit=true&amp;apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
              title="Link to Javascript code that can be used to embed this FormType in an HTML page"/>
        <link rel="submissions" type="text/html"
              href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/submission?
              embed=true&amp;apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
              title="Use FormType Expense Report"/>
        <link rel="submissions" type="text/javascript"
              href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/embedsubs?
              apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
              title="Link to Javascript code that can be used to embed this FormType's submissions in an HTML page"/>
        <link rel="schema" type="application/xml"
              href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/schema"/>
        <fd:owner id="_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
        <fd:visibility value="public"/>
        <content type="application/zip"
              src="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/file/content.zip"/>
    </entry>
</feed>

The feed returned above shows one form entry Expense Report that is owned by the current user.

Getting a FormTypeEntry

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

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

And the server will respond with:

200 OK

<entry xmlns="http://www.w3.org/2005/Atom"
        xmlns:fd="http://schemas.frevvo.com/fdata/2008"
        xml:lang="en"
        xml:base="http://localhost:8082">
    <id>_0vNZwD8KEd6yc_ZDP21S1Q!_nv8uAT8KEd6yc_ZDP21S1Q!johndoe</id>
    <title type="text">Expense Report</title>
    <summary type="text">Edit the form to change this description.</summary>
    <updated>2009-05-12T12:33:49.188-04:00</updated>
    <link type="application/atom+xml"
        href="/frevvo/web/api/formtype/_0vNZwD8KEd6yc_ZDP21S1Q!_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
    <link rel="self" type="application/atom+xml"
        href="/frevvo/web/api/formtype/_0vNZwD8KEd6yc_ZDP21S1Q!_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
    <link rel="edit" type="application/atom+xml"
        href="/frevvo/web/api/formtype/_0vNZwD8KEd6yc_ZDP21S1Q!_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
    <link rel="formtype" type="text/html"
        href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q?
        embed=true&amp;_method=post&amp;apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
        title="Link to the FormType Expense Report HTML"/>
    <link rel="formtype" type="text/javascript"
        href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/embed?
        apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
        title="Link to Javascript code that can be used to embed this FormType in an HTML page"/>
    <link rel="controltypes" type="application/atom+xml"
        href="/frevvo/web/api/controltypes?ownerId=_0vNZwD8KEd6yc_ZDP21S1Q!_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"
        title="Expense Report's Control Types"/>
    <link rel="formtype-editor" type="text/html"
        href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q?
        edit=true&amp;embed=true&amp;_method=post&amp;apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
        title="Link to the FormType Designer Expense Report HTML"/>
    <link rel="formtype-editor" type="text/javascript"
        href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/embed?
        edit=true&amp;apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
        title="Link to Javascript code that can be used to embed this FormType in an HTML page"/>
    <link rel="submissions" type="text/html"
        href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/submission?
        embed=true&amp;apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
        title="Use FormType Expense Report"/>
    <link rel="submissions" type="text/javascript"
        href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/embedsubs?
        apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
        title="Link to Javascript code that can be used to embed this FormType's submissions in an HTML page"/>
    <link rel="schema" type="application/xml"
        href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/schema"/>
    <fd:owner id="_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
    <fd:visibility value="public"/>
    <content type="application/zip"
        src="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/file/content.zip"/>
</entry>

Once you have a FormTypeEntry Url you can get the:

* Form UI url (formtype link)
* Form Designer UI (formtype-editor link)
* Submissions UI (submissions link)
* The list of controls/fields contained in this form (controltypes link)
* XML Schema for this form (schema link)

Note that for some of the links above there are two links for the same rel attribute (e.g. the '''formtype''' link): 

* the '''text/html''' link that can be used directly in a browser or in an <iframe/>, and
* the '''text/javascript''' link that can be embedded in an html page using an <script/> tag.

Inserting a new FormTypeEntry

POST /frevvo/web/tn/{tenantId}/api/formtypes

<entry xmlns="http://www.w3.org/2005/Atom">
    <title type="text">Expense Report</title>
    <summary type="text">Edit the form to change this description.</summary>
</entry>

And the server will respond with:

200 OK

<entry xmlns="http://www.w3.org/2005/Atom"
        xmlns:fd="http://schemas.frevvo.com/fdata/2008"
        xml:lang="en"
        xml:base="http://localhost:8082">
    <id>_0vNZwD8KEd6yc_ZDP21S1Q!_nv8uAT8KEd6yc_ZDP21S1Q!johndoe</id>
    <title type="text">Expense Report</title>
    <summary type="text">Edit the form to change this description.</summary>
    <updated>2009-05-12T12:48:11.509-04:00</updated>
    <link type="application/atom+xml"
        href="/frevvo/web/api/formtype/_0vNZwD8KEd6yc_ZDP21S1Q!_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
    <link rel="self" type="application/atom+xml"
        href="/frevvo/web/api/formtype/_0vNZwD8KEd6yc_ZDP21S1Q!_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
    <link rel="edit" type="application/atom+xml"
        href="/frevvo/web/api/formtype/_0vNZwD8KEd6yc_ZDP21S1Q!_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
    <link rel="formtype" type="text/html"
        href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q?
        embed=true&amp;_method=post&amp;apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
        title="Link to the FormType Expense Report HTML"/>
    <link rel="formtype" type="text/javascript"
        href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/embed?
        apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
        title="Link to Javascript code that can be used to embed this FormType in an HTML page"/>
    <link rel="controltypes" type="application/atom+xml"
        href="/frevvo/web/api/controltypes?ownerId=_0vNZwD8KEd6yc_ZDP21S1Q!_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"
        title="Expense Report's Control Types"/>
    <link rel="formtype-editor" type="text/html"
        href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q?
        edit=true&amp;embed=true&amp;_method=post&amp;apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
        title="Link to the FormType Designer Expense Report HTML"/>
    <link rel="formtype-editor" type="text/javascript"
        href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/embed?
        edit=true&amp;apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
        title="Link to Javascript code that can be used to embed this FormType in an HTML page"/>
    <link rel="submissions" type="text/html"
        href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/submission?
        embed=true&amp;apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
        title="Use FormType Expense Report"/>
    <link rel="submissions" type="text/javascript"
        href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/embedsubs?
        apikey=1VeRclWJogwX2lUlGuLo9kglWN%252BUdNE9c9UGI6z7sJuRnYBOrCjoAdZ8kBVHKkZC9j5Ss%252BQYVwv%252BsIxsxTIAqg%253D%253D"
        title="Link to Javascript code that can be used to embed this FormType's submissions in an HTML page"/>
    <link rel="schema" type="application/xml"
        href="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/schema"/>
    <fd:owner id="_nv8uAT8KEd6yc_ZDP21S1Q!johndoe"/>
    <fd:visibility value="public"/>
    <content type="application/zip"
        src="/frevvo/web/user/johndoe/app/_nv8uAT8KEd6yc_ZDP21S1Q/formtype/_0vNZwD8KEd6yc_ZDP21S1Q/file/content.zip"/>
</entry>

Updating a FormTypeEntry

Updating a form using the Data API is not supported at this point.

Deleting a FormTypeEntry

Deleting a form using the Data API can be done by sending an HTTP DELETE request to the form type entry url.

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

And the server will respond with:

200 OK

SchemaFeed

The schema feed represents each XML Schema visible to the current logged-in user.

The schema feed lists all uploaded schemas that are visible to the currently logged-in user. This includes schemas that were uploaded by the current user and all global schemas owned by the administrator user.

Getting the SchemaFeed

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

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

The server will respond with:

200 OK
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="http://localhost:8082">
    <title>Schemas</title>
    <updated>2008-06-25T16:27:26.833-04:00</updated>
    <link rel="self" type="application/atom+xml" href="/frevvo/web/api/schemas"/>
    <link rel="edit" type="application/atom+xml" href="/frevvo/web/api/schemas"/>
    <entry xmlns:fd="http://schemas.frevvo.com/fdata/2008">
        <id>_HAKo4UL1Ed2aiOHUWaF_bw!_Fyz6YUL0Ed2aiOHUWaF_bw!johndoe</id>
        <title type="text">Purchase Order</title>
        <summary type="text">The Purchase Order Schema</summary>
        <updated>2008-06-25T16:27:26.833-04:00</updated>
    <link rel="self" type="application/atom+xml"
        href="/frevvo/web/api/schema/_HAKo4UL1Ed2aiOHUWaF_bw!_Fyz6YUL0Ed2aiOHUWaF_bw!johndoe"/>
    <link rel="edit" type="application/atom+xml"
        href="/frevvo/web/api/schema/_HAKo4UL1Ed2aiOHUWaF_bw!_Fyz6YUL0Ed2aiOHUWaF_bw!johndoe"/>
    <fd:owner id="_Fyz6YUL0Ed2aiOHUWaF_bw!johndoe"/>
  </entry>
</feed>

The returned feed above shows one schema entry named Purchase Order that is owned by the current user.

For this release schema feeds are read-only and so it is not possible to upload new schemas using the Data API. Support for that will be added in a subsequent release.

Getting a SchemaEntry

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

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

And the server will respond with:

<entry xmlns:fd="http://schemas.frevvo.com/fdata/2008">
    <id>_HAKo4UL1Ed2aiOHUWaF_bw!_Fyz6YUL0Ed2aiOHUWaF_bw!johndoe</id>
    <title type="text">Purchase Order</title>
    <summary type="text">The Purchase Order Schema</summary>
    <updated>2008-06-25T16:27:26.833-04:00</updated>
    <link rel="self" type="application/atom+xml"
        href="/frevvo/web/api/schema/_HAKo4UL1Ed2aiOHUWaF_bw!_Fyz6YUL0Ed2aiOHUWaF_bw!johndoe"/>
    <link rel="edit" type="application/atom+xml"
        href="/frevvo/web/api/schema/_HAKo4UL1Ed2aiOHUWaF_bw!_Fyz6YUL0Ed2aiOHUWaF_bw!johndoe"/>
    <fd:owner id="_Fyz6YUL0Ed2aiOHUWaF_bw!johndoe"/>
</entry>

It is not possible to download the schema using the Data API; support for that will be added in a subsequent release.

Inserting a new SchemaEntry

Inserting XML Schemas using the Data API is not supported at this point.

Updating a SchemaEntry

Updating an existing schema using the Data API is not supported at this point.

Deleting a SchemaEntry

Deleting a schema using the Data API can be done by sending an HTTP DELETE request to the schema entry url.

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

And the server will respond with:

200 OK

ControlTypeFeed

The controltype feed contains a flat list of all controltypes contained in a given FormType.

Getting the ControlTypeFeed

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

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

The server will respond with:

200 OK
TODO

Getting a ControlTypeEntry

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

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

And the server will respond with:

200 OK
TODO 

Once you have a ControlTypeEntry Url you can get the:

* Type of control (in a category with a http://schemas.frevvo.com/fdata/2008#controltype scheme)
* Display type of the control (in a category with http://schemas.frevvo.com/fdata/2008#displaytype scheme)
* Link to the parent control (in a parent link)

Inserting a new ControlTypeEntry

Not supported at this point. The ControlTypeFeed is read-only and changes can only be made through the designer.

Updating a ControlTypeEntry

Not supported at this point. The ControlTypeFeed is read-only and changes can only be made through the designer.

Deleting a ControlTypeEntry

Not supported at this point. The ControlTypeFeed is read-only and changes can only be made through the designer.

DocumentTypeFeed

A DocumentType represents a schema for a single Document (contrast this with a Schema that is namespace aggregating a set of top-level elements or DocumentType's). You will find DocumentType's in uploaded XML Schemas, one DocumentType for each root element in the schema, and in FormType's, one default DocumentType and zero or more DocumentType's from an XML Schema.

The reason you may want to add a DocumentType from a Schema to a FormType is so that you can auto-generate controls bound to elements in that DocumentType. Schema DocumentType's added to a FormType will show up in the Data Source pane in the designer.

Getting the DocumentTypeFeed

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

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

The server will respond with:

200 OK
TODO

Getting a DocumentTypeEntry

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

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

And the server will respond with:

200 OK
TODO 

Inserting a new DocumentTypeEntry

It is only possible to insert a DocumentType's into a FormTypes from an existing one (i.e. you won't be able to create a DocumentType from scratch, but you will be able to add a DocumentType found in a Schema into a FormType). The DocumentTypeFeed found in a SchemaEntry is read-only.

TODO

Updating a DocumentTypeEntry

Not supported at this point.

Deleting a DocumentTypeEntry

It is only possible to delete DocumentType's from a FormType as long as it was added from a Schema. This means that you can add and remove a Schema DocumentType's from a FormType but you won't be able to remove its default DocumentType.