ASDinCloudDocs
API ReferenceEvent types

Event types

View as Markdown

The event type object

View as Markdown

Event types categorize events. Archiving a type keeps it available to historical records.

Attributes

idinteger
Identifier assigned by the API.
namestringRequired
Name of the event type, up to 120 characters. Must be unique among active types.
sort_orderinteger
Display order.
archived_atinteger or null
Unix timestamp in seconds when archived.

List event types

View as Markdown
GET/api/v1/event-types

Lists event type records in the workspace.

Permissions

Send your API key in X-API-Key. Required permissions are Events → Read.

Query parameters

include_archivedboolean
Include archived event types. Defaults to false.

Returns

Returns types in display order, then by name.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.

Retrieve an event type

View as Markdown
GET/api/v1/event-types/{id}

Returns one event type by ID.

Permissions

Send your API key in X-API-Key. Required permissions are Events → Read.

Path parameters

idintegerRequired
ID of the event type.

Returns

The event type is returned in data.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
404
The requested record was not found.

Create an event type

View as Markdown
POST/api/v1/event-types

Creates an event type.

Permissions

Send your API key in X-API-Key. Required permissions are Events → Write.

Body parameters

namestringRequired
Name of the event type, up to 120 characters. Must be unique among active types.

Returns

The created event type is returned in data.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
400
The name is missing, invalid, or already used by an active event type.

Update an event type

View as Markdown
PATCH / PUT / POST/api/v1/event-types/{id}

Updates an event type by ID.

Permissions

Send your API key in X-API-Key. Required permissions are Events → Write.

Path parameters

idintegerRequired
ID of the event type.

Body parameters

namestringRequired
Name of the event type, up to 120 characters. Must be unique among active types.

Returns

Returns a successful update response.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
404
The requested record was not found.
400
The name is missing, invalid, or already used by an active event type.

Delete an event type

View as Markdown
DELETE/api/v1/event-types/{id}
POST/api/v1/event-types/{id}/delete

Archives an event type. It remains retrievable by ID.

Permissions

Send your API key in X-API-Key. Required permissions are Events → Write.

Path parameters

idintegerRequired
ID of the event type.

Returns

Returns a successful removal response.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
404
The requested record was not found.
400
The name is missing, invalid, or already used by an active event type.