Skip to content

Get Navigation Tree

Get folder navigation hierarchy of user folders.

Endpoint

http
GET /api/v1/browse/navigation

Parameters

Query parameters

ParameterTypeRequiredDescription
sortstring-Define default sorting. Available attributes are created_at and name
directionstring-Define default sorting. Available attributes are DESC and ASC

Request example

sh
curl --location --request GET 'https://files.ro/api/v1/browse/navigation?sort=created_at&direction=DESC' \
--header 'Authorization: Bearer {token}'

Response

json
[
  {
    "location": "files",
    "name": "Files",
    "folders": [
      {
        "id": "folder_123",
        "parent_id": null,
        "name": "Projects",
        "team_folder": false,
        "folders": []
      }
    ],
    "isMovable": true,
    "isOpen": true
  },
  {
    "location": "team-folders",
    "name": "Team folders",
    "folders": [],
    "isMovable": false,
    "isOpen": false
  },
  {
    "location": "shared-with-me",
    "name": "Shared with me",
    "folders": [],
    "isMovable": false,
    "isOpen": false
  }
]
json
{
  "type": "error",
  "message": "You are not authorized"
}
json
{
  "message": "The given data was invalid.",
  "errors": {
    "field": [
      "The field is required."
    ]
  }
}