API endpoints
Create bookmark
POST | /favourites/bookmarks |
---|
User permission required
Remarks
- The parameter folderId defines all lists (folders) to add the bookmark.
- Duplicates for folderIds are not possible because of using a set.
- The folderId favorites is always used. If no folderId is specified, only favorites is used.
- If the folder favorites not exists, because a new user adds the first bookmark, then the folder favorites is created.
Query parameters
Name | Value | Occurence |
---|
folderIds | ID of folder(s) | Multiple |
Request payload
Returns Bookmark JSON object:
{
"id": "rjzgAIgBdHmpxQQKvQHm", // Not used
"itemId": "IVMX3IRHKU725WR2HHT6VY2AFFS72FGK", // Required
"description": "My important description", // Optional
"userId": "fachstelle_museum", // Not used
"type": "CULTURAL_ITEM", // Required
"createdAt": 1683641908448, // Not used
"updatedAt": 1683641908448, // Not used
"keywordTool": { // Optional
"done": true
}
}
Response payload
Returns Bookmark JSON object:
{
"id": "rjzgAIgBdHmpxQQKvQHm",
"itemId": "IVMX3IRHKU725WR2HHT6VY2AFFS72FGK",
"description": "My important description",
"userId": "fachstelle_museum",
"type": "CULTURAL_ITEM",
"createdAt": 1683641908448,
"updatedAt": 1683641908448,
"keywordTool": {
"done": true
}
}
Status codes
- 200 = Bookmark created
- 400 = Item Id is missing (required)
- 401 = User is not authorized
- 500 = Internal server error
Related Use Case(s)
- UC01 | Create bookmark
The user selects an object from an object list as a favorite.
Example call(s)
- Create bookmark in only main folder
- GET https://dev-ddb.fiz-karlsruhe.de/api/2/favourites/bookmarks
- Create bookmark in main folder and two additional folders
- GET https://dev-ddb.fiz-karlsruhe.de/api/2/favourites/bookmarks?folderIds=Sjszo4cBdHmpxQQKUvah&folderIds=rjwQKYgBdHmpxQQKKgSs
x