Skip to content

Actions API

DRAFT — Internal Developer Use Only

This API reference is for internal development teams.

Overview

What it is: The actions API lets you manage automated actions that Discovery executes in response to triggers and workflows. Actions include sending emails, creating incidents, and custom operations.

Endpoints

MethodPathDescriptionAuth required
GET/api/v1/actionsList all actionsJWT + API token
GET/api/v1/actions/:actionIDGet a specific actionJWT + API token
PUT/api/v1/actions/:actionIDUpdate an actionJWT + API token
DELETE/api/v1/actions/:actionIDDelete an actionJWT + API token
POST/api/v1/actions/:actionID/send-emailExecute email actionJWT + API token
POST/api/v1/actions/:actionID/create-incidentExecute incident creationJWT + API token

GET /api/v1/actions

List all configured actions.

Request:

http
GET /api/v1/actions
Authorization: Bearer <token>

Response (200):

json
[
  {
    "actionID": "action-uuid-001",
    "name": "Notify Admin",
    "type": "email",
    "enabled": true,
    "config": {
      "recipients": ["admin@example.com"],
      "subject": "Alert: {{trigger.name}}"
    }
  },
  {
    "actionID": "action-uuid-002",
    "name": "Create ServiceNow Ticket",
    "type": "incident",
    "enabled": true,
    "config": {
      "provider": "servicenow",
      "priority": "high"
    }
  }
]

PUT /api/v1/actions/:actionID

Update an existing action configuration.

Request:

http
PUT /api/v1/actions/action-uuid-001
Authorization: Bearer <token>
Content-Type: application/json

{
  "name": "Notify Security Team",
  "enabled": true,
  "config": {
    "recipients": ["security@example.com"],
    "subject": "Security Alert: {{trigger.name}}"
  }
}

Response (200): Returns the updated action object.


POST /api/v1/actions/:actionID/send-email

Execute an email action immediately.

Request:

http
POST /api/v1/actions/action-uuid-001/send-email
Authorization: Bearer <token>
Content-Type: application/json

{
  "context": {
    "trigger": "manual",
    "entityId": "entity-uuid"
  }
}

Response (200):

json
{
  "status": "sent",
  "recipients": 1
}

POST /api/v1/actions/:actionID/create-incident

Execute an incident creation action (e.g., ServiceNow ticket).

Request:

http
POST /api/v1/actions/action-uuid-002/create-incident
Authorization: Bearer <token>
Content-Type: application/json

{
  "context": {
    "trigger": "threat-detection",
    "entityId": "entity-uuid",
    "severity": "high"
  }
}

Response (200):

json
{
  "status": "created",
  "incidentId": "INC0012345"
}

Hydden Documentation and Training Hub