Encryption/tenants: DELETE

Deletes a tenant from the RKM server.

Availability

Available on all IBM Storage Scale editions.

Description

The DELETE /scalemgmt/v2/encryption/tenants request deletes a tenant from the remote key manager (RKM) server. A tenant is an IBM Storage Scale device group that comprises the encryption keys for registered key clients. For more information about the fields in the data structures that are returned, see the mmkeyserv command.

Request URL

https://<IP address or hostname of API server>:<port>/scalemgmt/v2/encryption/ tenants

Request headers


Accept: application/json

Request data

{
  "tenantName": "Tenant name",
  "serverName": "Server name",
  "passwordFile": "Password file"
}
The details of the parameters are given in the following list.
"tenantName": "Tenant name"
The name of the tenant that is deleted.
"serverName": "Server name"
The hostname or the IP address of the RKM server to which the tenant belongs.
"passwordFile": "Password file"
The password file that contains a password for accessing the RKM server. If you do not provide a password, you are prompted for a password when the request is sent. A password must be 1 - 20 characters in length. For more information, see the mmkeyserv command in the IBM Storage Scale documentation.

Response data

{
  "{
  "status": {
    "code": Return Code,
    "message": "String"
  },
  "jobs": [
    {
      "result": {
        "commands": "Array",
        "progress": "Array",
        "exitCode": Integer,
        "stderr": "Array",
        "stdout": "Array"
      },
      "request": {
        "type": "POST| GET | PUT | DELETE",
        "url": "String",
        "data": "String"
      },
      "jobId": Integer,
      "submitted": "Date and Time",
      "completed": "Date and Time",
      "runtime": Integer,
      "status": "RUNNING | CANCELLING | CANCELLED | COMPLETED | FAILED ",
      "pids": "Integer"
    }
  ]
}    }
  ]
}
"status":
Return status.
"message": "ReturnMessage"
The return message.
"code": ReturnCode
The return code.
"jobs"
An array that comprises details on the jobs that were run.
"result":
Specifies the job results.
"commands": Commands executed
Specifies the commands that were issued for the job.
"progress":"Job progress "
Specifies the progress of the job.
"exitCode":"Exit codes"
Specifies the exit code of the command. Zero indicates success while any value other than zero indicates failure.
"stderr":"CLI messages"
Specifies the CLI messages received from stderr.
"stdout":"CLI messages"
Specifies the CLI messages from stdout.
result
Specifies the job results.
"type": "GET | POST | PUT| DELETE
Specifies the HTTP request type.
"URL" : "URL"
Specifies the URL through which the job is submitted.
"Data" : "Request data"
Specifies the request data. Optional.
"jobId": "ID",
Specifies the unique ID of the job.
"submitted": "Date and Time"
Specifies the date and time at which the job was submitted.
"completed": "Date and Time"
Specifies the date and time at which the job was completed.
"runtime": "Duration"
Specifies the duration for which the job ran.
"status":"RUNNING | COMPLETED | FAILED"
Specifies the status of the job.
"pids":"Process ID"
Specifies the process IDs of all the active sub processes that manage the job.

Examples

The following example shows how to delete a tenant:

Request data:
 curl -k -u admin:admin001 -X DELETE --header 'accept:application/json' -d '{ \ 
   "tenantName": "devG1",
  "serverName": "sklm11.fyre.ibm.com",
  "passwordFile": "/tmp/password",
  'https://198.51.100.1:443/scalemgmt/v2/encryption/tenants'

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" : 1000000000002,
    "status" : "COMPLETED",
    "submitted" : "2021-01-30 18:01:45,173",
    "completed" : "2021-01-30 18:01:45,737",
    "runtime" : 566,
    "request" : {
      "type" : "DELETE",
      "url" : "scalemgmt/v2/encryption/tenants"
      "data": " "
    },
    "result" : {
      "progress" : [ ],
      "commands" : [ "mmkeyserv key delete --server 'sklm11.fyre.ibm.com' [--server-pwd '/tmp/password']
   {--all --tenant 'devG1' | --file '1'}" ],
      "stdout" : [ " " ],
      "stderr" : [ ],
      "exitCode" : 0
    },
    "pids" : [ ]
  } ],
  "status" : {
    "code" : 200,
    "message" : "The request finished successfully."
  }
}