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 |
|---|---|---|
| actionIdentifier | A unique identifier to uniquely distinguish an action within the YAML. | <ch:codesample></ch:codesample> |
| summary | The concise summary for the action. | <ch:codesample></ch:codesample> |
| description | The concise description for the action | <ch:codesample></ch:codesample> |
| entityName | The name of the entity that the action pertains to. | <ch:codesample></ch:codesample> |
| hidden | Specifies whether the action should be hidden from the listing in the action selection dropdown on the UI. |
|
| batch | Indicates whether the action supports batch operations. |
|
| batchStrategy | Specifies the batch strategy to utilize when the action supports batch operations. |
|
| pagination | Specifies the pagination strategy for retrieving data from the API. For more details, please refer to Pagination strategies. |
|
| wrapRecord | Specifies whether the data should be enclosed within the entity name when posting it to the API. |
|
| wrapRecordInArray | Specifies whether the data should be enclosed within an array when posting it to the API. |
|
| operation | Specifies the predefined operation, either event-based or non-event-based triggers, to describe the trigger behavior. | Possible Values:
|
| responseRecordXpath | The 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> |
| responseSchemaWrapperXpath | The root elements to be added to the schema definition when loading the schema in the mapper. |
|
| requestRecordXpath | The XPath expression that separates the data records to be posted to the API. |
|
| requestSchemaWrapperXpath | The root elements to be added to the schema definition when loading the schema in the mapper. |
|
| paramValues | The parameters relevant to the action. | |
| responseSchema | The definition of the response schema for the action. Schema can be static or dynamic
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 dynamic schema, please refer to Dynamic schema | Static Schema <ch:codesample>Dynamic Schema <ch:codesample></ch:codesample></ch:codesample> |