Getting information about scheduled jobs¶
You can get information about scheduled jobs.
Method and URI¶
To get information about all scheduled jobs, use a GET method and a URI:
GET https://{hostname|IPv4}/api/endeavour/job
To get information about a specific scheduled job, use a GET method and a URI:
GET https://{hostname|IPv4}/api/endeavour/job/{jobId}
Tip
To get a {jobId}
value based on the name of the scheduled job, follow the instructions in Getting a {jobId}.
Parameters¶
None.
Data¶
None.
Example 1: Get information about all scheduled jobs¶
A Python snippet that is similar to the following example can be used to request a list of all scheduled jobs and their information.
requests.get('https://' + spp_ipv4 + '/api/endeavour/job',
headers={...}, verify=...)
{
"links": {...},
"total": 18,
"page": 1,
"jobs": [
{
"links": {...},
"name": "Maintenance",
"description": "Auto-generated job for maintenance",
"policyId": "1001",
"policyName": "Maintenance",
"type": "maintenance",
"typeDisplayName": "Maintenance",
"subType": "maintenance",
"subTypeDisplayName": "Maintenance",
"serviceId": "com.syncsort.dp.xsb.serviceprovider.maintenance",
"displayName": "Maintenance",
"status": "IDLE",
"statusDisplayName": "Idle",
"lastSessionStatus": "COMPLETED",
"lastSessionStatusDisplayName": "Completed",
"triggerIds": [
"1001"
],
"triggerData": [
{
"triggerId": "1001",
"triggerInfo": null
}
],
"lastRunTime": 1589151600156,
"nextFireTime": 1589238000000,
"lastSessionDuration": 5135140,
"tenantId": 1000,
"actions": null,
"statistics": null,
"lastrun": {
"sessionId": "1589151600106",
"jobName": "Maintenance",
"type": "maintenance",
"subType": "maintenance",
"serviceId": "serviceprovider.maintenance",
"start": 1589151600156,
"end": 1589156735296,
"duration": 5135140,
"status": "COMPLETED",
"results": "COMPLETED",
"properties": null,
"numTasks": 14,
"previousLastTask": 0,
"lastUpdate": 1589156735306,
"percent": 100,
"policySnapshot": null
},
"id": "1001"
},
{
"links": {...},
"name": "Storage Server Inventory",
"description": "Auto-generated job for maintenance",
"policyId": "1002",
"policyName": "Storage Server Inventory",
"type": "catalog",
"typeDisplayName": "Catalog",
"subType": "storage",
"subTypeDisplayName": "Storage",
"serviceId": "serviceprovider.catalog.storage",
"displayName": "Storage Server Inventory",
"status": "IDLE",
"statusDisplayName": "Idle",
"lastSessionStatus": "PARTIAL",
"lastSessionStatusDisplayName": "Partial",
"triggerIds": [
"1002"
],
"triggerData": [
{
"triggerId": "1002",
"triggerInfo": null
}
],
"lastRunTime": 1589145300278,
"nextFireTime": 1589231700000,
"lastSessionDuration": 26231,
"tenantId": 1000,
"actions": null,
"statistics": null,
"lastrun": {...},
"id": "1002"
},
{
"links": {...},
"name": "Application Server Inventory",
"description": null,
"policyId": "1003",
"policyName": "Application Server Inventory",
"type": "catalog",
"typeDisplayName": "Catalog",
"subType": "application",
"subTypeDisplayName": "Application",
"serviceId": "serviceprovider.catalog.application",
"displayName": "Application Server Inventory",
...,
"id": "1003"
},
{
"links": {...},
"name": "Hypervisor Inventory",
"description": null,
"policyId": "1004",
"policyName": "Hypervisor Inventory",
"type": "catalog",
"typeDisplayName": "Catalog",
"subType": "hypervisor",
"subTypeDisplayName": "Hypervisor",
...,
"id": "1004"
},
{
"links": {...},
"name": "oracle_Gold",
"description": "",
"policyId": "1005",
"policyName": "oracle_Gold",
"type": "protection",
"typeDisplayName": "Protection",
"subType": "oracle",
"subTypeDisplayName": "Oracle",
"serviceId": "serviceprovider.protection.application",
"displayName": "Application / File System Protection",
...
"id": "1005"
},
{
"links": {...},
"name": "oracle_Silver",
...
"id": "1006"
},
{
"links": {...},
"name": "sql_Gold",
"description": "",
"policyId": "1011",
"policyName": "sql_Gold",
"type": "protection",
"typeDisplayName": "Protection",
"subType": "sql",
"subTypeDisplayName": "SQL",
"serviceId": "serviceprovider.protection.application",
"displayName": "Application / File System Protection",
...,
"id": "1011"
},
{...},
{
"links": {...},
"name": "hyperv_Gold",
"description": "",
"policyId": "1014",
"policyName": "hyperv_Gold",
"type": "protection",
"typeDisplayName": "Protection",
"subType": "hyperv",
"subTypeDisplayName": "Hyper-V",
"serviceId": "serviceprovider.protection.hypervisor",
"displayName": "Hypervisor Backup",
...,
"id": "1014"
},
{
"links": {...},
"name": "Report_vSnap Storage Utilization",
"description": "Auto-generated job for Policy Report_vSnap Storage U
↪tilization",
"policyId": "1023",
"policyName": "Report_vSnap Storage Utilization",
"type": "analyze",
"typeDisplayName": "Analyze",
"subType": "report",
"subTypeDisplayName": "Report",
"serviceId": "serviceprovider.report",
"displayName": "Report",
...,
"id": "1023"
},
{
"links": {...},
"name": "Report_vSnapStorageUtilization-Dallas1",
"description": "Auto-generated job for Policy Report_vSnapStorageUtiliz
↪ation-Dallas1",
"policyId": "1028",
"policyName": "Report_vSnapStorageUtilization-Dallas1",
...,
"id": "1024"
},
...,
{
"links": {...},
"name": "vmware_Diamond",
...
"id": "1043"
},
...
]
}
The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).
Example 2: Get information about a specific scheduled job¶
Assume that you added an scheduled job, Diamond ({slapolicyId}
2101), to IBM Spectrum Protect Plus.
A Python snippet that is similar to the following example can be used to request information about this scheduled job:
sla_id = "2101"
requests.delete('https://' + spp_ipv4 + '/ngp/slapolicy/' + sla_id,
headers={...}, verify=...)
The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).
{
"links": {...},
"name": "vmware_Diamond",
"description": "",
"policyId": "1050",
"policyName": "vmware_Diamond",
"type": "protection",
"typeDisplayName": "Protection",
"subType": "vmware",
"subTypeDisplayName": "VMware",
"serviceId": "serviceprovider.protection.hypervisor",
"displayName": "Hypervisor Backup",
"status": "IDLE",
"statusDisplayName": "Idle",
"lastSessionStatus": "PARTIAL",
"lastSessionStatusDisplayName": "Partial",
"triggerIds": [
"1049"
],
"triggerData": [
{
"triggerId": "1049",
"triggerInfo": {
"subpolicy_id": "VM Replication0(2113)"
}
}
],
"lastRunTime": 1589176802081,
"nextFireTime": 1589263200000,
"lastSessionDuration": 8154,
"tenantId": 1000,
"actions": null,
"statistics": null,
"lastrun": {
"sessionId": "1589176800026",
"jobName": "vmware_Diamond",
"type": "protection",
"subType": "vmware",
"serviceId": "serviceprovider.protection.hypervisor",
"start": 1589176802081,
"end": 1589176810235,
"duration": 8154,
"status": "PARTIAL",
"results": null,
"properties": {
"statistics": [
{
"resourceType": "vm",
"total": 0,
"success": 0,
"failed": 0,
"skipped": 0,
"names": null,
"jobSessionId": 0,
"policyId": null,
"startTime": 0
},
{
"resourceType": "datastore",
"total": 0,
"success": 0,
"failed": 0,
"skipped": null,
"names": null,
"jobSessionId": 0,
"policyId": null,
"startTime": 0
}
]
},
"numTasks": 2,
"previousLastTask": 0,
"lastUpdate": 1589176810260,
"percent": 0,
"policySnapshot": null
},
"id": "1043"
}