Triggers
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 triggers relevant to the specified endpoint within the API.
x-adeptia-trigger
For example, to define a trigger, the x-adeptia-trigger extension is added under the HTTP method definition.
Extension: Define Trigger
The persistence of these parameters occurs within the AC_TRIGGER entity in the backend database.
| Field name | Description | YAML |
|---|---|---|
| triggerIdentifier | A unique identifier to uniquely distinguish a trigger within the YAML. | <ch:codesample> </ch:codesample> |
| summary | The concise summary for the trigger. | <ch:codesample> </ch:codesample> |
| description | The concise description for the trigger. | <ch:codesample> </ch:codesample> |
| entityName | The name of the entity that the trigger pertains to. | <ch:codesample> </ch:codesample> |
| hidden | Specifies whether the trigger should be hidden from the listing in the trigger selection dropdown on the UI. |
|
| cursorField | Specifies the name of the timestamp field from the entity to be utilized for requesting incremental data from the API.
| <ch:codesample></ch:codesample> |
| cursorStrategy | Specifies the strategy for fetching incremental data from the API.
| <ch:codesample></ch:codesample> |
| pagination | Specifies the pagination strategy for retrieving data from the API.
| <ch:codesample></ch:codesample> |
| 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 describes the response records within the API JSON response. | Default Value: {entityName} (The entity name defined in the trigger 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. | Default Value: {entityName}Response <ch:codesample></ch:codesample> |
| paramValues | The parameters relevant to the trigger. | |
| responseSchema | The definition of the response schema for the trigger.
| Static Schema <ch:codesample></ch:codesample> Dynamic Schema <ch:codesample></ch:codesample> |
Example: Trigger definition for QuickBooks GetCustomer Trigger
Example: Trigger definition for QuickBooks AllCustomer Trigger