Skip to main content
Version: 4

Actions

Open API describes relative paths to individual endpoints and their operations.

  • These paths are appended to the URL specified in the Server Object to construct the complete URL.

  • This endpoint specifies a definition for the supported HTTP methods (ex. GET, POST, PUT, DELETE).

For example, here's a sample endpoint defined for the GET HTTP method in the Open API specification:

Adeptia introduces the following extension under the endpoint method definition to delineate the actions relevant to the specified endpoint within the API.

  • x-adeptia-action

For example, to define an action, the x-adeptia-action extension is added under the HTTP method definition.

 ### Extension: Define Action

The persistence of these parameters occurs within the AC_ACTION entity in the backend database.

Field name
Description
YAML
actionIdentifierA unique identifier to uniquely distinguish an action within the YAML.<ch:codesample></ch:codesample>
summaryThe concise summary for the action.<ch:codesample></ch:codesample>
descriptionThe concise description for the action<ch:codesample></ch:codesample>
entityNameThe name of the entity that the action pertains to.<ch:codesample></ch:codesample>
hiddenSpecifies whether the action should be hidden from the listing in the action selection dropdown on the UI.
  • Possible values: true, false
  • Default Value: false
<ch:codesample>


</ch:codesample>
batchIndicates whether the action supports batch operations.
  • Possible values: true, false
  • Default Value: false
<ch:codesample>


</ch:codesample>
batchStrategySpecifies the batch strategy to utilize when the action supports batch operations.
  • No need to define the batch strategy explicitly, if there is only one strategy defined for batch operations.
<ch:codesample>


</ch:codesample>
pagination

Specifies the pagination strategy for retrieving data from the API.

For more details, please refer to Pagination strategies.

  • Only applicable to data retrieval actions. For example: Get All Customer data.
<ch:codesample>


</ch:codesample>
wrapRecordSpecifies whether the data should be enclosed within the entity name when posting it to the API.
  • Possible values: true, false
  • Default Value: false
<ch:codesample>


</ch:codesample>
wrapRecordInArraySpecifies whether the data should be enclosed within an array when posting it to the API.
  • Possible values: true, false
  • Default Value: false
<ch:codesample>


</ch:codesample>
operationSpecifies the predefined operation, either event-based or non-event-based triggers, to describe the trigger behavior.

Possible Values:

  • create
  • update
  • upsert
  • delete
  • all
<ch:codesample>


</ch:codesample>
responseRecordXpathThe JSON path that delineates the response records within the API JSON response.

Default Value: {entityName} (The entity name defined in the action definition in row #4)

<ch:codesample></ch:codesample>
responseSchemaWrapperXpathThe root elements to be added to the schema definition when loading the schema in the mapper.
  • Default Value: {entityName}Response.
  • The entity name defined in the action definition in row #4)
<ch:codesample>


</ch:codesample>
requestRecordXpathThe XPath expression that separates the data records to be posted to the API.
  • Default Value: {entityName}.
  • The entity name defined in the action definition in row #4)
<ch:codesample></ch:codesample>
requestSchemaWrapperXpathThe root elements to be added to the schema definition when loading the schema in the mapper.
  • Default Value: {entityName}Request.
  • The entity name defined in the action definition in row #4)
<ch:codesample>


</ch:codesample>
paramValuesThe parameters relevant to the action. 
responseSchema

The definition of the response schema for the action.

Schema can be static or dynamic

  • For static schema define the $ref element
  • For dynamic schema define the operationId element

For dynamic schema, please refer to Dynamic schema

Static Schema

<ch:codesample>


Dynamic Schema

<ch:codesample></ch:codesample></ch:codesample>
requestSchema

The definition of the request schema for the action.

Schema can be static or dynamic

  • For static schema define the $ref element
  • For dynamic schema define the operationId element.

For dynamic schema, please refer to Dynamic schema

Static Schema

<ch:codesample>


Dynamic Schema

 

<ch:codesample></ch:codesample></ch:codesample>

Example: Action definition for QuickBooks create customer action​

Example: Action definition for Xero create/update Invoice action​