Starting a job manually¶
IBM Spectrum Protect Plus can start a service level agreement (SLA) policy in two ways:
An SLA policy for associated instances of hypervisors, application servers and IBM Spectrum Protect Plus catalogs. This is started automatically as the SLA policy defines.
An SLA policy for associated instances of a specific type of hypervisors, application servers or IBM Spectrum Protect Plus. It is started manually regardless of how the SLA policy defines.

Figure 6 The same action can be taken in the IBM Spectrum Protect Plus web user interface: In the navigation pane, click Jobs and Operations and click the Schedule tab. You will see a list of jobs. For the job that you want to start, click Actions > Start.¶
For example, consider you have a custom SLA policy “Diamond” that starts every day at midnight UTC. You associate it with some instances of VMware, Oracle Database and IBM Db2.
In this case, you do not have to create a script to start this SLA policy which has been done automatically by IBM Spectrum Protect Plus. But in some occasions, you want to start it manually. IBM Spectrum Protect Plus offers it by a type of hypervisors, application servers and IBM Spectrum Protect Plus. In that case, the SLA policy name has the prefixes as below:
Prefix |
Product |
---|---|
vmware |
VMware vCenter |
hyperv |
Hyper-V |
oracle |
Oracle Database |
sql |
SQL Server |
db2 |
Db2 |
exch |
Exchange Server |
mongo |
MongoDB |
office365 |
Office 365 |
catalog |
IBM Spectrum Protect Plus |
Method and URI¶
To start a job manually, use a POST method and a URI:
POST https://{hostname|IP}/api/endeavour/job/{slapolicyId}
Tip
To get an {slapolicyId}
value based on its name, follow the instructions in Getting an {slapolicyId}.
Parameters¶
Parameter 1: action
Specify the type of the action.
Value:
inventory
Type: System string. Required. Available in the web interface.
Parameter 2: actionname
Specify the step of the action.
Value:
start
Type: System string. Required. Available in the web interface.
Data¶
None.
Example: Start a job manually¶
Assume that you want to start a job, vmware_Gold ({slapolicyId}
1021), manually.
A Python snippet that is similar to the following example can be used to start a job manually:
sla_id = "1021" # vmware_Gold
_params = {
"action": "start",
"actionname": "start"
}
requests.post('https://' + spp_ipv4 + '/api/endeavour/job/' + sla_id,
headers={...}, params=_params, data="", verify=...)
The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).
{
"links": {...},
"name": "vmware_Gold",
"description": "Auto-generated job for Policy vmware_Gold",
"policyId": "1021",
"policyName": "vmware_Gold",
"type": "protection",
"typeDisplayName": "Protection",
"subType": "vmware",
"subTypeDisplayName": "VMware",
"serviceId": "serviceprovider.protection.hypervisor",
"displayName": "Hypervisor Backup",
"status": "RESOURCE ACTIVE",
"statusDisplayName": "Resource active",
"lastSessionStatus": "PARTIAL",
"lastSessionStatusDisplayName": "Partial",
"triggerIds": [
"1015"
],
"triggerData": [
{
"triggerId": "1015",
"triggerInfo": {
"subpolicy_id": "VADP Backup(2000)"
}
}
],
"lastRunTime": 1576153580805,
"nextFireTime": 1576167979000,
"lastSessionDuration": 3572,
"tenantId": 1000,
"actions": null,
"statistics": null,
"policy": {
"links": {...},
"name": "vmware_Gold",
"type": "protection",
"subType": "vmware",
"serviceId": "serviceprovider.protection.hypervisor",
"description": "",
"version": "3.0",
"rbacPath": "root:0/policy:0/policytype:serviceprovider.protection.hyper
↪visor/policy:1021",
"tenantId": 1000,
"creationTime": 1570192798811,
"lastUpdated": 0,
"spec": {
"source": [],
"storageworkflow": [
{
"id": "2000",
"name": "Gold",
"href": "http://localhost:8082/api/spec/storageprofile/2000"
}
],
"option": {
"maxtasks": 0,
"vmsnapshot": {
"takesnapshot": false,
"concurrentsnapshotsonesx": 3,
"includememory": false,
"consistency": false,
"consistencyvms": [],
"scriptvms": [],
"truncateapplicationlogs": false
},
"skipreadonlydatastores": true
},
"notification": []
},
"logicalDelete": false,
"script": {
"preScript": null,
"postScript": null,
"preSnap": null,
"postSnap": null,
"preGuest": null,
"postGuest": null,
"preGuestSnap": null,
"postGuestSnap": null,
"continueScriptsOnError": false
},
"id": "1021"
},
"triggers": [
{
"links": {...},
"name": "1021__VADP Backup(2000)",
"type": "Schedule",
"category": "INTERNAL",
"triggerInfo": {
"id": 1015,
"name": "1015:1021",
"comment": null,
"creatorId": 0,
"creationTime": 1570192799690,
"type": null,
"flags": 0,
"pk": null,
"triggerId": "1015",
"jobId": "1021",
"triggerInfo": {
"subpolicy_id": "VADP Backup(2000)"
},
"category": "INTERNAL"
},
"properties": {
"activateDate": 1564604779173,
"deactivateDate": null,
"frequency": 4,
"type": "HOURLY",
"dowList": [
false,
false,
false,
false,
false,
false,
false,
false
],
"domList": [
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
]
},
"rbacPath": "trigger:0/trigger:1015",
"onHold": false,
"id": "1015"
}
],
"lastrun": {
"sessionId": "1576153579173",
"jobName": "vmware_Gold",
"type": "protection",
"subType": "vmware",
"serviceId": "serviceprovider.protection.hypervisor",
"start": 1576153580805,
"end": 1576153584377,
"duration": 3572,
"status": "PARTIAL",
"results": null,
"properties": {
"statistics": []
},
"numTasks": 2,
"previousLastTask": 0,
"lastUpdate": 1576153584402,
"percent": 5,
"policySnapshot": null
},
"id": "1021"
}