Index

This method returns a list of scheduled jobs for the organization.

Method URL
GET /api/v1/scheduled_jobs.json
GET /api/v1/scheduled_jobs.json?page=1&per_page=2

Example Response

Code Status
200 OK

Example Response JSON

[
    {
        "id": 2,
        "organisation_id": 2,
        "source_id": 2,
        "source_name": "Default",
        "source_type": 12,
        "status": 2,
        "url": "/api/v1/scheduled_jobs/2"
    },
    {
        "id": 3,
        "organisation_id": 2,
        "source_id": 3,
        "source_name": "Windows",
        "source_type": 12,
        "status": 2,
        "url": "/api/v1/scheduled_jobs/3"
    }
]

Show

This method returns details of the scheduled job specified by the job ID in the URL

Method URL
GET /api/v1/scheduled_jobs/[scheduled_job_id].json

Example Response

Code Status
200 OK

Example Response JSON

{
    "created_at": "2015-01-05T10:05:00-08:00",
    "created_by": 1,
    "failure_list": "",
    "id": 2,
    "node_id": null,
    "notify_admins": true,
    "notify_analysts": false,
    "notify_members": false,
    "organisation_id": 2,
    "processing": false,
    "repeat_minutes": 1440,
    "source_id": 2,
    "source_type": 12,
    "status": 2,
    "updated_at": "2015-05-18T13:56:13-07:00",
    "updated_by": 4
}

A scheduled job’s status can be one of the following values:

Code Status Description
1 Enabled The scheduled job is enabled and will execute when the specified repeat interval has elapsed.
2 Disabled The scheduled job is disabled and will never execute.

A scheduled job’s source_type shows which type of object a scheduled job is based on. The source_type field can be one of the following values:

ID Type
4 Node
5 Environment
12 Environment Scan

The scheduled job will run a node scan across all nodes in the environment given by source_id.

Update

This method allows you to update the specified scheduled job.

Method URL
PUT /api/v1/scheduled_jobs/[scheduled_job_id].json

Example Response

Code Status
204 No Content

Kill

This method allows you to stop running and pending jobs associated with the specified scheduled job.

Method URL
POST /api/v1/scheduled_jobs/[scheduled_job_id]/kill

Example Response

Code Status
200 OK