EDB Postgres Enterprise Manager REST APIs v17.0: Agent Job v10.5

get__agent_job_{agent_id}

Code samples

GET /agent/job/{agent_id}

Gets Jobs for agent level by agent_id.

Parameters

NameInTypeRequiredDescription
agent_idpathintegertrueAgent ID
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
[
  {
    "jobname": "string",
    "jobenabled": true,
    "jobdesc": "string"
  }
]

Responses

StatusMeaningDescriptionSchema
200OKSuccessful responseInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[AgentJobBodyGet]falsenonenone
» jobnamestringfalsenoneName of the job.
» jobenabledbooleanfalsenoneDetermines whether the job is enabled or disabled.
» jobdescstringfalsenoneDescription of the job.
Info

This operation does not require authentication

post__agent_job_{agent_id}

Code samples

POST /agent/job/{agent_id}

Creates Job for agent level.

Body parameter

{
  "jobname": "string",
  "jobenabled": true,
  "jobdesc": "string",
  "jsteps": [],
  "jschedules": [
    {
      "jscname": "string",
      "jscdesc": "string",
      "jscenabled": true,
      "jscstart": "2023-10-09 22:43 +05:30",
      "jscend": "2023-10-11 22:43 +05:30",
      "jscweekdays": [
        "Friday"
      ],
      "jscmonthdays": [
        1,
        15
      ],
      "jscmonths": [
        "January",
        "February",
        "March",
        "April",
        "May",
        "June",
        "July",
        "August",
        "September",
        "October",
        "November",
        "December"
      ],
      "jschours": [
        16
      ],
      "jscminutes": [
        0,
        30
      ],
      "jscexceptions": [
        {
          "jexdate": "2023-10-19",
          "jextime": "09:39:00"
        }
      ],
      "jsctimezone": "America/New_York"
    }
  ],
  "notify": "DEFAULT",
  "email_group_id": "string"
}

Parameters

NameInTypeRequiredDescription
agent_idpathintegertrueAgent ID
X-Auth-TokenheaderstringtrueToken of authorization
bodybodyAgentJobBodyPosttruenone

Example responses

201 Response
{
  "id": 0
}

Responses

StatusMeaningDescriptionSchema
201CreatedCreated SuccessfullyInline

Response Schema

Status Code 201

NameTypeRequiredRestrictionsDescription
» idintegerfalsenoneId of the job
Info

This operation does not require authentication

get__agent_job_{agent_id}_{job_id}

Code samples

GET /agent/job/{agent_id}/{job_id}

Gets Jobs for agent level by agent_id and job_id.

Parameters

NameInTypeRequiredDescription
agent_idpathintegertrueAgent ID
job_idpathintegertrueJob ID
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
{
  "jobid": 0,
  "jobname": "string",
  "jobenabled": true,
  "jobdesc": "string",
  "jobcreated": "2019-08-24T14:15:22Z",
  "jobchanged": "2019-08-24T14:15:22Z",
  "jlgstatus": "string",
  "jobnextrun": "2019-08-24T14:15:22Z",
  "joblastrun": "2019-08-24T14:15:22Z",
  "is_alert_job": true,
  "notify": "string",
  "email_group_id": "string",
  "jsteps": [],
  "jschedules": [
    {
      "jscid": 0,
      "jscjobid": 0,
      "jscname": "string",
      "jscdesc": "string",
      "jscenabled": true,
      "jscstart": "2019-08-24T14:15:22Z",
      "jscend": "2019-08-24T14:15:22Z",
      "jscweekdays": [
        false,
        false,
        false,
        false,
        false,
        true,
        false
      ],
      "jscmonthdays": [
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        true,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false
      ],
      "jscmonths": [
        true,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false
      ],
      "jschours": [
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        true,
        false,
        false,
        false,
        false,
        false,
        false,
        false
      ],
      "jscminutes": [
        false,
        false,
        false,
        false,
        true,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false
      ],
      "jscexceptions": [
        null
      ],
      "jsctimezone": "string"
    }
  ]
}

Responses

StatusMeaningDescriptionSchema
200OKSuccessful responseAgentJobBody
Info

This operation does not require authentication

put__agent_job_{agent_id}_{job_id}

Code samples

PUT /agent/job/{agent_id}/{job_id}

Updates Job for agent level.

Body parameter

{
  "jobname": "string",
  "jobenabled": true,
  "jobdesc": "string",
  "jsteps": {
    "added": [
      {
        "jstname": "string",
        "jstdesc": "string",
        "jstenabled": true,
        "jstkind": true,
        "jstcode": "string",
        "server_id": 0,
        "database_name": "string",
        "jstonerror": "f",
        "report_template_id": 0
      }
    ],
    "changed": [
      {
        "jstid": 0,
        "jstname": "string",
        "jstdesc": "string",
        "jstenabled": true,
        "jstkind": true,
        "jstcode": "string",
        "server_id": 0,
        "database_name": "string",
        "jstonerror": "f",
        "report_template_id": 0,
        "jstnextrun": "string"
      }
    ]
  },
  "jschedules": {
    "added": [
      {
        "jscname": "string",
        "jscdesc": "string",
        "jscenabled": true,
        "jscstart": "2023-10-09 22:43 +05:30",
        "jscend": "2023-10-11 22:43 +05:30",
        "jscweekdays": [
          "Friday"
        ],
        "jscmonthdays": [
          1,
          15
        ],
        "jscmonths": [
          "January",
          "February",
          "March",
          "April",
          "May",
          "June",
          "July",
          "August",
          "September",
          "October",
          "November",
          "December"
        ],
        "jschours": [
          16
        ],
        "jscminutes": [
          0,
          30
        ],
        "jscexceptions": [
          {
            "jexdate": "2023-10-19",
            "jextime": "09:39:00"
          }
        ],
        "jsctimezone": "America/New_York"
      }
    ],
    "changed": [
      {
        "jscid": 0,
        "jscname": "string",
        "jscdesc": "string",
        "jscenabled": true,
        "jscstart": "2023-10-09 22:43 +05:30",
        "jscend": "2023-10-11 22:43 +05:30",
        "jscweekdays": [
          "Friday"
        ],
        "jscmonthdays": [
          1,
          15
        ],
        "jscmonths": [
          "January",
          "February",
          "March",
          "April",
          "May",
          "June",
          "July",
          "August",
          "September",
          "October",
          "November",
          "December"
        ],
        "jschours": [
          16
        ],
        "jscminutes": [
          0,
          30
        ],
        "jscexceptions": [
          {
            "jexdate": "2023-10-19",
            "jextime": "09:39:00"
          }
        ],
        "jsctimezone": "America/New_York"
      }
    ]
  },
  "notify": "DEFAULT",
  "email_group_id": "string"
}

Parameters

NameInTypeRequiredDescription
agent_idpathintegertrueAgent ID
job_idpathintegertrueJob ID
X-Auth-TokenheaderstringtrueToken of authorization
bodybodyAgentJobBodyPuttruenone

Example responses

Responses

StatusMeaningDescriptionSchema
200OKStatus 200None

Response Schema

Info

This operation does not require authentication

delete__agent_job_{agent_id}_{job_id}

Code samples

DELETE /agent/job/{agent_id}/{job_id}

Deletes the Job using agent_id and job_id.

Parameters

NameInTypeRequiredDescription
agent_idpathintegertrueAgent ID
job_idpathintegertrueJob ID
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

Responses

StatusMeaningDescriptionSchema
200OKSuccessful deletionNone

Response Schema

Info

This operation does not require authentication