This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Jobs

You can use these API calls to get information on your database's jobs.

You can use these API calls to get information on your database's jobs.

GET jobs Returns a list of jobs the agent is tracking, along with their current status and exit codes.
GET jobs/:id Returns the details (the saved output) for a specific job.

1 - GET jobs

Returns a list of jobs being tracked by the agent and job details.

Returns a list of jobs being tracked by the agent and job details.

Jobs always start immediately. The is_running field is a Boolean value. If is_running is false, then the job is complete.

The exit_code details the status of the job. The exit_code is different for certain types of jobs:

  • For Backup jobs:

    • 0 indicates success.

    • Any other number indicates a failure.

  • For all other jobs:

    • -9 indicates success.

    • Any other number indicates a failure.

You can see details about failures in /opt/vertica/log/agentStdMsg.log.

Resource URL

https://<NODE>:5444/jobs

Authentication

Requires a VerticaAPIKey in the request header.

The API key must have restricted level security or higher.

Parameters

None.

Example request

GET https://<NODE>:5444/jobs

Response:

{
    "body": [
        {
            "exit_code": 0,
            "id": "CreateBackup-VMart-1405012447.75",
            "is_running": false,
            "status": "unused",
            "ts": "1405012461.18"
        },
        {
            "exit_code": 1,
            "id": "CreateBackup-VMart-1405012454.88",
            "is_running": false,
            "status": "unused",
            "ts": "1405012455.18"
        }
    ],
    "href": "/jobs",
    "links": [
        "/:jobid"
    ],
    "mime-type": "application/vertica.jobs.json-v2"
}

2 - GET jobs/:id

Gets the details for a specific job with the provided :id.

Gets the details for a specific job with the provided :id. You can determine the list of job :ids usingGET jobs.

Details for a specific job are the same as the details provided for all jobs byGET jobs.

Resource URL

https://<NODE>:5444/jobs/:id

Authentication

Requires a VerticaAPIKey in the request header.

The API key must have restricted level security or higher.

Parameters

None.

Example request

GET https://<NODE>:5444/jobs/CreateBackup-VMart-1405012454.88