Skip to content

/v2/custom-actions/
Stable

Request

Create a new custom action

Bodyapplication/jsonrequired
namestring, [ 1 .. 50 ] charactersrequired

Custom Action name

typestringrequired

The UI component type for this custom action

Enum:"button""toggle""radio""dropdown"
statestringrequired

The current operational state of the custom action. Only active custom actions can be deployed to Linux devices.

Enum:"draft""active""inactive"
position_in_blueprintsstringrequired

The location in the blueprint where the custom action will 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"
position_in_device_settingsstringrequired

The location in the device's Quick Actions where the custom action will be added

Enum:"none""device_quick_settings"
propertiesobjectrequired

Object for the description, info_message, and tooltip_message.

optionsArray of objects(optionsRequest)required

List of options for the custom action

cURL
curl -i -X POST \
  https://develop-api.esper.io/_mock/openapi/v2/custom-actions/ \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "type": "button",
    "state": "draft",
    "position_in_blueprints": "none",
    "position_in_device_settings": "none",
    "properties": {},
    "options": [
      {
        "label": "string",
        "key": "4adfe27e-63d3-45b9-8238-62b6ed6fdb5e",
        "scripts": {
          "linux": {
            "script": "string",
            "interpreter": "bash"
          }
        }
      }
    ]
  }'

Responses

Success

Bodyapplication/json
contentobject(CustomActionRead)
messagestring
codeinteger
Value:201
Response
{ "content": { "name": "string", "type": "button", "state": "draft", "position_in_blueprints": "none", "position_in_device_settings": "none", "properties": {}, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "options": [], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "created_by": 0, "updated_by": 0 }, "message": "string", "code": 201 }