Obține partajate cu mine
Obține folderele partajate cu mine. Folosește all ca {id} pentru a întoarce rădăcina.
Endpoint
http
GET /api/v1/teams/shared-with-me/{id}Parametri
Parametri URL
| Parametru | Tip | Obligatoriu | Descriere |
|---|---|---|---|
id | string | yes | - |
folder_id | string | - | - |
Parametri query
| Parametru | Tip | Obligatoriu | Descriere |
|---|---|---|---|
page | integer | - | Obține rezultatele paginate. |
cursor | string | - | Cursor pentru paginare |
limit | integer | - | Limita numărului de rezultate returnate |
sort | string | - | Definește sortarea implicită. Atribute disponibile: created_at și name |
direction | string | - | Definește sortarea implicită. Atribute disponibile: DESC și ASC |
Exemplu de cerere
sh
curl --location --request GET 'https://files.ro/api/v1/teams/shared-with-me/{id}?page=1&sort=created_at&direction=DESC' \
--header 'Authorization: Bearer {token}'Răspuns
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
},
"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."
]
}
}