An account Operator or Trusted Application can define new custom action types within that account, which can be scoped to individual projects as required. When defining these action types, it's possible to add specific custom fields and tags to aid in filtering. An action type can be regarded as the class of an individual action, much in the same way that a product is used to model the class of individual serialised Thngs.
Action types that are created in a project scope can later be shared with other projects using the 'Add to another project' button in the Dashboard, or through the REST API. See Scoping for more information on sharing resources between projects.
API Status
General Availability:
/actions
/actions/:type
/actions
/actions/:type
ActionTypeDocument Data Model
See also: ScopesDocument
Filterable Fields
This resource type can be filtered using the following fields and operators.
Built-in Action Types
In addition to custom action types there are a number of action types that are built-in to the Platform, which available to all accounts when they are created. These are listed below:
scans
implicitScans
invalidScans
shares
checkins
commissions
decommissions
encodings
Action Type Customization
When an action type is viewed in the Dashboard, it is displayed with some additional visual elements if the type's customFields
includes any of the following optional items:
color
- The hexadecimal color value, including#
, used in the action table margin.displayname
- The friendly name of the action type, which does not require an underscore, unlikename
.icon
- A Glyphicon code for an icon representing the meaning of this action type.
Create an Action Type
Submit a valid ActionTypeDocument
to the /actions
endpoint to create a custom action type.
Read all Action Types
Action types can be retrieved by a GET
on the /actions
endpoint. The action types are returned with the built-in types coming first, followed by the custom types sorted by descending creation date. The result may be paginated if there are more than 30 items.
Update an Action Type
Update an action type by making a PUT
request.
Delete an Action Type
You can delete an action type in a similar manner to creating one using the actionType
.
NoteThe default action types cannot be deleted.
NoteDeleting an action type will result in the deletion of all actions created of that type as well.