Getting root folder
| PROPERTY | VALUE |
|---|---|
| Synopsis | GET /rootfolder/{folderId} |
| Response Headers | Content-Length, Content-Type |
| Response Status | 200, 400, 404, 500 |
Example Request: get information about root folder /01/100001
GET /rootfolder/%2F01%2F100001
Host: {IP}
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Accept: application/json
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: nnn
{
"name" : "100001",
"permissions" : 710,
"folderpath" : "/01",
"owner" : 100001,
"group" : 100001,
"type" : "RootFolder",
"children" : []
}
Listing children of the specific root folder to a certain depth
| PROPERTY | VALUE |
|---|---|
| Synopsis | GET /rootfolder/children/{folderId}/{depth} |
| Response Headers | Content-Length, Content-Type |
| Response Status | 200, 400, 404, 500 |
Example Request: list children to the certain depth (of 4) of the root folder /01/100001
GET /rootfolder/children/%2F01%2F100001/4
Host: {IP}
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Accept: application/json
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: nnn
{
"name" : "100001",
"permissions" : 710,
"folderpath" : "/01",
"owner" : 100001,
"group" : 100001,
"type" : "RootFolder",
"children" :
[
{
"name" : "example.com",
"permissions" : 710,
"folderpath" : "/01/100001",
"owner" : 100001,
"group" : 100001,
"type" : "Folder",
"children" : [...]
},
{
"name" : "website.com",
"permissions" : 710,
"folderpath" : "/01/100001",
"owner" : 100001,
"group" : 100001,
"type" : "Folder",
"children" : [...]
}
]
}
Deleting root folder
| PROPERTY | VALUE |
|---|---|
| Synopsis | DELETE /rootfolder/{folderId} |
| Response Headers | Content-Length, Content-Type |
| Response Status | 200, 400, 404, 500 |
Example Request: delete root folder /01/100001
DELETE /rootfolder/%2F01%2F100001
Host: {IP}
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Accept: application/json
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: nnn
Adding root folder
| PROPERTY | VALUE |
|---|---|
| Synopsis | POST /rootfolder |
| Response Headers | Content-Length, Content-Type |
| Response Status | 200, 400, 404, 409, 500 |
Example Request: add root folder /01/100001
POST /rootfolder
Host: {IP}
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Accept: application/json
{
"name" : "100001",
"permissions" : 710,
"folderpath" : "/01",
"owner" : 100001,
"group" : 100001,
"type" : "RootFolder",
}
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: nnn
Modifying root folder
| PROPERTY | VALUE |
|---|---|
| Synopsis | PUT /rootfolder/{folderId} |
| Response Headers | Content-Length, Content-Type |
| Response Status | 200, 400, 404, 500 |
Example Request: modify root folder /01/100001
GET /rootfolder/%2F01%2F100001
Host: {IP}
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Accept: application/json
{
"name" : "100001_newName",
"permissions" : 777,
"folderpath" : "/01",
"owner" : 100001,
"group" : 100001,
"type" : "RootFolder",
}
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: nnn
{
"name" : "100001_newName",
"permissions" : 777,
"folderpath" : "/01",
"owner" : 100001,
"group" : 100001,
"type" : "RootFolder",
}
Committing root folder action
| PROPERTY | VALUE |
|---|---|
| Synopsis | GET /rootfolder/commit/{action}/{folderId} |
| Response Headers | Content-Length, Content-Type |
| Response Status | 200, 400, 404, 500 |
| Action | Previous action that was executed, values are: add, delete or modify. |
Example Request: commit after delete action on root folder /01/100001
GET /rootfolder/commit/delete/%2F01%2F100001
Host: {IP}
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Accept: application/json
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: nnn
Rollback root folder action
| PROPERTY | VALUE |
|---|---|
| Synopsis | GET /rootfolder/rollback/{action}/{folderId} |
| Response Headers | Content-Length, Content-Type |
| Response Status | 200, 400, 404, 500 |
| Action | Previous action that was executed, values are: add, delete or modify. |
Example Request: rollback after delete action on root folder /01/100001
GET /rootfolder/rollback/delete/%2F01%2F100001
Host: {IP}
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Accept: application/json
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: nnn