Automation
Get All Event Filters
This endpoint retrieves a list of Event Filters.
GET /api/v2/automation/event-filters/
Query Parameters
The following parameters may be used to filter the Event Filters in the response.
| Parameter | Description | 
|---|---|
| event | Filter by event ID. For example using event=VerificationRan will return a list of the Event Filters that use VerificationRan. | 
| active | true/false. If true, will return a list of active event filters. If false, will return get a list of inactive event filters. | 
GET /api/v2/automation/event-filters/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "results": [{
        "id": 1,
        "event_id": "VerificationRan",
        "active": true,
        "criteria": {
            "vulnerability_report": {
                "SAST": {
                    "high": 0,
                    "critical": 0
                }
            }
        },
        "threshold": null,
        "action_plans": [{
            "id": 1,
            "action_id": "TransitionTaskStatus",
            "params": {
                "note": "Task status automatically transitioned to Complete by ${scanner_name}. More information: \n${scan_details}",
                "task_id": "T1368",
                "status_id": "TS1"
            }
        }]
    }, {
        "id": 2,
        "event_id": "VerificationRan",
        "active": true,
        "criteria": {
            "vulnerability_report": {
                "DAST": {
                    "high": 0,
                    "critical": 0
                }
            }
        },
        "threshold": 90,
        "action_plans": [{
            "id": 2,
            "action_id": "TransitionTaskStatus",
            "params": {
                "note": "Task status automatically transitioned to Complete by ${scanner_name}. More information: \n${scan_details}",
                "task_id": "T1369",
                "status_id": "TS1"
            }
        }]
    }]
}
Get a Specific Event Filter
This endpoint retrieves a specific Event Filter, as specified by the id parameter.
GET /api/v2/automation/event-filters/{event-filter-id}/
URL Parameters
| Parameter | Description | 
|---|---|
| event_filter_id | The id of the Event Filter to retrieve | 
GET /api/v2/automation/event-filters/7/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "id": 7,
    "event_id": "VerificationRan",
    "active": true,
    "criteria": {
        "category": "INFRASTRUCTURE"
    },
    "threshold": 90,
    "action_plans": [{
        "id": 14,
        "action_id": "TransitionTaskStatus",
        "params": {
            "note": "Task status automatically transitioned to Incomplete as it has been more than 90 days since you ran an Infrastructure scan.",
            "task_id": "T1915",
            "status_id": "TS2"
        }
    }]
}
Get All Actions
This endpoint retrieves a list of all DefinedAction classes
GET /api/v2/automation/actions/
GET /api/v2/automation/actions/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "results": [
        {
            "action_id": "TransitionTaskStatus",
            "description": "Modify task status"
        },
        {
            "action_id": "AddTaskNote",
            "description": "Add note to task"
        }
    ]
}
Get All Events
This endpoint retrieves a list of all DefinedEvent classes
GET /api/v2/automation/events/
GET /api/v2/automation/events/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "results": [
        {
            "event_id": "VerificationRan",
            "description": "Verification tool ran"
        }
    ]
}