Diagnostic/snap/{snapPath}/pmr/{pmrID}: PUT

Uploads a snap file to a PMR. A snap file comprises the diagnostic data that is collected by the gpfs.snap command.

Availability

Available on all IBM Storage Scale editions.

Description

The PUT diagnostic/snap/{snapPath}/pmr/{pmrID} request uploads the snap file to a support case based on a specific PMR ID. For more information about the fields in the data structures that are returned, see gpfs.snap command.

Request URL

https://<IP address or host name of API server>:<port>/scalemgmt/v2/diagnostic/snap/{snapPath}/pmr/{pmrID}
where
snap/snapPath
The snap file that will be uploaded and its location. Required.
pmr/pmrID
The PMR ID to which the snap file will be associated. Required.

Request headers

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

Parameters

The following parameters can be used in the request URL to customize the request:
Table 1. List of parameters
Parameter name Description and applicable keywords Required/optional
snapPath The snap file path Required.
pmrID The PMR ID with which the snap file is associated. Required.

Request data

No request data

Response data

{
  "jobs": [
    {
      "jobId": ID,
      "status": "RUNNING| COMPLETED | FAILED",
      "submitted": "Date and Time",
      "completed": "Date and Time",
      "runtime": Time,
      "request": {
        "type": "PUT |POST|GET|DELETE",
        "url": "URL "
      },
      "result": {},
      "pids": []
    }
  ],
  "status": {
    "code": ReturnCode,
    "message": "Return Message."
  }
}
For more information about the fields in the following data structures, see the links at the end of this topic.
"jobs":
An array of elements that describe jobs. Each element describes one job.
"jobId":"ID",
The unique ID of the job.
"status":"RUNNING| COMPLETED | FAILED"
The status of the job
"submitted":"Time"
The time at which the job was submitted.
"completed":"Time"
The time at which the job was completed.
"runtime":Time"
The job runtime
"request"
type:"GET|POST|PUT|DELETE
The HTTP request type
"URL":URL
The URL through which the job is submitted
"result"
The request result
"pids
The array of persistent identifiers.
"status":
Return status.
"message": "ReturnMessage",
The return message.
"code": ReturnCode
The return code.

Examples

The following example uploads the snap file to the pmr location/pmr/TS123456789.

Request data:
curl -k -u user:password -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic YWRtaW46YWRtaW4wMDE=' 'https://198.51.100.1:443/scalemgmt/v2/diagnostic/snap/%2Ftmp%2Fgpfs.snapOut%2F397370%2Fall.20210128091305.397370.tar/pmr/TS123456789' 
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": "RUNNING",
      "submitted": "2021-01-29 06:52:29,970",
      "completed": "N/A",
      "runtime": 71,
      "request": {
        "type": "PUT",
        "url": "/scalemgmt/v2/diagnostic/snap/%2Ftmp%2Fgpfs.snapOut%2F397370%2Fall.20210128091305.397370.tar/pmr/TS123456789"
      },
      "result": {},
      "pids": []
    }
  ],
  "status": {
    "code": 202,
    "message": "The request was accepted for processing."
  }
}