Delete
Deleting Files and/or Directories¶
URL Path: /secured/filesystem/delete
HTTP Method: POST
Action: "delete"
Error Codes: ERR_NOT_A_FOLDER, ERR_DOES_NOT_EXIST, ERR_NOT_WRITEABLE, ERR_TOO_MANY_PATHS, ERR_NOT_A_USER
The ERR_TOO_MANY_PATHS error code is returned when all of the "paths" and the items and sub-directories under them exceed the maximum number of paths that can be processed by this endpoint.
Request Parameters:
Request Body:
{
"paths" : ["/tempZone/home/rods/test2"]
}
"paths" can take a mix of files and directories.
Response:
{
"paths":["/tempZone/home/rods/test2"]
}
Curl Command:
curl -H "$AUTH_HEADER" -H "Content-Type:application/json" -d '{"paths" : ["/tempZone/home/rods/test2"]}' http://127.0.0.1:3000/secured/filesystem/delete?user=rods
Deleting all items in a Directory¶
URL Path: /secured/filesystem/delete-contents
HTTP Method: POST
Action: "delete"
Error codes: ERR_NOT_A_FOLDER, ERR_DOES_NOT_EXIST, ERR_NOT_WRITEABLE, ERR_TOO_MANY_PATHS, ERR_NOT_A_USER
The ERR_TOO_MANY_PATHS error code is returned when all items in the source directory and its sub-directories exceed the maximum number of paths that can be processed by this endpoint.
Request Query Parameters:
Request Body:
{
"path": "/tempZone/home/rods/test"
}
Response:
{
"paths":[
"/tempZone/home/rods/test/test1",
"/tempZone/home/rods/test/test2"
]
}
Example ERR_TOO_MANY_PATHS Error Response:
{
"error_code": "ERR_TOO_MANY_PATHS",
"count": 250,
"limit": 100
}
Curl Command:
curl -H "$AUTH_HEADER" -H "Content-Type:application/json" -d '{"path": "/tempZone/home/rods/test"}' http://127.0.0.1:3000/secured/filesystem/delete-contents