Versions Compared

Key

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

The Data API provides a simple protocol for viewing and managing resources such as forms, projects, themesstyles, 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.

Note

In v9.1 and later 's "Applications" are known as "Projects." Where the documentation below refers to Applications it corresponds to  v9.1+ ProjectsThe API objects and methods still use the word Application.

Column
width240px

On this page:

Table of Contents
maxLevel2

...

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 project using the  UI, for instance users, projects, formforms, themesstyles, 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.

Here is a diagram showing all the available Data API feeds:

Image RemovedImage Added

Here is a quick run-down of each one of them:

  • UserFeed  - There is not much that can be done with this collection at this point except for being an optional entry point for applicationsprojects, tasks and themes.
  • FormTypeTemplateFeed - The collection used to list and manage published forms or workflows.
  • SubmissionFeed - The collection used to query form or workflow submissions and get associated XML documents, PDF snapshots, attachments, etc.
  • ThemeFeedStyleFeed - The collection used to list and manage themes styles in .
  • ApplicationFeedProjectFeed - The collection used to list and manage applications projects 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 project.
  • DocumentType - The collection used to manage top-level XSD elements in , called DocumentTypes. An XSD has a feed containing all the DocumentTypes (top level elements) that can be added to forms and workflows and a form or workflow has a feed containing all the DocumentTypes added (in the designer's Data Sources pane).
  • FormTypeFeed - The collection used to manage forms AND workflows. This is the core collection in the API that is used to use, design, manage, instantiate, etc. forms and workflows.
  • ControlTypeFeed - The collection used to list the controls, and their metadata, contained in a form or workflow.

...

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

...

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

The commandLoop() method in the Contacts''' class below shows how this is done in the Contacts applicationproject. 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.

...