Bookmarks
The Bookmarks API lets you create, list, retrieve, and delete bookmarks for folders in an Egnyte domain. Bookmarks help users quickly locate frequently accessed folders in the Web UI.
Base URL
https://{domain}.egnyte.com/pubapi/v1/bookmarks
Authentication
All requests require an OAuth 2.0 Bearer token in the Authorization header:
Authorization: Bearer {access_token}
See Authentication for details on obtaining a token.
Create a Bookmark
Create a new bookmark on a folder.
Request
POST /pubapi/v1/bookmarks
Request Body
Note: Provide either path or folder_id, not both.
| Field | Type | Required | Description |
|---|---|---|---|
path | string | No* | Path to the folder to bookmark (e.g., /Shared/Documents/MyPictures) |
folder_id | string | No* | UUID of the folder to bookmark |
*One of path or folder_id is required.
Example Request
curl -i -X POST "https://{domain}.egnyte.com/pubapi/v1/bookmarks" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "path": "/Shared/Documents/MyPictures" }'
Response
200 OK
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier for the bookmark |
path | string | Path to the bookmarked folder |
folder_id | string | UUID of the bookmarked folder |
creation_date | string | ISO 8601 timestamp of bookmark creation |
Example Response
{
"id": 5468,
"path": "/Shared/Documents/MyPictures",
"folder_id": "e3dcb54a-93d4-4cb1-9f39-4607721d0e12",
"creation_date": "2016-06-02T11:36:01.000+0000"
}
List Bookmarks
List all bookmarks for the authenticated user.
Request
GET /pubapi/v1/bookmarks
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
offset | integer | No | 0 | Start listing from the nth bookmark (zero-indexed) |
count | integer | No | — | Maximum number of bookmarks to return |
Example Request
curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/bookmarks?offset=2&count=10" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
200 OK
| Field | Type | Description |
|---|---|---|
offset | integer | Starting position of the returned results |
count | integer | Number of bookmarks returned |
bookmarks | array | Array of bookmark objects |
bookmarks[].id | integer | Unique identifier for the bookmark |
bookmarks[].path | string | Path to the bookmarked folder |
bookmarks[].folder_id | string | UUID of the bookmarked folder |
bookmarks[].creation_date | string | ISO 8601 timestamp of bookmark creation |
Example Response
{
"offset": 0,
"count": 2,
"bookmarks": [
{
"id": 14455,
"path": "/Shared/My Folder/Pictures",
"folder_id": "0344c35b-1341-4b78-8b85-6007397dba78",
"creation_date": "2016-06-06T17:47:30.000+0000"
},
{
"id": 14453,
"path": "/Shared/MyDocuments",
"folder_id": "ff00a4fe-f861-419d-a283-97e6d3b5dab9",
"creation_date": "2016-06-06T17:45:59.000+0000"
}
]
}
Get Bookmark by ID
Retrieve details for a specific bookmark.
Request
GET /pubapi/v1/bookmarks/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Unique identifier of the bookmark |
Example Request
curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/bookmarks/5468" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
200 OK
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier for the bookmark |
path | string | Path to the bookmarked folder |
folder_id | string | UUID of the bookmarked folder |
creation_date | string | ISO 8601 timestamp of bookmark creation |
Example Response
{
"id": 14455,
"path": "/Shared/My Folder/Pictures",
"folder_id": "0344c35b-1341-4b78-8b85-6007397dba78",
"creation_date": "2016-06-06T17:47:30.000+0000"
}
Delete Bookmark
Delete a specific bookmark.
Request
DELETE /pubapi/v1/bookmarks/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Unique identifier of the bookmark to delete |
Example Request
curl -i -X DELETE "https://{domain}.egnyte.com/pubapi/v1/bookmarks/5468" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
204 No Content
The bookmark was successfully deleted. No response body is returned.
Error Codes
| Status | Error | Description | Resolution |
|---|---|---|---|
| 400 | BOOKMARK_PATH_AND_ID_CONFLICT | Both path and folder_id were provided | Provide only one of path or folder_id in the request body |
| 401 | Unauthorized | Invalid or expired token | Refresh your OAuth token |
| 404 | FOLDER_DOES_NOT_EXIST | The specified folder does not exist | Verify the folder path or UUID is correct |
| 404 | Not Found | Bookmark with the specified ID does not exist | Verify the bookmark ID is correct |
Code Examples
Create a Bookmark
curl -i -X POST "https://{domain}.egnyte.com/pubapi/v1/bookmarks" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "path": "/Shared/Documents/MyPictures" }'
List All Bookmarks
curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/bookmarks" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Related Resources
- Authentication — How to obtain and refresh OAuth tokens
- File System API — Manage files and folders in Egnyte
