-
Notifications
You must be signed in to change notification settings - Fork 2
RestGFSCategory
stockiNail edited this page May 24, 2017
·
8 revisions
The GFS services give you the capability to manage files and folders on global file system.
Provides a collection of files by a filter, currently located a specific folder.
Parameter | Value |
---|---|
URL | /gfs/list/{type}?item=&pathName= |
Method | GET |
Path |
type parameter is mandatory and defined on which file system you are seaching the files. The valid values could be data, library, source, class, binary |
Query |
item parameter is mandatory and contains the relative path of the folder. pathName parameter is optional and the path name when you have more than 1 file systems for DATA. |
Content-Type | application/json |
Accept-Type | application/json |
Body | none |
Status code | Description |
---|---|
200 | OK - Returns a list of GFS files |
400 | Bad Request - The type passed as path parameter is not correct or the item is not valid |
500 | Internal Server Error - The service had an exception |
503 | Service Unavailable - JEM cluster is not available. |
Provides the content of a specific file.
Parameter | Value |
---|---|
URL | /gfs/get/{type}?item=&pathName= |
Method | GET |
Path |
type parameter is mandatory and defined on which file system you are seaching the files. The valid values could be data, library, source, class, binary |
Query |
item parameter is mandatory and contains the relative path of the folder. pathName parameter is optional and the path name when you have more than 1 file systems for DATA. |
Content-Type | application/json |
Accept-Type | application/octet-stream |
Body | none |
Status code | Description |
---|---|
200 | OK - Returns the content of file |
400 | Bad Request - The type passed as path parameter is not correct or the item is not valid |
500 | Internal Server Error - The service had an exception |
503 | Service Unavailable - JEM cluster is not available. |
You can upload a file into GFS.
Parameter | Value |
---|---|
URL | /gfs/put/{type}/{fileCode}?item=&lastUpdate=&lastUpdate=completed= |
Method | POST |
Path |
type parameter is mandatory and defined on which file system you are seaching the files. The valid values could be library, source, class, binary fileCode parameter is mandatory and a single ID to use to save the chunks when several calls must be done. |
Query |
item parameter is mandatory and contains the relative path of the folder. lastUpdate parameter is optional and it is used to set the modified time on destination file. completed parameter is mandatory and it must be a boolean: true means this is last call, otherwise false. |
Content-Type | application/octet-stream |
Accept-Type | text/plain |
Body | the content of the file to upload (a bytes array) |
Status code | Description |
---|---|
200 | OK - Returns true if it was able to updalod the file, otherwise false. The TEXT format is: "true" or "false"
|
204 | No Content - the request doesn't contain any content to upload |
400 | Bad Request - The type passed as path parameter is not correct or the item is not valid |
500 | Internal Server Error - The service had an exception |
503 | Service Unavailable - JEM cluster is not available. |
You can delete a file on GFS.
Parameter | Value |
---|---|
URL | /gfs/delete/{type}?item=&pathName= |
Method | DELETE |
Path |
type parameter is mandatory and defined on which file system you are seaching the files. The valid values could be data, library, source, class, binary |
Query |
item parameter is mandatory and contains the relative path of the folder. pathName parameter is optional and the path name when you have more than 1 file systems for DATA. |
Content-Type | application/json |
Accept-Type | text/plain |
Body | none |
Status code | Description |
---|---|
200 | OK - Returns true if it was able to delete the file, otherwise false. The TEXT format is: "true" or "false"
|
400 | Bad Request - The type passed as path parameter is not correct or the item is not valid |
500 | Internal Server Error - The service had an exception |
503 | Service Unavailable - JEM cluster is not available. |
This section described the JSON format of the BODY parameters to use in the requests and the BODY responses.
It's a collection of GFS files information:
[ file1,..., fileN]
A GFS file is described by the following JSON format:
{
"name" : "name of file",
"longName" : "relative path of file, with name of file",
"dataPathName" : "data path name",
"length" : length of file (Integer),
"lastModified" : last modified UTC (Long),
"directory" : if the file represents a directory (Boolean)
}
- Introduction
- Installation
- Configuration
- Job Execution
- JCL
- User Interfaces
- Security
- REST api
- Features
- Log Messages
- Sandbox
- Software Quality
- Some performance data