File System Api
FsRestfulApi class
create new Dir
Interface address:/api/rest_j/v1/filesystem/createNewDir
Request method: POST
Request data type: application/json
Response data type: */*
Interface description:
Create a new Dir
Request Parameters:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
|---|---|---|---|---|---|
| path | path | true | String | String |
Response Status:
| Status code | Description | schema |
|---|---|---|
| 200 | OK | Message |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response parameters:
| parameter name | parameter description | type | schema |
|---|---|---|---|
| data | Dataset | object | |
| message | Description | string | |
| method | request url | string | |
| status | Status | integer(int32) | integer(int32) |
Sample Response:
1. {
2. "data": {},
3. "message": "",
4. "method": "",
5. "status": 0
6. }
create new file
Interface address: /api/rest_j/v1/filesystem/createNewFile
Request method: POST
Request data type: application/json
Response data type: */*
Interface description:
Create a new file
Request Parameters:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
|---|---|---|---|---|---|
| path | path | true | String | String |
Response Status:
| Status code | Description | schema |
|---|---|---|
| 200 | OK | Message |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response parameters:
| parameter name | parameter description | type | schema |
|---|---|---|---|
| data | Dataset | object | |
| message | Description | string | |
| method | request url | string | |
| status | Status | integer(int32) | integer(int32) |
Sample Response:
1. {
2. "data": {},
3. "message": "",
4. "method": "",
5. "status": 0
6. }
delete dir file or file
Interface address: /api/rest_j/v1/filesystem/deleteDirOrFile
Request method: POST
Request data type: application/json
Response data type: */*
Interface description:
Delete dir file or file
Request Parameters:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
|---|---|---|---|---|---|
| path | address | true | String | String |
Response Status:
| Status code | Description | schema |
|---|---|---|
| 200 | OK | Message |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response parameters:
| parameter name | parameter description | type | schema |
|---|---|---|---|
| data | Dataset | object | |
| message | Description | string | |
| method | request url | string | |
| status | Status | integer(int32) | integer(int32) |
Sample Response:
1. {
2. "data": {},
3. "message": "",
4. "method": "",
5. "status": 0
6. }
download
Interface address:/api/rest_j/v1/filesystem/download
Request method: POST
Request data type: application/json
Response data type: */*
Interface description:
Download
Request Parameters:
| Parameter name | Parameter description | Required | Request type | Data type | schema |
|---|---|---|---|---|---|
| charset | Charset | true | String | String | |
| path | address | true | String | String |
Response Status:
| Status code | Description | schema |
|---|---|---|
| 200 | OK | Message |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response parameters:
| parameter name | parameter description | type | schema |
|---|---|---|---|
| data | Dataset | object | |
| message | Description | string | |
| method | request url | string | |
| status | Status | integer(int32) | integer(int32) |
Sample Response:
1. {
2. "data": {},
3. "message": "",
4. "method": "",
5. "status": 0
6. }
file info
Interface address:/api/rest_j/v1/filesystem/fileInfo
Request method: GET
Request data type: application/x-www-form-urlencoded
Response data type: */*
Interface Description:
File Information
Request Parameters:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
|---|---|---|---|---|---|
| path | address | query | true | string | |
| pageSize | page size | query | false | ref |
Response Status:
| Status code | Description | schema |
|---|---|---|
| 200 | OK | Message |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response parameters:
| parameter name | parameter description | type | schema |
|---|---|---|---|
| data | Dataset | object | |
| message | Description | string | |
| method | request url | string | |
| status | Status | integer(int32) | integer(int32) |
Sample Response:
1. {
2. "data": {},
3. "message": "",
4. "method": "",
5. "status": 0
6. }
format
Interface address:/api/rest_j/v1/filesystem/formate
Request method: GET
Request data type: application/x-www-form-urlencoded
Response data type: */*
Interface description:
resultsets converted to Excel
Request Parameters:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
|---|---|---|---|---|---|
| encoding | encoding | query | true | string | |
| escapeQuotes | escapeQuotes | query | true | string | |
| fieldDelimiter | Field Delimiter | query | true | string | |
| hasHeader | Hash value | query | true | boolean | |
| quote | quote | query | true | string | |
| path | address | query | false | string |
Response Status:
| Status code | Description | schema |
|---|---|---|
| 200 | OK | Message |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response parameters:
| parameter name | parameter description | type | schema |
|---|---|---|---|
| data | Dataset | object | |
| message | Description | string | |
| method | request url | string | |
| status | Status | integer(int32) | integer(int32) |
Sample Response:
1. {
2. "data": {},
3. "message": "",
4. "method": "",
5. "status": 0
6. }
function list
Interface address:/api/rest_j/v1/filesystem/getDirFileTrees
Request method: GET
Request data type: application/x-www-form-urlencoded
Response data type: */*
Interface description:
Get a list of udf functions
Request Parameters:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
|---|---|---|---|---|---|
| path | request path | query | true | string |
Response Status:
| Status code | Description | schema |
|---|---|---|
| 200 | OK | Message |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response parameters:
| parameter name | parameter description | type | schema |
|---|---|---|---|
| data | Dataset | object | |
| message | Description | string | |
| method | request url | string | |
| status | Status | integer(int32) | integer(int32) |
Sample Response:
1. {
2. "method": "/api/filesystem/getDirFileTrees",
3. "status": 0,
4. "message": "OK",
5. "data": {
6. "dirFileTrees": {
7. "name": "",
8. "path": "",
9. "properties": null,
10. "children": [{
11. "name": "",
12. "path": "",
13. "properties": {
14. "size": "",
15. "modifytime": ""
16. },
17. "children": ,
18. "isLeaf": ,
19. "parentPath": ""
20. }],
21. "isLeaf": ,
22. "parentPath":
23. }
24. }
25. }
root path
Interface address:/api/rest_j/v1/filesystem/getUserRootPath
Request method: GET
Request data type: application/x-www-form-urlencoded
Response data type: */*
Interface description:
Get root path
Request Parameters:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
|---|---|---|---|---|---|
| pathType | FileType | query | false | string |
Response Status:
| Status code | Description | schema |
|---|---|---|
| 200 | OK | Message |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response parameters:
| parameter name | parameter description | type | schema |
|---|---|---|---|
| data | Dataset | object | |
| message | Description | string | |
| method | request url | string | |
| status | Status | integer(int32) | integer(int32) |
Sample Response:
1. {
2. "data": {},
3. "message": "",
4. "method": "",
5. "status": 0
6. }
does it exist
Interface address: /api/rest_j/v1/filesystem/isExist
Request method: GET
Request data type: application/x-www-form-urlencoded
Response data type: */*
Interface description:
Whether it exists
Request Parameters:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
|---|---|---|---|---|---|
| path | address | query | true | string |
Response Status:
| Status code | Description | schema |
|---|---|---|
| 200 | OK | Message |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response parameters:
| parameter name | parameter description | type | schema |
|---|---|---|---|
| data | Dataset | object | |
| message | Description | string | |
| method | request url | string | |
| status | Status | integer(int32) | integer(int32) |
Sample Response:
1. {
2. "data": {},
3. "message": "",
4. "method": "",
5. "status": 0
6. }
open a file
Interface address: /api/rest_j/v1/filesystem/openFile
Request method: GET
Request data type: application/x-www-form-urlencoded
Response data type: */*
Interface description:
Open file
Request Parameters:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
|---|---|---|---|---|---|
| path | address | query | true | string | |
| charset | Charset | query | false | string | |
| page | page number | query | false | ref | |
| pageSize | page size | query | false | ref |
Response Status:
| Status code | Description | schema |
|---|---|---|
| 200 | OK | Message |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response parameters:
| parameter name | parameter description | type | schema |
|---|---|---|---|
| data | Dataset | object | |
| message | Description | string | |
| method | request url | string | |
| status | Status | integer(int32) | integer(int32) |
Sample Response:
1. {
2. "method": "/api/filesystem/openFile",
3. "status": 0,
4. "message": "OK",
5. "data": {
6. "metadata": [{
7. "columnName": "_c0",
8. "comment": "NULL",
9. "dataType": ""
10. }],
11. "totalPage": ,
12. "totalLine": ,
13. "page": ,
14. "type": "",
15. "fileContent": [
16. [""]
17. ]
18. }
19. }
Turn on logging
Interface address:/api/rest_j/v1/filesystem/openLog
Request method: GET
Request data type: application/x-www-form-urlencoded
Response data type: */*
Interface description:
Open logging
Request Parameters:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
|---|---|---|---|---|---|
| path | address | query | false | string | |
| proxyUser | Proxy User | query | false | string |
Response Status:
| Status code | Description | schema |
|---|---|---|
| 200 | OK | Message |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response parameters:
| parameter name | parameter description | type | schema |
|---|---|---|---|
| data | Dataset | object | |
| message | Description | string | |
| method | request url | string | |
| status | Status | integer(int32) | integer(int32) |
Sample Response:
1. {
2. "method": "/api/filesystem/openLog",
3. "status": 0,
4. "message": "OK",
5. "data": {
6. "log": ["", ""]
7. }
8. }
Rename
Interface address:/api/rest_j/v1/filesystem/rename
Request method: POST
Request data type: application/json
Response data type: */*
Interface description:
Rename the file
Request Parameters:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
|---|---|---|---|---|---|
| newDest | new name | false | String | String | |
| oldDest | old name | false | String | String |
Response Status:
| Status code | Description | schema |
|---|---|---|
| 200 | OK | Message |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response parameters:
| parameter name | parameter description | type | schema |
|---|---|---|---|
| data | Dataset | object | |
| message | Description | string | |
| method | request url | string | |
| status | Status | integer(int32) | integer(int32) |
Sample Response:
1. {
2. "data": {},
3. "message": "",
4. "method": "",
5. "status": 0
6. }
Convert the result set to Excel
Interface address: /api/rest_j/v1/filesystem/resultsetToExcel
Request method: GET
Request data type: application/x-www-form-urlencoded
Response data type: */*
Interface description:
Convert the result set to Excel
Request Parameters:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
|---|---|---|---|---|---|
| autoFormat | Auto | query | false | boolean | |
| charset | result set | query | false | string | |
| csvSeerator | csv Separator | query | false | string | |
| limit | limit | query | false | ref | |
| nullValue | null value | query | false | string | |
| outputFileName | Output file name | query | false | string | |
| outputFileType | Output file type | query | false | string | |
| path | address | query | false | string | |
| quoteRetouchEnable | Whether to quote modification | query | false | boolean | |
| sheetName | sheet name | query | false | string |
Response Status:
| Status code | Description | schema |
|---|---|---|
| 200 | OK | Message |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response parameters:
| parameter name | parameter description | type | schema |
|---|---|---|---|
| data | Dataset | object | |
| message | Description | string | |
| method | request url | string | |
| status | Status | integer(int32) | integer(int32) |
Sample Response:
1. {
2. "data": {},
3. "message": "",
4. "method": "",
5. "status": 0
6. }
Convert resultsets to Excel
Interface address:/api/rest_j/v1/filesystem/resultsetsToExcel
Request method: GET
Request data type: application/x-www-form-urlencoded
Response data type: */*
Interface description:
resultsets converted to Excel
Request Parameters:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
|---|---|---|---|---|---|
| autoFormat | Auto | query | true | boolean | |
| limit | limit | query | true | ref | |
| nullValue | null value | query | true | string | |
| outputFileName | Output file name | query | true | string | |
| path | address | query | false | string |
Response Status:
| Status code | Description | schema |
|---|---|---|
| 200 | OK | Message |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response parameters:
| parameter name | parameter description | type | schema |
|---|---|---|---|
| data | Dataset | object | |
| message | Description | string | |
| method | request url | string | |
| status | Status | integer(int32) | integer(int32) |
Sample Response:
1. {
2. "data": {},
3. "message": "",
4. "method": "",
5. "status": 0
6. }
save the script
Interface address:/api/rest_j/v1/filesystem/saveScript
Request method: POST
Request data type: application/json
Response data type: */*
Interface description:
Save script
Request Parameters:
| Parameter name | Parameter description | Required | Request type | Data type | schema |
|---|---|---|---|---|---|
| path | address | true | String | String | |
| SaveScript | json | body | true | SaveScript | SaveScript |
| charset | Charset | false | String | String | |
| params | Page Size | false | Object | Object | |
| scriptContent | page number | false | String | String |
Response Status:
| Status code | Description | schema |
|---|---|---|
| 200 | OK | Message |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response parameters:
| parameter name | parameter description | type | schema |
|---|---|---|---|
| data | Dataset | object | |
| message | Description | string | |
| method | request url | string | |
| status | Status | integer(int32) | integer(int32) |
Sample Response:
1. {
2. "data": {},
3. "message": "",
4. "method": "",
5. "status": 0
6. }
upload
Interface address:/api/rest_j/v1/filesystem/upload
Request method: POST
Request data type: application/json
Response data type: */*
Interface description:
Upload files, multiple files can be uploaded
Request Parameters:
| Parameter name | Parameter description | Request type | Required | Data type | schema |
|---|---|---|---|---|---|
| file | file | formData | false | ref | |
| path | address | query | false | string |
Response Status:
| Status code | Description | schema |
|---|---|---|
| 200 | OK | Message |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response parameters:
| parameter name | parameter description | type | schema |
|---|---|---|---|
| data | Dataset | object | |
| message | Description | string | |
| method | request url | string | |
| status | Status | integer(int32) | integer(int32) |
Sample Response:
1. {
2. "data": {},
3. "message": "",
4. "method": "",
5. "status": 0
6. }
