Getting information about SLA policies¶
You can get information about SLA policies.
Method and URI¶
To get information about all SLA policies, use a GET method and a URI:
GET https://{hostname|IPv4}/ngp/slapolicy
To get information about a specific SLA policy, use a GET method and a URI:
GET https://{hostname|IPv4}/ngp/slapolicy/{slapolicyId}
Tip
To get an {slapolicyId}
value based on the name of the SLA policy, follow the instructions in Getting an {slapolicyId}.
Parameters¶
None.
Data¶
None.
Example 1: Get information about all SLA policies¶
A Python snippet that is similar to the following example can be used to request a list of all SLA policies and their information.
requests.get('https://' + spp_ipv4 + '/ngp/slapolicy',
headers={...}, verify=...)

Figure 13 The same action can be taken in the IBM Spectrum Protect Plus web user interface: In the navigation pane, click Manage Protection > Policy Overview, and see the SLA Policies section.¶
The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).
{
"links": {...},
"total": 7,
"slapolicies": [
{
"id": "2000",
"links": {...},
"description": "Gold SLA (hourly) to Primary site",
"name": "Gold",
"type": "backup",
"version": "1.0",
"spec": {
"simple": true,
"subpolicy": [
{
"type": "REPLICATION",
"retention": {
"age": 2
},
"useEncryption": false,
"software": true,
"trigger": {
"frequency": 4,
"type": "HOURLY",
"activateDate": 1564604760000,
"timezone": "America/Chicago"
},
"site": "Primary"
}
]
},
"rbacPath": "root:0/storageprofile:0/storageprofiletype:backup/storag
↪eprofile:2000"
},
{
"id": "2001",
"links": {...},
"description": "Silver SLA (daily) to Primary site",
"name": "Silver",
...
},
{
"id": "2002",
"links": {...},
"description": "Bronze SLA (weekly) to Primary site",
"name": "Bronze",
...,
},
{
"id": "2004",
"links": {...},
"description": "Container SLA (daily) to Primary site",
"name": "Container",
"type": "snapshot_backup",
...,
},
{
"id": "2005",
"links": {...},
"description": "EC2 SLA",
"name": "EC2",
"type": "snapshot",
...,
},
{
"id": "2110",
"links": {...},
"description": null,
"name": "Diamond",
"type": "backup",
...,
},
{
"id": "2111",
"links": {...},
"description": null,
"name": "Sapphire",
"type": "snapshot_backup",
...,
},
{
"id": "2112",
"links": {...},
"description": null,
"name": "Emerald",
"type": "snapshot",
...,
}
]
}
Example 2: Get information about a specific SLA policy¶
Assume that you added an SLA policy, Sapphire ({slapolicyId}
2111) to IBM Spectrum Protect Plus.
A Python snippet that is similar to the following example can be used to request information about this SLA policy:
sla_id = "2111"
requests.get('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).
{
"id": "2111",
"links": {...},
"description": null,
"name": "Sapphire",
"type": "snapshot_backup",
"version": "1.0",
"spec": {
"simple": true,
"subpolicy": [
{
"type": "SNAPSHOT",
"retention": {
"age": 15
},
"trigger": {
"frequency": 1,
"type": "DAILY",
"activateDate": 1588982400000,
"timezone": "America/Chicago"
},
"label": "Sales Kubernetes"
},
{
"type": "REPLICATION",
"software": false,
"retention": {},
"useEncryption": false,
"trigger": {
"frequency": 1,
"type": "DAILY",
"activateDate": 1588986000000,
"timezone": "Asia/Singapore"
},
"site": "Primary"
},
{
"type": "SPPOFFLOAD",
"retention": {},
"target": {
"href": "https://10.0.0.100/api/cloud/2",
"resourceType": "cos",
"id": "2",
"wormProtected": false
},
"trigger": {
"frequency": 1,
"type": "DAILY",
"activateDate": 1589014800000,
"timezone": "America/Chicago"
},
"source": "backup"
},
{
"type": "SPPARCHIVE",
"retention": {
"age": 90
},
"target": {
"href": "https://10.0.0.100/api/cloud/4",
"resourceType": "aws",
"id": "4",
"wormProtected": false
},
"trigger": {
"frequency": 1,
"type": "WEEKLY",
"dowList": [
false,
true,
false,
false,
false,
false,
false,
false
],
"activateDate": 1589018400000,
"timezone": "America/Chicago"
},
"source": "backup"
},
{
"type": "REPLICATION",
"retention": {
"age": 15
},
"useEncryption": false,
"software": true,
"trigger": {
"frequency": 1,
"type": "DAILY",
"activateDate": 1589007600000,
"timezone": "America/Chicago"
},
"site": "Dallas"
}
]
},
"rbacPath": "root:0/storageprofile:0/storageprofiletype:snapshot_backup/stor
↪ageprofile:2111"
}