Custom Actions API

APIs to manage custom actions. Custom actions allow you to define custom scripts and commands that can be executed on devices.

Retrieve all custom actions for the tenant

Retrieve all custom actions for the tenant

Request
query Parameters
ordering
string

Order the results by a specific field (-field for descending order). Valid fields are 'name', 'created_at', 'updated_at', 'created_by', 'updated_by'.

name
string

Filter the results by name (partial match, case insensitive).

type
string

Filter by action type. Comma-separated list. Valid values: button, toggle, radio, dropdown.

state
string

Filter by action state. Comma-separated list. Valid values: draft, active, inactive.

position_in_blueprints
string

Filter by blueprint position. Comma-separated list. Valid values: none, blueprints_apps_and_configuration, blueprints_connectivity, blueprints_device_security, blueprints_display_and_branding, blueprints_esper_settings, blueprints_scripts, blueprints_files, blueprints_platform_services, blueprints_hardware_settings, blueprints_sound, blueprints_system_updates, blueprints_time_and_date.

position_in_device_settings
string

Filter by device settings position. Comma-separated list. Valid values: none, device_quick_settings.

created_by
integer

Filter by user ID who created the action.

updated_by
integer

Filter by user ID who last updated the action.

limit
integer [ 1 .. 100 ]
Default: 10

Number of results to return per page.

offset
integer >= 0
Default: 0

The initial index from which to return the results.

Responses
200

Success

400

Bad Request

get/v2/custom-actions/
Request samples
Response samples
application/json
{
  • "content": {
    },
  • "message": "string",
  • "code": 0
}

Create a new custom action

Create a new custom action

Request
Request Body schema: application/json
required
name
required
string [ 1 .. 50 ] characters

Custom Action name

type
required
string

The UI component type for this Custom Action

Enum: "button" "toggle" "radio" "dropdown"
state
required
string

The current operational state of the Custom Action

Enum: "draft" "active" "inactive"
position_in_blueprints
required
string

The position on Blueprints to which the Custom Action can be added

Enum: "none" "blueprints_apps_and_configuration" "blueprints_connectivity" "blueprints_device_security" "blueprints_display_and_branding" "blueprints_esper_settings" "blueprints_scripts" "blueprints_files" "blueprints_platform_services" "blueprints_hardware_settings" "blueprints_sound" "blueprints_system_updates" "blueprints_time_and_date"
position_in_device_settings
required
string

The position on Single Device Settings to which the Custom Action can be added

Enum: "none" "device_quick_settings"
properties
required
object

Generic UI-related properties

required
Array of objects (OptionsRequest)

List of options for the custom action

Responses
201

Success

400

Bad Request

409

Conflict - Custom Action name already exists

500

Internal Server Error

post/v2/custom-actions/
Request samples
application/json
{
  • "name": "string",
  • "type": "button",
  • "state": "draft",
  • "position_in_blueprints": "none",
  • "position_in_device_settings": "none",
  • "properties": { },
  • "options": [
    ]
}
Response samples
application/json
{
  • "content": {
    },
  • "message": "string",
  • "code": 201
}

Retrieve a custom action by ID

Retrieve a custom action by ID

Request
path Parameters
custom_action_id
required
string <uuid>
Responses
200

Success

404

Custom Action not found

get/v2/custom-actions/{custom_action_id}/
Request samples
Response samples
application/json
{
  • "content": {
    },
  • "message": "string",
  • "code": 200
}

Update a custom action by ID

Update a custom action by ID

Request
path Parameters
custom_action_id
required
string <uuid>
Request Body schema: application/json
required
name
string [ 1 .. 50 ] characters

Custom Action name

type
string

The UI component type for this Custom Action

Enum: "button" "toggle" "radio" "dropdown"
state
string

The current operational state of the Custom Action

Enum: "draft" "active" "inactive"
position_in_blueprints
string

The position on Blueprints to which the Custom Action can be added

Enum: "none" "blueprints_apps_and_configuration" "blueprints_connectivity" "blueprints_device_security" "blueprints_display_and_branding" "blueprints_esper_settings" "blueprints_scripts" "blueprints_files" "blueprints_platform_services" "blueprints_hardware_settings" "blueprints_sound" "blueprints_system_updates" "blueprints_time_and_date"
position_in_device_settings
string

The position on Single Device Settings to which the Custom Action can be added

Enum: "none" "device_quick_settings"
properties
object

Generic UI-related properties. Replaces the existing properties

Array of objects (OptionsRequest)

A new list of options to replace the existing ones

Responses
200

Success

400

Bad Request (validation error or invalid state transition)

404

Custom Action not found

409

Conflict - Custom Action name already exists

500

Internal Server Error

put/v2/custom-actions/{custom_action_id}/
Request samples
application/json
{
  • "name": "string",
  • "type": "button",
  • "state": "draft",
  • "position_in_blueprints": "none",
  • "position_in_device_settings": "none",
  • "properties": { },
  • "options": [
    ]
}
Response samples
application/json
{
  • "content": {
    },
  • "message": "string",
  • "code": 200
}

Delete a custom action by ID

Delete a custom action by ID

Request
path Parameters
custom_action_id
required
string <uuid>
Responses
200

Success

400

Bad Request - Cannot delete active custom action

404

Custom Action not found

500

Internal Server Error

delete/v2/custom-actions/{custom_action_id}/
Request samples
Response samples
application/json
{
  • "message": "string",
  • "code": 200
}

Retrieve script content by ID

Retrieve script content by ID

Request
path Parameters
script_id
required
string <uuid>
Responses
200

Success

403

Permission denied

404

Script not found

500

Internal Server Error

get/v2/scripts/{script_id}/
Request samples
Response samples
application/json
{
  • "content": {
    },
  • "message": "string",
  • "code": 200
}