Custom operations
Introduction
The application programming interface (API) enables users to perform a number of functions, including:
- Retrieving a list of available operations that can be cloned.
- Creating new operations for an organisation by cloning existing operations from the operations catalogue or by creating them in accordance with the specific requirements of that organisation.
- Retrieving a single operation from the operations catalogue, based on the name of that operation.
- Updating an existing operation, previously created by the user.
- Deleting an existing operation, previously created by the user.
- Searching for operations belonging to a specific organisation, using the platform’s filters.
Comprehensive API actions
GET and SEARCH are the only operations that the viewer profile can use.
Creating operation
Using this operation, we will create a new operation. If the operation is cloned from the catalog, we can modify the name, description and title fields. In the response, we will get a field “location” that contains the URL to access the resource.
Profiles
Optional list of user profiles authorized to execute the operation.
By default, all profiles except “viewer” have the capability to execute custom operations. Access can be restricted by specifying allowed profiles from a predefined set. Invalid profiles trigger a 400 Bad Request
with detailed error context. The “viewer” profile is not permitted and will also return a 400 error if included. The list can be established during the creation process or updated at a later time. If omitted, default access rules will apply.
The available profile names are:
- “advanced”
- “admin_domain”
- “super_admin_domain”
- “admin”
- “root”
Updating an operation
In the event that the operation is derived from the catalogue, it is only possible to modify the name, description and title fields.
Searching for operation types
Extended operation
Any parameter of the ExtendedOperation’s object can be used as filters fields in operationTypes search filters too.
There are four possible filters that can be set in the search function:
name
(optional)applicableTo
(optional)models
(optional)fromCatalog
(optional)profile
(optional)
Getting all operations catalog
The aforementioned operations can be replicated through the utilisation of the createOperation
operation.