Encryption/tenants: GET

Displays information about tenants and RKM servers.

Availability

Available on all IBM Storage Scale editions.

Description

The GET scalemgmt/v2/encryption/tenants request displays information about tenants and remote key manager (RKM) servers that they are associated with. 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/tenants
where
tenants
Specifies the resource of this GET call.

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 tenant exists. Optional
tenantName The name of the tenant for which details are requested. Optional

Request data

No request data.

Response data

{ 
    "jobs": [
        {
            "jobId": Job ID,
            "status": "RUNNING | COMPLETED | FAILED",
            "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": [
                "keyServer": Key server name"
                "registeredClient": Client details
                "rkmId": "Server ID"
                "tenantName" : "Tenant name" 
                ],
                "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.
"keyServer": Server name"
The server details.
"registeredClient": Client details
The client registered with the server.
"rkmId": "Server ID"
The ID of the RKM server.
"tenantName": "Tenant name"
The name of the tenant.
"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 tenant devg1.

Request data:
curl -k -u admin:admin001 -X GET --header 'accept:application/json' 'https://198.51.100.1:443//scalemgmt/v2/encryption/tenants?keyServer=lodestar1.fyre.ibm.com&tenantName=devG1'
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": 1000000000004,
            "status": "COMPLETED",
            "submitted": "2021-06-18 14:36:37,173",
            "completed": "2021-06-18 14:36:37,377",
            "runtime": 204,
            "request": {
                "type": "GET",
                "url": "/scalemgmt/v2/encryption/tenants"
            },
            "result": {
                "progress": [],
                "commands": [
                    "mmkeyserv tenant show  --server 'lodestar1.fyre.ibm.com' "
                ],
                "stdout": [
                    "devG1",
                    "\tKey Server:          lodestar1.fyre.ibm.com",
                    "\tRegistered Client:   (none)",
                    "\tRKM Id:              (none)",
                    "info: devG1\n\tKey Server:lodestar1.fyre.ibm.com\n\tRegistered 
                    Client:(none)\n\tRKM Id: (none)\n\n"
                ],
                "stderr": [],
                "exitCode": 0
            },
            "pids": []
        }
    ],
    "status": {
        "code": 200,
        "message": "The request finished successfully."
    }
}

Related information

mmkeyserv command in the IBM Storage Scale documentation.