- Home
- Resources
- Favorites
Endpoints under /favorites
provide a way to manage user bookmarks on tags and resources.
GET /v2/favorites
A GET call to the /favorites
endpoint returns a list of favorites for logged-in user.
Response Body
media type |
data type |
description |
application/json |
array of Favorite
(JSON) |
An array of Favorite objects, in JSON format. |
Example
Request
GET /v2/favorites
Content-Type: application/json
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"path" : "...",
"entityType" : "...",
"entityKey" : "...",
"name" : "...",
"creationTime" : 12345,
"dataSourceName" : "..."
} ]
DELETE /v2/favorites/{entityKey}
A DELETE call to the /favorites/{entityKey}
endpoint removes a favorite from the specified entity
for the current user.
Request Parameters
name |
type |
description |
entityKey |
path |
The unique key of the favorite. |
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
Status of the operation. |
Example
Request
DELETE /v2/favorites/{entityKey}
Content-Type: application/json
Accept: application/json
...
Response
HTTP/1.1 204 No Content
Content-Type: application/json
...
POST /v2/favorites/{entityKey}
A POST call to the /favorites/{entityKey}
endpoint creates a favorite on the specified entity (resource,
tag, and so on) for the current user.
Request Parameters
name |
type |
description |
entityKey |
path |
The unique key of the target entity. |
Response Body
media type |
data type |
description |
application/json |
Favorite
(JSON) |
The new Favorite object, in JSON format. |
Example
Request
POST /v2/favorites/{entityKey}
Content-Type: application/json
Accept: application/json
...
Response
HTTP/1.1 201 Created
Content-Type: application/json
{
"path" : "...",
"entityType" : "...",
"entityKey" : "...",
"name" : "...",
"creationTime" : 12345,
"dataSourceName" : "..."
}
GET /v2/favorites/{user}
A GET call to the /favorites/{user}
endpoint returns a list of favorites for a specific user.
Request Parameters
name |
type |
description |
user |
path |
The Waterline Data username. |
Response Body
media type |
data type |
description |
application/json |
array of Favorite
(JSON) |
An array of Favorite objects, in JSON format. |
Example
Request
GET /v2/favorites/{user}
Content-Type: application/json
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"path" : "...",
"entityType" : "...",
"entityKey" : "...",
"name" : "...",
"creationTime" : 12345,
"dataSourceName" : "..."
} ]
POST /v2/favorites/{entityKey}/{userName}
Request Parameters
name |
type |
description |
entityKey |
path |
|
userName |
path |
|
Response Body
media type |
data type |
description |
application/json |
Favorite
(JSON) |
|
Example
Request
POST /v2/favorites/{entityKey}/{userName}
Content-Type: application/json
Accept: application/json
...
Response
HTTP/1.1 201 Created
Content-Type: application/json
{
"path" : "...",
"entityType" : "...",
"entityKey" : "...",
"name" : "...",
"creationTime" : 12345,
"dataSourceName" : "..."
}