Agent Job#

get_agent_job{agent_id}#

Code samples

#  You can also use wget

curl -X GET https://PEM-SERVER-IP/api/v14/agent/job/{agent_id} \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.get(https://PEM-SERVER-IP/api/v14/agent/job/{agent_id}, headers = headers)

print(r.json())
const headers = {
  Accept:application/json,
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/api/v14/agent/job/{agent_id},
{
  method: GET,

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /agent/job/{agent_id}

Gets Jobs for agent level by agent_id.

Parameters#

Name

In

Type

Required

Description

agent_id

path

integer

true

Agent ID

X-Auth-Token

header

string

true

Token of authorization

Example responses

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

Responses#

Status

Meaning

Description

Schema

200

Invoking the server installer from the command line

Successful response

Inline

Response Schema#

Status Code 200

Name

Type

Required

Restrictions

Description

anonymous

Query information ]

false

none

none

» jobname

string

false

none

Name of the job.

» jobenabled

boolean

false

none

Determines whether the job is enabled or disabled.

» jobdesc

string

false

none

Description of the job.

Note

This operation does not require authentication

post_agent_job{agent_id}#

Code samples

#  You can also use wget

curl -X POST https://PEM-SERVER-IP/api/v14/agent/job/{agent_id} \
  -H Content-Type: application/json \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Content-Type: application/json,
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.post(https://PEM-SERVER-IP/api/v14/agent/job/{agent_id}, headers = headers)

print(r.json())
const inputBody = {
  "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"
};
const headers = {
  Content-Type:application/json,
  Accept:application/json,
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/api/v14/agent/job/{agent_id},
{
  method: POST,
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

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#

Name

In

Type

Required

Description

agent_id

path

integer

true

Agent ID

X-Auth-Token

header

string

true

Token of authorization

body

body

AgentJobBodyPost

true

none

Example responses

{
  "id": 0
}

Responses#

Status

Meaning

Description

Schema

201

Created

Created Successfully

Inline

Response Schema#

Status Code 201

Name

Type

Required

Restrictions

Description

» id

integer

false

none

Id of the job

Note

This operation does not require authentication

get_agent_job{agent_id}_{job_id}#

Code samples

#  You can also use wget

curl -X GET https://PEM-SERVER-IP/api/v14/agent/job/{agent_id}/{job_id} \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.get(https://PEM-SERVER-IP/api/v14/agent/job/{agent_id}/{job_id}, headers = headers)

print(r.json())
const headers = {
  Accept:application/json,
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/api/v14/agent/job/{agent_id}/{job_id},
{
  method: GET,

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

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

Gets Jobs for agent level by agent_id and job_id.

Parameters#

Name

In

Type

Required

Description

agent_id

path

integer

true

Agent ID

job_id

path

integer

true

Job ID

X-Auth-Token

header

string

true

Token of authorization

Example responses

{
  "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": [
        true
      ],
      "jscmonthdays": [
        true
      ],
      "jscmonths": [
        true
      ],
      "jschours": [
        true
      ],
      "jscminutes": [
        true
      ],
      "jscexceptions": [
        null
      ],
      "jsctimezone": "string"
    }
  ]
}

Responses#

Status

Meaning

Description

Schema

200

Invoking the server installer from the command line

Successful response

AgentJobBodyGet

Note

This operation does not require authentication

put_agent_job{agent_id}_{job_id}#

Code samples

#  You can also use wget

curl -X PUT https://PEM-SERVER-IP/api/v14/agent/job/{agent_id}/{job_id} \
  -H Content-Type: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Content-Type: application/json,
  X-Auth-Token: string
}

r = requests.put(https://PEM-SERVER-IP/api/v14/agent/job/{agent_id}/{job_id}, headers = headers)

print(r.json())
const inputBody = {
  "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"
};
const headers = {
  Content-Type:application/json,
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/api/v14/agent/job/{agent_id}/{job_id},
{
  method: PUT,
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

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#

Name

In

Type

Required

Description

agent_id

path

integer

true

Agent ID

job_id

path

integer

true

Job ID

X-Auth-Token

header

string

true

Token of authorization

body

body

AgentJobBodyPut

true

none

Example responses

Responses#

Status

Meaning

Description

Schema

200

Invoking the server installer from the command line

Status 200

None

Response Schema#

Note

This operation does not require authentication

delete_agent_job{agent_id}_{job_id}#

Code samples

#  You can also use wget

curl -X DELETE https://PEM-SERVER-IP/api/v14/agent/job/{agent_id}/{job_id} \
  -H X-Auth-Token: string
import requests
headers = {
  X-Auth-Token: string
}

r = requests.delete(https://PEM-SERVER-IP/api/v14/agent/job/{agent_id}/{job_id}, headers = headers)

print(r.json())
const headers = {
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/api/v14/agent/job/{agent_id}/{job_id},
{
  method: DELETE,

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

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

Deletes the Job using agent_id and job_id.

Parameters#

Name

In

Type

Required

Description

agent_id

path

integer

true

Agent ID

job_id

path

integer

true

Job ID

X-Auth-Token

header

string

true

Token of authorization

Example responses

Responses#

Status

Meaning

Description

Schema

200

Invoking the server installer from the command line

Successful deletion

None

Response Schema#

Note

This operation does not require authentication