Report

For the report collection resource, you can use an object value to return another value for the same object.

Getting a {reportIdStr}

IBM Spectrum Protect Plus assigns an ID, {reportIdStr}, to each predefined report and custom report.

Method and URI: To convert the value of an object for a report, use a GET method with a URI:

GET     https://{hostname|IP}/api/endeavour/report/

Path: Response body (JSON) > reports > name & id.

Example: Assume that you have a report, vSnapStorageUtilization-Dallas1. A Python snippet that is similar to the following example can be used to return its {reportIdStr}, 1013:

object_name = "vSnapStorageUtilization-Dallas1"

_response = requests.get('https://' + spp_ipv4 + '/api/report',
    headers={...}, verify=...)

_response_json = json.loads(_response.text)    # Convert to JSON

object_json = _response_json['reports']

for keys in object_json:
    if keys['name'] == object_name:
        object_id = keys['id']

print(object_id)
1013

Getting a {reportHref}

IBM Spectrum Protect Plus assigns a URL, {reportHref}, to each predefined report and custom report.

Method and URI: To convert the value of an object for a report, use a GET method with a URI:

GET     https://{hostname|IP}/api/endeavour/report/

Path: Response body (JSON) > reports > name & links > self > href.

Example: Assume that you have a report, vSnapStorageUtilization-Dallas1. A Python snippet that is similar to the following example can be used to return its {reportHref} value, https://10.0.0.100/api/endeavour/report/1102:

object_name = "vSnapStorageUtilization-Dallas1"

_response = requests.get('https://' + spp_ipv4 + '/api/report',
    headers={...}, verify=...)

_response_json = json.loads(_response.text)    # Convert to JSON

object_json = _response_json['reports']   # Get the specific object

for keys in object_json:
    if keys['name'] == object_name:
        object_href = keys['links']['self']['href']

print(object_href)
https://10.0.0.100/api/endeavour/report/1102

Getting a {reportRbacpath}

The {reportRbacpath} is the system path of the role-based access control (RBAC) permissions that are assigned to each predefined report and custom report.

Method and URI: To convert the value of an object for a report, use a GET method with a URI:

GET     https://{hostname|IP}/api/endeavour/report/

Path: Response body (JSON) > reports > name & rbacPath

Example: Assume that you have a report, vSnapStorageUtilization-Dallas1. A Python snippet that is similar to the following example can be used to return its {reportRbacpath} value.

object_name = "vSnapStorageUtilization-Dallas1"

_response = requests.get('https://' + spp_ipv4 + '/api/report',
    headers={...}, verify=...)

_response_json = json.loads(_response.text)    # Convert to JSON

object_json = _response_json['reports']   # Get the specific object

for keys in object_json:
    if keys['name'] == object_name
        object_value = keys['rbacPath']

print(object_value)
root:0/report:0/reportcategory:BackupStorageUtilizationCategoryName/report:1102