Getting certificate information¶
You can get certificate information.
Method and URI¶
To get information about all certificates, use a GET method with a URI:
GET https://{hostname|IPv4}/api/security/certificate
To get information about a specific certificate, use a GET method with a URI:
GET https://{hostname|IPv4}/api/security/certificate/{certificateId}
Tip
To get a {certificateId}
value based on its name, follow the instructions in Getting a {certificateId}.
Parameters¶
None.
Data¶
None.
Example 1: Get information about all certificates¶
Assume that you want to get information about all certificates.
A Python snippet that is similar to the following example can be used to get information about all certificates:
requests.get('https://' + spp_ipv4 + '/api/security/certificate',
headers={...}, verify=...)
The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).
{
"links": {...},
"total": 3,
"certificates": [
{
"links": {...}
},
"name": "BlueMachines - Cert IBM Spectrum Protect",
"displayName": null,
"id": 1286,
"storeId": "1286",
"type": "sp",
"lastUpdated": 1577858400000,
"comment": null,
"rbacPath": "root:0/certificate:0/certificate.type:sp/certificate:1286"
},
{
"links": {...},
"name": "BlueMachines - Cert IBM Cloud Object Storage",
"displayName": null,
"id": 1287,
"storeId": "1287",
"type": "cos",
"lastUpdated": 1580536800000,
"comment": null,
"rbacPath": "root:0/certificate:0/certificate.type:cos/certificate:1287"
},
{
"links": {...},
"name": "BlueMachines - Cert S3 Compatible Object Storage",
"displayName": null,
"id": 1288,
"storeId": "1288",
"type": "aws",
"lastUpdated": 1587187549571,
"comment": null,
"rbacPath": "root:0/certificate:0/certificate.type:aws/certificate:1288"
}
]
}

Figure 63 The same action can be taken in the IBM Spectrum Protect Plus web user interface: In the navigation pane, click System Configuration > Keys and Certificates, and click the Certificates tab.¶
Example 2: Get information about a specific certificate¶
Assume that you want to get information about the following certificate: BlueMachines - Cert IBM Spectrum Protect ({certificateId}
1286). A Python snippet that is similar to the following example can be used to request the information about this certificate:
certificate_id = "1286"
requests.get('https://' + spp_ipv4 + '/api/security/certificate/'
+ certificate_id,
headers={...}, params=_params, data=_data, verify=...)
The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).
{
"links": {...},
"name": "BlueMachines - Cert IBM Spectrum Protect",
"displayName": null,
"id": 1286,
"storeId": "1286",
"type": "sp",
"lastUpdated": 1587187415947,
"comment": null,
"rbacPath": "root:0/certificate:0/certificate.type:sp/certificate:1286"
}