Skip to main content
Version: 1.5.0

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 nameParameter descriptionRequest typeRequiredData typeschema
pathpathtrueStringString

Response Status:

Status codeDescriptionschema
200OKMessage
201Created
401Unauthorized
403Forbidden
404Not Found

Response parameters:

parameter nameparameter descriptiontypeschema
dataDatasetobject
messageDescriptionstring
methodrequest urlstring
statusStatusinteger(int32)integer(int32)

Sample Response:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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 nameParameter descriptionRequest typeRequiredData typeschema
pathpathtrueStringString

Response Status:

Status codeDescriptionschema
200OKMessage
201Created
401Unauthorized
403Forbidden
404Not Found

Response parameters:

parameter nameparameter descriptiontypeschema
dataDatasetobject
messageDescriptionstring
methodrequest urlstring
statusStatusinteger(int32)integer(int32)

Sample Response:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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 nameParameter descriptionRequest typeRequiredData typeschema
pathaddresstrueStringString

Response Status:

Status codeDescriptionschema
200OKMessage
201Created
401Unauthorized
403Forbidden
404Not Found

Response parameters:

parameter nameparameter descriptiontypeschema
dataDatasetobject
messageDescriptionstring
methodrequest urlstring
statusStatusinteger(int32)integer(int32)

Sample Response:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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 nameParameter descriptionRequiredRequest typeData typeschema
charsetCharsettrueStringString
pathaddresstrueStringString

Response Status:

Status codeDescriptionschema
200OKMessage
201Created
401Unauthorized
403Forbidden
404Not Found

Response parameters:

parameter nameparameter descriptiontypeschema
dataDatasetobject
messageDescriptionstring
methodrequest urlstring
statusStatusinteger(int32)integer(int32)

Sample Response:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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 nameParameter descriptionRequest typeRequiredData typeschema
pathaddressquerytruestring
pageSizepage sizequeryfalseref

Response Status:

Status codeDescriptionschema
200OKMessage
401Unauthorized
403Forbidden
404Not Found

Response parameters:

parameter nameparameter descriptiontypeschema
dataDatasetobject
messageDescriptionstring
methodrequest urlstring
statusStatusinteger(int32)integer(int32)

Sample Response:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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 nameParameter descriptionRequest typeRequiredData typeschema
encodingencodingquerytruestring
escapeQuotesescapeQuotesquerytruestring
fieldDelimiterField Delimiterquerytruestring
hasHeaderHash valuequerytrueboolean
quotequotequerytruestring
pathaddressqueryfalsestring

Response Status:

Status codeDescriptionschema
200OKMessage
401Unauthorized
403Forbidden
404Not Found

Response parameters:

parameter nameparameter descriptiontypeschema
dataDatasetobject
messageDescriptionstring
methodrequest urlstring
statusStatusinteger(int32)integer(int32)

Sample Response:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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 nameParameter descriptionRequest typeRequiredData typeschema
pathrequest pathquerytruestring

Response Status:

Status codeDescriptionschema
200OKMessage
401Unauthorized
403Forbidden
404Not Found

Response parameters:

parameter nameparameter descriptiontypeschema
dataDatasetobject
messageDescriptionstring
methodrequest urlstring
statusStatusinteger(int32)integer(int32)

Sample Response:

{
"method": "/api/filesystem/getDirFileTrees",
"status": 0,
"message": "OK",
"data": {
"dirFileTrees": {
"name": "",
"path": "",
"properties": null,
"children": [{
"name": "",
"path": "",
"properties": {
"size": "",
"modifytime": ""
},
"children": ,
"isLeaf": ,
"parentPath": ""
}],
"isLeaf": ,
"parentPath":
}
}
}

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 nameParameter descriptionRequest typeRequiredData typeschema
pathTypeFileTypequeryfalsestring

Response Status:

Status codeDescriptionschema
200OKMessage
401Unauthorized
403Forbidden
404Not Found

Response parameters:

parameter nameparameter descriptiontypeschema
dataDatasetobject
messageDescriptionstring
methodrequest urlstring
statusStatusinteger(int32)integer(int32)

Sample Response:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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 nameParameter descriptionRequest typeRequiredData typeschema
pathaddressquerytruestring

Response Status:

Status codeDescriptionschema
200OKMessage
401Unauthorized
403Forbidden
404Not Found

Response parameters:

parameter nameparameter descriptiontypeschema
dataDatasetobject
messageDescriptionstring
methodrequest urlstring
statusStatusinteger(int32)integer(int32)

Sample Response:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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 nameParameter descriptionRequest typeRequiredData typeschema
pathaddressquerytruestring
charsetCharsetqueryfalsestring
pagepage numberqueryfalseref
pageSizepage sizequeryfalseref

Response Status:

Status codeDescriptionschema
200OKMessage
401Unauthorized
403Forbidden
404Not Found

Response parameters:

parameter nameparameter descriptiontypeschema
dataDatasetobject
messageDescriptionstring
methodrequest urlstring
statusStatusinteger(int32)integer(int32)

Sample Response:

{
"method": "/api/filesystem/openFile",
"status": 0,
"message": "OK",
"data": {
"metadata": [{
"columnName": "_c0",
"comment": "NULL",
"dataType": ""
}],
"totalPage": ,
"totalLine": ,
"page": ,
"type": "",
"fileContent": [
[""]
]
}
}

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 nameParameter descriptionRequest typeRequiredData typeschema
pathaddressqueryfalsestring
proxyUserProxy Userqueryfalsestring

Response Status:

Status codeDescriptionschema
200OKMessage
401Unauthorized
403Forbidden
404Not Found

Response parameters:

parameter nameparameter descriptiontypeschema
dataDatasetobject
messageDescriptionstring
methodrequest urlstring
statusStatusinteger(int32)integer(int32)

Sample Response:

{
"method": "/api/filesystem/openLog",
"status": 0,
"message": "OK",
"data": {
"log": ["", ""]
}
}

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 nameParameter descriptionRequest typeRequiredData typeschema
newDestnew namefalseStringString
oldDestold namefalseStringString

Response Status:

Status codeDescriptionschema
200OKMessage
201Created
401Unauthorized
403Forbidden
404Not Found

Response parameters:

parameter nameparameter descriptiontypeschema
dataDatasetobject
messageDescriptionstring
methodrequest urlstring
statusStatusinteger(int32)integer(int32)

Sample Response:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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 nameParameter descriptionRequest typeRequiredData typeschema
autoFormatAutoqueryfalseboolean
charsetresult setqueryfalsestring
csvSeeratorcsv Separatorqueryfalsestring
limitlimitqueryfalseref
nullValuenull valuequeryfalsestring
outputFileNameOutput file namequeryfalsestring
outputFileTypeOutput file typequeryfalsestring
pathaddressqueryfalsestring
quoteRetouchEnableWhether to quote modificationqueryfalseboolean
sheetNamesheet namequeryfalsestring

Response Status:

Status codeDescriptionschema
200OKMessage
401Unauthorized
403Forbidden
404Not Found

Response parameters:

parameter nameparameter descriptiontypeschema
dataDatasetobject
messageDescriptionstring
methodrequest urlstring
statusStatusinteger(int32)integer(int32)

Sample Response:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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 nameParameter descriptionRequest typeRequiredData typeschema
autoFormatAutoquerytrueboolean
limitlimitquerytrueref
nullValuenull valuequerytruestring
outputFileNameOutput file namequerytruestring
pathaddressqueryfalsestring

Response Status:

Status codeDescriptionschema
200OKMessage
401Unauthorized
403Forbidden
404Not Found

Response parameters:

parameter nameparameter descriptiontypeschema
dataDatasetobject
messageDescriptionstring
methodrequest urlstring
statusStatusinteger(int32)integer(int32)

Sample Response:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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 nameParameter descriptionRequiredRequest typeData typeschema
pathaddresstrueStringString
SaveScriptjsonbodytrueSaveScriptSaveScript
charsetCharsetfalseStringString
paramsPage SizefalseObjectObject
scriptContentpage numberfalseStringString

Response Status:

Status codeDescriptionschema
200OKMessage
201Created
401Unauthorized
403Forbidden
404Not Found

Response parameters:

parameter nameparameter descriptiontypeschema
dataDatasetobject
messageDescriptionstring
methodrequest urlstring
statusStatusinteger(int32)integer(int32)

Sample Response:

{
"data": {},
"message": "",
"method": "",
"status": 0
}

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 nameParameter descriptionRequest typeRequiredData typeschema
filefileformDatafalseref
pathaddressqueryfalsestring

Response Status:

Status codeDescriptionschema
200OKMessage
201Created
401Unauthorized
403Forbidden
404Not Found

Response parameters:

parameter nameparameter descriptiontypeschema
dataDatasetobject
messageDescriptionstring
methodrequest urlstring
statusStatusinteger(int32)integer(int32)

Sample Response:

{
"data": {},
"message": "",
"method": "",
"status": 0
}