The action.json file defines the actions that an adapter can take with the system it is integrating with. Actions are oftentimes referred to as integrations, APIs, endpoints, etc.
- When building an adapter from Swagger, each action within Swagger will result in an action somewhere within the action.json of an adapter.
- Actions are grouped together within an entity. In other words, each entity that is defined within the adapter will contain a single action.json file that contains all the possible actions you can take on the entity.
- By default, entities are built to match the tags within the OpenAPI document.
- If the tags within the OpenAPI are not utilized or do not group calls in an understandable method, the adapter may also not group the calls in a proper manner.
- Some examples of actions include CRUD operations on an entity. For example, if you have a device entity, typical actions would be getDevice, createDevice, updateDevice, and deleteDevice. Other actions can also be defined for an entity. For example, getDeviceConfig and setDeviceConfig.
- There are no limitations to the number of actions an entity can have.
- By default, method names are built to match the operationId within the OpenAPI document.
- If the operationId within the OpenAPI are not utilized or do not have a good naming convention, the adapter may have bad method names.
- Changes to the action.json do not require an Itential Automation Platform (IAP) or adapter restart.