Overview
The following operations allow you to work with forms. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with forms, see Sample configuration.
Operation | Description |
---|---|
Retrieves a specific form. | |
getFormSubmissions | Retrieves submissions for a specific form. |
cloneForm | Clones an existing form. |
Operation details
This section provides further details on the operations related to forms.
Retrieving a specific form
The
operation retrieves a specific form.getForm
<jotform.getForm> <formId>{$ctx:formId}</formId> </jotform.getForm>
Properties
The ID of the form.formId:
Sample request
Following is a sample REST/JSON request that can be handled by the getForm
operation.
{ "apiUrl" : "https://api.jotform.com", "apiKey" : "f71e12ef09ef7941b8b19b80e5173d26", "formId" : "51661468375463" }
Related JotForm documentation
http://api.jotform.com/docs/#form-id
Retrieving submissions
The
operation retrieves submissions for a specific form.getFormSubmissions
<jotform.getFormSubmissions> <limit>{$ctx:limit}</limit> <orderBy>{$ctx:orderBy}</orderBy> <formId>{$ctx:formId}</formId> <offset>{$ctx:offset}</offset> <filter>{$ctx:filter}</filter> </jotform.getFormSubmissions>
Properties
The number of results in each result set for submission data.limit:
The order value in which the results are ordered.orderBy:
The ID of the form which needs to be retrieved.formId:
The page value of each result set for submission data.offset:
The query results to fetch a specific submissions range.filter:
Sample request
Following is a sample REST/JSON request that can be handled by the getFormSubmissions
operation.
{ "apiUrl" : "https://api.jotform.com", "apiKey" : "f71e12ef09ef7941b8b19b80e5173d26", "formId" : "51661468375463", "offset" : "0", "limit" : "2", "filter" : "", "orderBy" : "id" }
Related JotForm documentation
http://api.jotform.com/docs/#form-id-submissions
Cloning a form
The
operation clones an existing form.cloneForm
<jotform.cloneForm> <formId>{$ctx:formId}</formId> </jotform.cloneForm>
Properties
The ID of the form that it is cloned from.formId:
Sample request
Following is a sample REST/JSON request that can be handled by the cloneForm
operation.
{ "apiUrl" : "https://api.jotform.com", "apiKey" : "f71e12ef09ef7941b8b19b80e5173d26", "formId" : "51651915860458" }
Related JotForm documentation
http://api.jotform.com/docs/#post-form-id-clone
Sample configuration
Following is a sample proxy service that illustrates how to connect to JotForm with the init
operation and use the getForm operation. The sample request for this proxy can be found in the getForm sample request.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="jotform_getForm" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="apiUrl" expression="json-eval($.apiUrl)" /> <property name="apiKey" expression="json-eval($.apiKey)" /> <property name="formId" expression="json-eval($.formId)" /> <jotform.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiKey>{$ctx:apiKey}</apiKey> </jotform.init> <jotform.getForm> <formId>{$ctx:formId}</formId> </jotform.getForm> <respond /> </inSequence> <outSequence> <send /> </outSequence> </target> <description /> </proxy>