Forms API (2024.11)

Download OpenAPI specification:Download

listForms

List Forms

Retrieve Paginated List of Forms

Gets the list of forms available to a user. The response can be paginated.

SecuritybearerAuth or basicAuth
Request
query Parameters
cursor
string (Cursor) non-empty

For a paginated request, this parameter defines the cursor from which to retrieve the next set of items.

limit
integer [ 1 .. 50 ]

For a paginated request, this parameter defines the maximum number of items to retrieve.

Responses
200

Successful request.

400

Bad Request. The Problem Details object will provide more information about the exact cause.

403

Forbidden

408

Request timed out. An operation has timed out on the client.

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

get/af/listforms
Request samples
Response samples
application/json
{
  • "items": [
    ],
  • "cursor": "string"
}

getFormDefinition

Get Form Definition

Retrieve the definition of the specified form.

Gets the definition of the given form.

If you are using site components within forms, please refer to the API Documentation for detailed information. As an example, to access form definition for a form containing site components at path /content/forms/af/registration you can use the following URL to fetch form definition /content/forms/af/registration/jcr:content/guideContainer.model.json

Otherwise, feel free to explore the below API.

SecuritybearerAuth or basicAuth
Request
path Parameters
id
required
string

Unique identifier of the form. It can be retrieved from the forms manager UI while authoring the form or from the Forms Portal listForms API

header Parameters
Accept-Language
string
Default: en

The header advertises which languages the client is able to understand, and which locale variant is preferred. (By languages, we mean natural languages, such as English, and not programming languages.). This parameter is incompatible with locale

Example: fr-CH
Responses
200

Successful request.

400

Bad Request. The Problem Details object will provide more information about the exact cause.

403

Forbidden

404

Not Found

408

Request timed out. An operation has timed out on the client.

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

get/af/{id}
Request samples
Response samples
application/json
{
  • "afModelDefinition": { },
  • "dataSchema": "string",
  • "allowedSubmissionTypes": [
    ]
}

getFormWithLocale

Get Localised Form Definition

Retrieve Localized Form Definition

Gets the localised definition of the given form.

SecuritybearerAuth or basicAuth
Request
path Parameters
id
required
string

Unique identifier of the form. It can be retrieved from the forms manager UI while authoring the form or from the Forms Portal listForms API

locale
required
string
Default: "en"

form locale represented as language tag.

Example: fr-CH
header Parameters
Accept-Language
string
Default: en

The header advertises which languages the client is able to understand, and which locale variant is preferred. (By languages, we mean natural languages, such as English, and not programming languages.). This parameter is incompatible with locale

Example: fr-CH
Responses
200

Successful request.

400

Bad Request. The Problem Details object will provide more information about the exact cause.

403

Forbidden

408

Request timed out. An operation has timed out on the client.

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

get/af/{id}/{locale}
Request samples
Response samples
application/json
{
  • "afModelDefinition": { },
  • "dataSchema": "string",
  • "allowedSubmissionTypes": [
    ]
}

getFormData

Get Form Data

Retrieve Form Data

Gets the form data

SecuritybearerAuth or basicAuth
Request
path Parameters
id
required
string

Unique identifier of the form. It can be retrieved from the forms manager UI while authoring the form or from the Forms Portal listForms API

query Parameters
dataRef
string

Unique identifier of the data to be prefilled. This is returned by the submit API.

Responses
200

Form Data

400

Bad Request. The Problem Details object will provide more information about the exact cause.

403

Forbidden

408

Request timed out. An operation has timed out on the client.

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

default

Invalid request.

get/af/data/{id}
Request samples
Response samples
application/json
{
  • "data": { },
  • "metadata": {
    }
}

submitForm

Submit Form

Submit Form

Submits the given form

SecuritybearerAuth or basicAuth
Request
path Parameters
id
required
string

Unique identifier of the form. It can be retrieved from the forms manager UI while authoring the form or from the Forms Portal listForms API

Request Body schema:
required

Request body to submit form

data
required
object

form data for the form. It must conform to the schema referred in the dataSchema of the Form. It will include attachments only when the request body payload is of application/json or application/xml type

object

It can be used to send additional metadata to the submit end point. For example, draftid can be passed in cases where a draft is submitted through portal.

property name*
additional property
string <binary>

attachment in the form. The name of the property must be of the following format :

Responses
200

Successful request.

400

Bad Request. The request was invalid or cannot be served.

403

Forbidden

408

Request timed out. An operation has timed out on the client.

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

default

Invalid request.

post/af/submit/{id}
Request samples
No sample
Response samples
{
  • "submissionId": "string",
  • "redirectUrl": "string",
  • "thankYouMessage": "string",
  • "metadata": {
    }
}

generateDoR

Generate DoR

Generate Document of Record for Form

Generates the Document of Record for the given form. It will not perform server-side validation of form data.

SecuritybearerAuth or basicAuth
Request
path Parameters
id
required
string

Unique identifier of the form. It can be retrieved from the forms manager UI while authoring the form or from the Forms Portal listForms API

query Parameters
locale
string
Default: "en"

form locale

Request Body schema:
required

Request body to submit form

data
required
object

form data for the form. It must conform to the schema referred in the dataSchema of the Form. It will include attachments only when the request body payload is of application/json or application/xml type

property name*
additional property
string <binary>

attachment in the form. The name of the property must be of the following format :

Responses
200

Successful request.

400

Bad Request. The Problem Details object will provide more information about the exact cause.

403

Forbidden

408

Request timed out. An operation has timed out on the client.

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

post/af/dor/{id}
Request samples
No sample
Response samples
application/problem+json
{
  • "status": 0,
  • "title": "string",
  • "type": "string",
  • "detail": "string",
  • "instance": "string"
}

Callback

Register callback endpoints that are invoked when an action is performed in AEM Forms

Register a new callback URL

Register a new callback endpoint to be executed on an action in AEM Forms like submission of an Adaptive Form. A callbackUrl is registered from a source, for example, WORKFRONT_FUSION to be executed on 'AFSubmission'.

SecuritybearerAuth or basicAuth
Request
Request Body schema: application/json
required
title
string

A friendly name or title for the callback endpoint or URL

description
string

A description of the callback endpoint or URL

callbackUrl
required
string <url>

The URL that needs to be invoked on the action for which it is registered.

status
required
string

Status of the callback endpoint

Enum: "ACTIVE" "INACTIVE"
source
required
string

An identifier for the service that registers the callback endpoint

Value: "WORKFRONT_FUSION"
callbackOn
required
Array of strings
Items Value: "AF_SUBMISSION"
object (AdditionalData)

Additional properties or metadata of the endpoint that needs to be part of the registration.

lastModifiedBy
string

Email or user id of the user in external service who initiates the callback registration

targetServiceId
required
string

AEM Service ID against which the callback is being registered.

Responses
200

Successful operation

400

Bad Request. The Problem Details object will provide more information about the exact cause.

401

Unauthorized

403

Forbidden

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

post/callbacks
Request samples
application/json
{
  • "title": "string",
  • "description": "string",
  • "callbackUrl": "string",
  • "status": "ACTIVE",
  • "source": "WORKFRONT_FUSION",
  • "callbackOn": [
    ],
  • "additionalData": {
    },
  • "lastModifiedBy": "string",
  • "targetServiceId": "string"
}
Response samples
application/json
{
  • "id": "string",
  • "title": "string",
  • "description": "string",
  • "callbackUrl": "string",
  • "status": "ACTIVE",
  • "source": "WORKFRONT_FUSION",
  • "callbackOn": [
    ],
  • "additionalData": {
    },
  • "lastModifiedBy": "string",
  • "targetServiceId": "string"
}

Update a callback endpoint

Update existing callback endpoint

SecuritybearerAuth or basicAuth
Request
path Parameters
id
required
string

ID of callback endpoint to return

Request Body schema: application/json
required

Update an existing callback

title
string

A friendly name or title for the callback endpoint or URL

description
string

A description of the callback endpoint or URL

callbackUrl
required
string <url>

The URL that needs to be invoked on the action for which it is registered.

status
required
string

Status of the callback endpoint

Enum: "ACTIVE" "INACTIVE"
source
required
string

An identifier for the service that registers the callback endpoint

Value: "WORKFRONT_FUSION"
callbackOn
required
Array of strings
Items Value: "AF_SUBMISSION"
object (AdditionalData)

Additional properties or metadata of the endpoint that needs to be part of the registration.

lastModifiedBy
string

Email or user id of the user in external service who initiates the callback registration

targetServiceId
required
string

AEM Service ID against which the callback is being registered.

Responses
200

Successful operation

400

Bad Request. The Problem Details object will provide more information about the exact cause.

401

Unauthorized

403

Forbidden

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

put/callbacks/{id}
Request samples
application/json
{
  • "title": "string",
  • "description": "string",
  • "callbackUrl": "string",
  • "status": "ACTIVE",
  • "source": "WORKFRONT_FUSION",
  • "callbackOn": [
    ],
  • "additionalData": {
    },
  • "lastModifiedBy": "string",
  • "targetServiceId": "string"
}
Response samples
application/json
{
  • "id": "string",
  • "title": "string",
  • "description": "string",
  • "callbackUrl": "string",
  • "status": "ACTIVE",
  • "source": "WORKFRONT_FUSION",
  • "callbackOn": [
    ],
  • "additionalData": {
    },
  • "lastModifiedBy": "string",
  • "targetServiceId": "string"
}

Get a callback endpoint by ID

Returns a single callback endpoint by Id

SecuritybearerAuth or basicAuth
Request
path Parameters
id
required
string

ID of callback endpoint to return

Responses
200

successful operation

400

Bad Request. The Problem Details object will provide more information about the exact cause.

401

Unauthorized

403

Forbidden

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

get/callbacks/{id}
Request samples
Response samples
application/json
{
  • "id": "string",
  • "title": "string",
  • "description": "string",
  • "callbackUrl": "string",
  • "status": "ACTIVE",
  • "source": "WORKFRONT_FUSION",
  • "callbackOn": [
    ],
  • "additionalData": {
    },
  • "lastModifiedBy": "string",
  • "targetServiceId": "string"
}

Delete callback endpoint by ID

Deletes a single callback endpoint

SecuritybearerAuth or basicAuth
Request
path Parameters
id
required
string

ID of callback endpoint to delete

Responses
204

successful operation

400

Bad Request. The Problem Details object will provide more information about the exact cause.

401

Unauthorized

403

Forbidden

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

delete/callbacks/{id}
Request samples
Response samples
application/problem+json
{
  • "status": 0,
  • "title": "string",
  • "type": "string",
  • "detail": "string",
  • "instance": "string"
}