Encryption/clients: GET

Gets information on all the clients that belongs to a specified RKM server.

Availability

Available on all IBM Storage Scale editions.

Description

The GET scalemgmt/v2/encryption/clients request gets the details for all key clients that are associated with an RKM server. For more information about the fields in the data structures that are returned, see the mmkeyserv command in the IBM Storage Scale documentation .

Request URL

https://IP address of API server:<port>/scalemgmt/v2/encryption/clients
where
clients
Specifies the resource of this GET call. Required.

Request headers

Content-Type: application/json
Accept: application/json

Parameters

Table 1. List of parameters
Parameter name Description and applicable keywords Required/Optional
keyServer The name of the server where the client is registered. Optional
clientName The name of the registered client. Optional

Request data

No request data.

Response data

{ 
    "jobs": [
        {
            "jobId": Job ID,
            "status": "Job status ",
            "submitted": "Time and date",
            "completed": "Time and date",
            "runtime": Time,
            "request": {
                "type": "GET | POST | PUT | DELETE",
                "url": "Request URL"
            },
            "result": {
                "progress": [],
                "commands": [
                    "Command name "
                ],
                "stdout": [                
                 {
                   "clientList": [
                  {
                "label": "Client label" 
                "keyServer": "Server name" 
                "tenantName": "Tenant name"
                "clientName": "Client name"
                "certificateExpiration": "Certificate expiration date"
                "certificateType": "Certificate type"    
                }
                ],
                "stderr": [],
                "exitCode": Code            },
            "pids": []
        }
    ],
    "status": {
        "code": Status code,
        "message": "Status message"
    }
}
    }
For more information about the fields in the following data structures, see the links at the end of the topic.
"jobId": "Job ID"
The unique ID of the job.
"status": "RUNNING | COMPLETED | FAILED"
The status of the job.
"submitted": "Time and date"
The time and date when the job was submitted.
"completed": "Time and date"
The time at which the job was completed.
"runtime": "Time and date"
The time that the job took to run.
"request"
"type": "GET | POST | PUT | DELETE"
The request type.
"URL": "Request URL"
The URL through which the job is submitted.
"result"
"progress": Job progress
Progress information for the request.
"commands": "Command name
Array of commands that are run in this job.
"stdout": "message
Request Information.
"label": "Client name label"
The label of the registered client.
"keyServer": "Server name"
The name of the server.
"tenantName": "Tenant name"
The name of the tenant.
"clientName": "Client name"
The name of the registered client.
"certificateExpiration": "Certificate Expiration date "
The date and time of certificate expiration.
"certificateType": "Certificate type"
The type of certificate.
"exitCode":"Exit code"
Exit code of command. Zero indicates success and any other value denotes failure.
"stderr":"Error"
CLI messages from stderr.
"pids": "Process IDs
The process IDs for the job.
"status":
Return status.
"message": "ReturnMessage"
The return message.
"code": ReturnCode
The return code.

Examples

The following example gets information on the key clients that are associated with the RKM server.

Request data:
curl -k -u admin:admin001 -X GET --header 'accept:application/json' 'https://198.51.100.1:443/scalemgmt/v2/encryption/clients'?keyServer=lodestar1.fyre.ibm.com&clientName=myClient1'
Response data:
Note: In the JSON data that is returned, the return code indicates whether the command is successful. The response code 200 indicates that the command successfully retrieved the information. Error code 400 represents an invalid request and 500 represents internal server error.
{
    "jobs": [
        {
            "jobId": 1000000000001,
            "status": "COMPLETED",
            "submitted": "2021-06-20 09:04:41,521",
            "completed": "2021-06-20 09:04:42,129",
            "runtime": 608,
            "request": {
                "type": "GET",
                "url": "/scalemgmt/v2/encryption/clients"
            },
            "result": {
                "progress": [],
                "commands": [
                    "mmkeyserv client show  --server 'lodestar1.fyre.ibm.com' "
                ],
                "stdout": [
                 {
                 "clientList": [
                 {
                 "certificateExpiration": "2024-06-19 06:45:13 (+0000)",
                 "certificateType": "system-generated",
                 "clientName": "myclient2",
                 "keyServer": "lodestar1.fyre.ibm.com",
                 "label": "myclient2",
                 "tenantNames": "devG1"
                  },
                  {
                  "certificateExpiration": "2021-09-18 10:54:08 (+0000)",
                  "certificateType": "system-generated",
                  "clientName": "myclient3",
                  "keyServer": "lodestar1.fyre.ibm.com",
                  "label": "myclient3",
                  "tenantNames": "(none)"
                  }
                  ],
                 "stderr": [],
                 "exitCode": 0
            },
            "pids": []
        }
    ],
    "status": {
        "code": 200,
        "message": "The request finished successfully."
    }
}

Related information

mmkeyserv command in the IBM Storage Scale documentation.