EDB Postgres Enterprise Manager REST APIs v12.0: Agent Job v10.2

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": "Monday",
      "jscmonthdays": 1,
      "jscmonths": "January",
      "jschours": 0,
      "jscminutes": 0,
      "jscexceptions": [
        {
          "jexdate": "2023-10-19",
          "jextime": "09:39:00"
        }
      ],
      "jsctimezone": "Asia/Calcutta"
    }
  ],
  "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
{
  "jobname": "string",
  "jobenabled": true,
  "jobdesc": "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": [
        true
      ],
      "jscmonthdays": [
        true
      ],
      "jscmonths": [
        true
      ],
      "jschours": [
        true
      ],
      "jscminutes": [
        true
      ],
      "jscexceptions": [
        null
      ],
      "jsctimezone": "string"
    }
  ],
  "notify": "string",
  "email_group_id": "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"
      }
    ],
    "changed": [
      {
        "jstid": 0,
        "jstname": "string",
        "jstdesc": "string",
        "jstenabled": true,
        "jstkind": true,
        "jstcode": "string",
        "server_id": 0,
        "database_name": "string",
        "jstonerror": "f",
        "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": "Monday",
        "jscmonthdays": 1,
        "jscmonths": "January",
        "jschours": 0,
        "jscminutes": 0,
        "jscexceptions": [
          {
            "jexdate": "2023-10-19",
            "jextime": "09:39:00"
          }
        ],
        "jsctimezone": "Asia/Calcutta"
      }
    ],
    "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": "Monday",
        "jscmonthdays": 1,
        "jscmonths": "January",
        "jschours": 0,
        "jscminutes": 0,
        "jscexceptions": [
          {
            "jexdate": "2023-10-19",
            "jextime": "09:39:00"
          }
        ],
        "jsctimezone": "Asia/Calcutta"
      }
    ]
  },
  "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