Access: POST
Sends a request for creating access tokens to allow multiple user roles use the GUI REST API.
Availability
Available on all IBM Storage Scale editions.
Description
The POST access sends a request to create access tokens for multiple user roles allowing them to use the GUI REST API. The access request can be granted only by the security administrator.
Request URL
https://<IP address or host name of API server>:port/scalemgmt/v2/access
Request headers
Accept: application/json
Request parameters
The following parameters can be used in the request URL to customize the
request:
Parameter name | Description and applicable keywords | Required/optional |
---|---|---|
body | Body of the request that contains the required parameters to be passed on to the IBM Storage Scale system to perform the requested operation. | Required. |
Request data
{
"type": "Access request type",
"clusterName": "Cluster name",
"requestingUser": "Requestor Type",
"accessToken": "string",
"authData": "Authentication data"
}
The details of the parameters are provided in the following list:
- "type": "Request type"
- Specifies the type of the access request.
- "clusterName": "Cluster name"
- The name of the cluster from which the request is sent.
- "requestingUser": "Requestor type"
- The name of the user who sent the request.
- "accessToken": "string"
- The access token being requested.
- "authData": "Authentication data"
- Any additional authentication data depending on the type of the request.
Response data
{
"status": {
"code":ReturnCode",
"message":"ReturnMessage"
},
"jobs": [
{
"result":"",
{
"commands":"String",
"progress":"String,
"exitCode":"Exit code",
"stderr":"Error",
"stdout":"String",
},
"request":" ",
{
"type":"{GET | POST | PUT | DELETE}",
"url":"URL",
"data":""",
}
"jobId":"ID",
"submitted":"Time",
"completed":Time",
"status":"Job status",
"pids":"Process IDs
}
],
}
The details of the parameters are provided in the following list:
- "jobs":
- An array of elements that describe jobs. Each element describes one job.
- "status":
- Return status.
- "message": "ReturnMessage",
- The return message.
- "code": ReturnCode
- The return code.
- "result"
-
- "commands":"String'
- Array of commands that are run in this job.
- "progress":"String'
- Progress information for the request.
- "exitCode":"Exit code"
- Exit code of command. Zero is success and nonzero denotes failure.
- "stderr":"Error"
- CLI messages from stderr.
- "stdout":"String"
- CLI messages from stdout.
- "request"
-
- "type":"{GET | POST | PUT | DELETE}"
- HTTP request type.
- "url":"URL"
- The URL through which the job is submitted.
- "data":" "
- Optional.
- "jobId":"ID",
- The unique ID of the job.
- "submitted":"Time"
- The time at which the job was submitted.
- "completed":Time"
- The time at which the job was completed.
- "status":"RUNNING | COMPLETED | FAILED"
- Status of the job.
- "pids":"Process ID"
- The process IDs of all the active sub processes that manage the job.
Examples
The following example shows how to send requests for accessing GUI REST API.
Request data:
curl -k -u admin:admin001 -X POST --header 'content-type:application/json' --header 'accept:application/json'-d '{ \
"type": "USER", \
"clusterName": "gss-cluster-5.localnet.com", \
"requestingUser": "admin", \
"accessToken": "string", \
"authData": { "userName": "admin", "roles": {"admin": "PENDING"},"status": "PENDING"} \
}' 'https://198.51.100.1:443/scalemgmt/v2/access'
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" : 1000000000003,
"status" : "COMPLETED",
"submitted" : "2022-08-01 18:01:45,173",
"completed" : "2022-08-01 18:05:45,737",
"runtime" : 564,
"request" : {
"type" : "POST",
"url" : "/scalemgmt/v2/access"
},
"result" : {
"progress" : [ ],
"commands" : [ " " ],
"stdout" : [ " " ],
"stderr" : [ ],
"exitCode" : 0
},
"pids" : [ ]
} ],
"status" : {
"code" : 200,
"message" : "The request finished successfully."
}
}