Filesystems/{filesystemName}/symlink/{linkpath}: POST
Create a symlink for a path from the file system.
Availability
Available on all IBM Storage Scale editions.
Description
The POST filesystems/{filesystemName}/symlink/{linkPath} request creates a symlink for a path from a specific file system.
Request URL
https://management API host:port/scalemgmt/v2/filesystems/filesystemName/symlink/linkPath
where:- filesystem/filesystemName
- Specifies the name of the file system to which the symlink belongs. Required.
- symlink/linkPath
- Specifies the symlink path relative to the file system's mount point. Required.
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 |
---|---|---|
filesystemName | The file system name. | Required. |
linkpath | The symlink path relative to the fileset path. | Required. |
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. This is the target path of the symlink relative to the file system's mount point or fileset path. | Required. |
Request data
{
"filesystemName": "File system name",
"filesetName": "Fileset name",
"relativePath": "Relative path"
}
- "filesystemName": "File system name"
- The name of the file system.
- "filesetName": "Fileset name"
- The name of the fileset.
- "relativePath": "Relative path"
- The target path of the symlink relative to the file system's mount point.
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",
}
],
}
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.
- "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, 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.
Examples
The following example shows how to create a symlink for the file system gpfs0.
Request data:
curl -k -u admin:admin001 -X POST --header 'content-type:application/json' --header 'accept:application/json'
-d '{
"filesystemName": "gpfs0",
"filesetName": "fset1",
"relativePath": "mydir"
}' 'https://198.51.100.1:443/scalemgmt/v2/filesystems/gpfs0/symlink/mydir'
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" : 1000000000005,
"status" : "RUNNING",
"submitted" : "2017-03-14 15:59:34,180",
"completed" : "N/A",
"request" : {
"data" : {
"filesystemName": "gpfs0",
"filesetName": "fset1",
"relativePath": "mydir"
},
"type" : "POST",
"url" : "/scalemgmt/v2/filesystems/gpfs0/symlink/mydir"
},
"result" : { }
} ],
"status" : {
"code" : 202,
"message" : "The request was accepted for processing"
}
}