Retrieve a list of forms

get

/api/REST/2.0/assets/forms

Retrieves all forms that match the criteria specified by the request parameters.

Request

Supported Media Types
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : QueryResultForm
Type: object
Title: QueryResultForm
Show Source
Nested Schema : elements
Type: array
Array of form elements.
Show Source
Nested Schema : Form
Type: object
Title: Form
Show Source
Nested Schema : FormFieldUpdateMapping
Type: object
Title: FormFieldUpdateMapping
Show Source
Nested Schema : elements
Type: array
Array consisting of form elements.
Show Source
Nested Schema : permissions
Type: array
The permissions for the form granted to your current instance. This is a read-only property.
Show Source
Nested Schema : processingSteps
Type: array
A list of the form's processing steps. There is no limit to the number of processing steps that can be included. Possible values include: FormStepAddToCampaign, FormStepAddToContactList, FormStepAddToDataCanvas, FormStepAddToProgram, FormStepAssociateToCampaign, FormStepCancelRegistration, FormStepUpdateContactEmailAddress, FormStepCreateUpdateEventRegistration, FormStepCreateUpdate, FormStepCreateUpdateFromFormField, FormStepGlobalSubscribe, FormStepGlobalUnsubscribe, FormStepGroupSubscription, FormStepPostData, FormStepRedirectToWebPage, FormStepRemoveFromContactList, FormStepRunIntegrationRules, FormStepSendEmail, FormStepSendNotificationEmail, and FormStepWebTracking.
Show Source
Nested Schema : Size
Type: object
Title: Size
Show Source
Nested Schema : permissions
Type: array
The permissions for the form field update mapping granted to your current instance. This is a read-only property.
Show Source
Nested Schema : FormElement
Type: object
Title: FormElement
Show Source
Nested Schema : permissions
Type: array
The permissions for the form element granted to your current instance.
Show Source
Nested Schema : FormProcessingStep
Type: object
Title: FormProcessingStep
Show Source
Nested Schema : ProcessingStepCondition
Type: object
Title: ProcessingStepCondition
Show Source
Nested Schema : permissions
Type: array
The permissions for the form processing step granted to your current instance.
Show Source
Nested Schema : conditionalFieldCriteria
Type: array
The conditional field criteria for the form processing step condition.
Show Source
Nested Schema : FieldComparisonCriteria
Type: object
Title: FieldComparisonCriteria
Show Source
Nested Schema : Condition
Type: object
Title: Condition
Show Source
Nested Schema : permissions
Type: array
The permissions for the field comparison criteria granted to your current instance. This is a read-only property.
Show Source

400 Response

Bad request. See Status Codes for information about other possible HTTP status codes.

401 Response

Unauthorized. See Status Codes for information about other possible HTTP status codes.

403 Response

Forbidden. See Status Codes for information about other possible HTTP status codes.

404 Response

The requested resource was not found. See Status Codes for information about other possible HTTP status codes.

500 Response

The service has encountered an error. See Status Codes for information about other possible HTTP status codes.
Back to Top

Examples

The following examples demonstrate how to retrieve forms using an HTTP request and cURL. For more information on requests, see API requests.

HTTP Request Examples

Retrieve the first 2 unarchived forms in your database. By default only unarchived forms are returned.


GET /api/REST/2.0/assets/forms?count=2
			

Response:


{
  "elements": [
    {
      "type": "Form",
      "currentStatus": "Draft",
      "id": "75",
      "createdAt": "1554748229",
      "createdBy": "52",
      "depth": "minimal",
      "folderId": "4220",
      "name": "Form_Demo",
      "permissions": [
        "Retrieve",
        "SetSecurity",
        "Delete",
        "Update"
      ],
      "updatedAt": "1586954686",
      "updatedBy": "52",
      "archived": "false",
      "htmlName": "responsiveform-1554748226676",
      "isResponsive": "true"
    },
    {
      "type": "Form",
      "currentStatus": "Draft",
      "id": "101",
      "createdAt": "1586894543",
      "createdBy": "35",
      "depth": "minimal",
      "folderId": "4124",
      "name": "Form_Demo_2",
      "permissions": [
        "Retrieve",
        "SetSecurity",
        "Delete",
        "Update"
      ],
      "updatedAt": "1586894551",
      "updatedBy": "35",
      "archived": "false",
      "htmlName": "responsiveform-1586894918064",
      "isResponsive": "true"
    }
  ],
  "page": 1,
  "pageSize": 2,
  "total": 72
}
			

Retrieve only archived forms:


GET /api/REST/2.0/assets/forms?includeArchived=true&includeAvailable=false
			

Response:


{
  "elements": [
    {
      "type": "Form",
      "currentStatus": "Draft",
      "id": "2",
      "createdAt": "1418404077",
      "createdBy": "5",
      "depth": "minimal",
      "folderId": "4367",
      "name": "Form 01",
      "permissions": [
        "Retrieve",
        "SetSecurity",
        "Delete",
        "Update"
      ],
      "updatedAt": "1534172012",
      "updatedBy": "9",
      "archived": "true",
      "htmlName": "untitledForm-1418404075886",
      "isResponsive": "false"
    },
    {
      "type": "Form",
      "currentStatus": "Draft",
      "id": "80",
      "createdAt": "1556620616",
      "createdBy": "35",
      "depth": "minimal",
      "folderId": "4367",
      "name": "Test 1",
      "permissions": [
        "Retrieve",
        "SetSecurity",
        "Delete",
        "Update"
      ],
      "updatedAt": "1556620616",
      "updatedBy": "35",
      "archived": "true",
      "htmlName": "copyOfClassicForm-1556620603031",
      "isResponsive": "true"
    },
    {
      "type": "Form",
      "currentStatus": "Draft",
      "id": "97",
      "createdAt": "1586894350",
      "createdBy": "35",
      "depth": "minimal",
      "folderId": "4367",
      "name": "20B Archive Demo",
      "permissions": [
        "Retrieve",
        "SetSecurity",
        "Delete",
        "Update"
      ],
      "updatedAt": "1586894359",
      "updatedBy": "35",
      "archived": "true",
      "htmlName": "copyOfDemoDesignEditor-1586894724087",
      "isResponsive": "true"
    }
  ],
  "page": 1,
  "pageSize": 1000,
  "total": 3
}
			

Retrieve both archived and unarchived forms:


GET /api/REST/2.0/assets/forms?includeArchived=true
			

Response:


{
	"elements": [{
			"type": "Form",
			"currentStatus": "Draft",
			"id": "2",
			"createdAt": "1418404077",
			"createdBy": "5",
			"depth": "minimal",
			"folderId": "4367",
			"name": "Form 01",
			"permissions": [
				"Retrieve",
				"SetSecurity",
				"Delete",
				"Update"
			],
			"updatedAt": "1534172012",
			"updatedBy": "9",
			"archived": "true",
			"htmlName": "untitledForm-1418404075886",
			"isResponsive": "false"
		},
		{
			"type": "Form",
			"currentStatus": "Draft",
			"id": "3",
			"createdAt": "1421850657",
			"createdBy": "5",
			"depth": "minimal",
			"folderId": "4199",
			"name": "test",
			"permissions": [
				"Retrieve",
				"SetSecurity",
				"Delete",
				"Update"
			],
			"updatedAt": "1540913905",
			"updatedBy": "4",
			"archived": "false",
			"htmlName": "form",
			"isResponsive": "false"
		}
		...
	],
	"page": 1,
	"pageSize": 1000,
	"total": 76
}
			

cURL Examples

Here are the same examples in cURL given an instance with the name APITest, username API.User, and POD of 3.


curl --user "APITest\API.User" --request GET https://secure.p03.eloqua.com/api/rest/2.0/assets/forms?count=2
			

curl --user "APITest\API.User" --request GET https://secure.p03.eloqua.com/api/rest/2.0/assets/forms?includeArchived=true&includeAvailable=false
			

curl --user "APITest\API.User" --request GET https://secure.p03.eloqua.com/api/rest/2.0/assets/forms?includeArchived=true
			
Back to Top