Section | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
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:
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.
...