Skip to content

Get Team Folders

Get team folders. Use all as {id} to return the root.

Endpoint

http
GET /api/v1/teams/folders/{id}

Parameters

Path parameters

ParameterTypeRequiredDescription
idstringyes-
folder_idstring--

Query parameters

ParameterTypeRequiredDescription
pageinteger-Get the paginated results
cursorstring-Cursor for paginating results
limitinteger-Limit the number of entries returned
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/teams/folders/{id}?page=1&sort=created_at&direction=DESC' \
--header 'Authorization: Bearer {token}'

Response

json
{
  "data": [
    {
      "data": {
        "id": "folder_123",
        "type": "folder",
        "attributes": {
          "name": "Projects",
          "color": "#00BC7E",
          "emoji": null,
          "filesize": 12345678,
          "isTeamFolder": false,
          "items": 12,
          "trashed_items": 0,
          "created_at": "01. Jan. 2024",
          "updated_at": "02. Jan. 2024",
          "deleted_at": null
        },
        "relationships": {
          "shared": {
            "data": {
              "id": "share_123",
              "type": "shared",
              "attributes": {
                "permission": "editor",
                "protected": false,
                "item_id": "item_123",
                "expire_in": 24,
                "token": "share_token",
                "link": "https://files.ro/share/share_token",
                "type": "folder"
              }
            }
          },
          "parent": {
            "data": {
              "type": "folder",
              "id": "folder_root",
              "attributes": {
                "name": "Root"
              }
            }
          },
          "user": {
            "data": {
              "type": "user",
              "id": "user_123",
              "attributes": {
                "name": "Jane Doe",
                "avatar": "https://files.ro/storage/avatars/jane.png",
                "color": "#00BC7E"
              }
            }
          }
        }
      }
    },
    {
      "data": {
        "id": "file_123",
        "type": "file",
        "attributes": {
          "filesize": "1.2 MB",
          "name": "report.pdf",
          "basename": "report-uuid.pdf",
          "mimetype": "application/pdf",
          "file_url": "https://files.ro/file/report-uuid.pdf",
          "thumbnail": "https://files.ro/thumbnail/report-uuid.jpg",
          "parent_id": "folder_123",
          "created_at": "01. Jan. 2024",
          "updated_at": "02. Jan. 2024",
          "deleted_at": null
        },
        "relationships": {
          "shared": {
            "data": {
              "id": "share_123",
              "type": "shared",
              "attributes": {
                "permission": "editor",
                "protected": false,
                "item_id": "item_123",
                "expire_in": 24,
                "token": "share_token",
                "link": "https://files.ro/share/share_token",
                "type": "folder"
              }
            }
          },
          "parent": {
            "data": {
              "type": "folder",
              "id": "folder_123",
              "attributes": {
                "name": "Projects"
              }
            }
          },
          "creator": {
            "data": {
              "type": "creator",
              "id": "user_123",
              "attributes": {
                "name": "Jane Doe",
                "avatar": "https://files.ro/storage/avatars/jane.png",
                "color": "#00BC7E"
              }
            }
          },
          "exif": {
            "data": {
              "type": "exif",
              "id": "exif_123",
              "attributes": {
                "date_time_original": "2024-01-01",
                "artist": "Jane Doe",
                "height": 1080,
                "width": 1920,
                "x_resolution": "72",
                "y_resolution": "72",
                "color_space": "sRGB",
                "camera": "Canon",
                "model": "EOS",
                "aperture_value": 2.8,
                "exposure_time": "1/125",
                "focal_length": "50mm",
                "iso": 100,
                "aperture_f_number": 2.8,
                "ccd_width": "5.76mm",
                "longitude": "0.0000",
                "latitude": "0.0000"
              }
            }
          }
        }
      }
    }
  ],
  "meta": {
    "cursor": {
      "cursor": "eyJvZmZzZXQiOjAsImxpbWl0IjoxNX0=",
      "next_cursor": "eyJvZmZzZXQiOjE1LCJsaW1pdCI6MTV9",
      "prev_cursor": null,
      "limit": 15,
      "total": 68
    },
    "teamFolder": {
      "data": {
        "id": "folder_123",
        "type": "folder",
        "attributes": {
          "name": "Projects",
          "color": "#00BC7E",
          "emoji": null,
          "filesize": 12345678,
          "isTeamFolder": false,
          "items": 12,
          "trashed_items": 0,
          "created_at": "01. Jan. 2024",
          "updated_at": "02. Jan. 2024",
          "deleted_at": null
        },
        "relationships": {
          "shared": {
            "data": {
              "id": "share_123",
              "type": "shared",
              "attributes": {
                "permission": "editor",
                "protected": false,
                "item_id": "item_123",
                "expire_in": 24,
                "token": "share_token",
                "link": "https://files.ro/share/share_token",
                "type": "folder"
              }
            }
          },
          "parent": {
            "data": {
              "type": "folder",
              "id": "folder_root",
              "attributes": {
                "name": "Root"
              }
            }
          },
          "user": {
            "data": {
              "type": "user",
              "id": "user_123",
              "attributes": {
                "name": "Jane Doe",
                "avatar": "https://files.ro/storage/avatars/jane.png",
                "color": "#00BC7E"
              }
            }
          }
        }
      }
    },
    "root": {
      "data": {
        "id": "folder_123",
        "type": "folder",
        "attributes": {
          "name": "Projects",
          "color": "#00BC7E",
          "emoji": null,
          "filesize": 12345678,
          "isTeamFolder": false,
          "items": 12,
          "trashed_items": 0,
          "created_at": "01. Jan. 2024",
          "updated_at": "02. Jan. 2024",
          "deleted_at": null
        },
        "relationships": {
          "shared": {
            "data": {
              "id": "share_123",
              "type": "shared",
              "attributes": {
                "permission": "editor",
                "protected": false,
                "item_id": "item_123",
                "expire_in": 24,
                "token": "share_token",
                "link": "https://files.ro/share/share_token",
                "type": "folder"
              }
            }
          },
          "parent": {
            "data": {
              "type": "folder",
              "id": "folder_root",
              "attributes": {
                "name": "Root"
              }
            }
          },
          "user": {
            "data": {
              "type": "user",
              "id": "user_123",
              "attributes": {
                "name": "Jane Doe",
                "avatar": "https://files.ro/storage/avatars/jane.png",
                "color": "#00BC7E"
              }
            }
          }
        }
      }
    },
    "teamFolder": {
      "data": {
        "id": "folder_123",
        "type": "folder",
        "attributes": {
          "name": "Projects",
          "color": "#00BC7E",
          "emoji": null,
          "filesize": 12345678,
          "isTeamFolder": false,
          "items": 12,
          "trashed_items": 0,
          "created_at": "01. Jan. 2024",
          "updated_at": "02. Jan. 2024",
          "deleted_at": null
        },
        "relationships": {
          "shared": {
            "data": {
              "id": "share_123",
              "type": "shared",
              "attributes": {
                "permission": "editor",
                "protected": false,
                "item_id": "item_123",
                "expire_in": 24,
                "token": "share_token",
                "link": "https://files.ro/share/share_token",
                "type": "folder"
              }
            }
          },
          "parent": {
            "data": {
              "type": "folder",
              "id": "folder_root",
              "attributes": {
                "name": "Root"
              }
            }
          },
          "user": {
            "data": {
              "type": "user",
              "id": "user_123",
              "attributes": {
                "name": "Jane Doe",
                "avatar": "https://files.ro/storage/avatars/jane.png",
                "color": "#00BC7E"
              }
            }
          }
        }
      }
    }
  }
}
json
{
  "type": "error",
  "message": "You are not authorized"
}
json
{
  "message": "The given data was invalid.",
  "errors": {
    "field": [
      "The field is required."
    ]
  }
}