• Register

Bookmarks API

The Bookmarks API allows you to create a bookmark on a folder, list all bookmarks, list the details for a specific bookmark, and delete a bookmark. Bookmarks are used to mark folders so you can quickly locate them in the Web UI.

Create a Bookmark

This endpoint is used to create a new bookmark on a folder.

POST/pubapi/v1/bookmarks

Request Parameters

Either folder_id or path is required for the request.

Parameter Description Required
path Path to folder to be bookmarked. No
folder_id The UUID of the folder to be bookmarked. No

Method-specific Response Codes

Error Code Error MessageTroubleshooting
Path Error BOOKMARK_PATH_AND_ID_CONFLICT You should provide either a path or a folder_id, not both.
Folder Error FOLDER_DOES_NOT_EXIST Folder does not exist.

Request Examples

POST /pubapi/v1/bookmarks HTTP/1.1
Host: apidemo.egnyte.com
Authorization: Bearer 68zc95e3xv954u6k3hbnma3q
Content-Type: application/json
{
  "path": "/Shared/Documents/MyPictures",
}
OR
Content-Type: application/json
{
  "folder_id": "FOLDER_UUID",
}
curl -v --request POST -H "Authorization: Bearer 68zc95e3xv954u6k3hbnma3q" -H "Content-Type: application/json" --data '{"path":"/Shared/Documents/MyPictures"}' https://apidemo.egnyte.com/pubapi/v1/bookmarks

Sample 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

This endpoint is used to list all bookmarks for the authenticated user.

GET/pubapi/v1/bookmarks?offset={integer}&count={integer}

Request Parameters

Parameter Description Required
offset Start listing with the nth bookmark. No
count Limit the number of bookmarks to return to be at most this integer. No

Method-specific Response Codes

Error Code Error Message HTTP Code Troubleshooting
OK The request was fulfilled. 200 The request was valid and the response will be returned.
Unauthorized Developer inactive. 401 Make sure the access token is valid.

Request Examples

GET /pubapi/v1/bookmarks?offset=2&count=10 HTTP/1.1
Host: apidemo.egnyte.com
Authorization: Bearer 68zc95e3xv954u6k3hbnma3q
curl -v --request GET -H "Authorization: Bearer 68zc95e3xv954u6k3hbnma3q" https://apidemo.egnyte.com/pubapi/v1/bookmarks?offset=2&count=10

Sample Response

{
  "offset": 0,
  "count": 0,
  "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

This endpoint is used to get the details for a specific bookmark.

GET/pubapi/v1/bookmarks/{id}

Request Parameters

Parameter Description Required
id The idenitification tag for the bookmark for which you want to view the details. Yes

Request Examples

GET /pubapi/v1/bookmarks/5468 HTTP/1.1
Host: apidemo.egnyte.com
Authorization: Bearer 68zc95e3xv954u6k3hbnma3q
curl -v --request GET -H "Authorization: Bearer 68zc95e3xv954u6k3hbnma3q" https://apidemo.egnyte.com/pubapi/v1/bookmarks/5468

Sample 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

This endpoint is used to delete a specific bookmark.

DELETE/pubapi/v1/bookmarks/{id}

Request Parameters

Parameter Description Required
id The idenitification tag for the bookmark that should be deleted. Yes

Method-specific Response Codes

Response Message HTTP Code Troubleshooting
OK NO CONTENT 204 The request was successful and the bookmark was deleted.

Request Examples

DELETE /pubapi/v1/bookmarks/5468 HTTP/1.1
Host: apidemo.egnyte.com
Authorization: Bearer 68zc95e3xv954u6k3hbnma3q
curl -v --request DELETE -H "Authorization: Bearer 68zc95e3xv954u6k3hbnma3q" https://apidemo.egnyte.com/pubapi/v1/bookmarks/5468