Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

User permission required

Remarks

  • The parameter folderId folderIds defines folders to add for adding the new created bookmark.Duplicates for folderIds are not possible because of using a set.
  • In portal DDB the folderId favorites must always used.

...

NameValueOccurenceDefaultRequired
folderIdsID of folder(s)Multiple-Yes, at least one folderId

...

Request payload

Code Block
themeMidnight
titleBookmark object
linenumberstrue
collapsetrue
 {
	"id": "rjzgAIgBdHmpxQQKvQHm",						// Not used
	"itemId": "IVMX3IRHKU725WR2HHT6VY2AFFS72FGK",		// Required
	"description": "My important description",			// Optional
	"userId": "fachstelle_museum",					 	// Not used
	"type": "CULTURAL_ITEM",							// Optional
	"createdAt": 1683641908448,							// Not used
	"updatedAt": 1683641908448,
								// Not used
	"keywordTool": {									// Optional
		"done": True
	}
}

Status codes

Response payload

Code Block
themeMidnight
titleBookmark object
linenumberstrue
collapsetrue
 {
	"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)
  • 400 = At least one folder id is missing (in portal DDB it must be at least id of folder "favorites")
  • 200 = Bookmark created
  • 400 = Item Id is missing (required)
  • 400 = At least one folder id is missing (in portal DDB it must be at least id of folder "favorites")
  • 401 = User is not authorized
  • 500 = Internal server error

...

Example call(s)

  • Create bookmark in main folder and two additional foldersfolders (If DDB the favorites folder must be one of the folderIds)
    • POST https://dev-ddb.fiz-karlsruhe.de/api/2/favourites/bookmarks?folderIds=Sjszo4cBdHmpxQQKUvah&folderIds=rjwQKYgBdHmpxQQKKgSs

...

NameValueOccurenceDefaultRequired
userIdID of userOnce-At least userId or one itemId required
itemIdsIDs of itemsMultiple-At least userId or one itemId required
offsetOffset of resultOnce-1-Optional
sizeLength of resultOnce-1-Optional

Response payload

Code Block
themeMidnight
titleBookmark result object
linenumberstrue
collapsetrue
{
	"query": "user:"73611165cc142ae53176707d5a92e8f3",
	"total": 4,
	"offset": 0,
	"size": 9999,
	"bookmarks": [
		{
			"id": "rjzgAIgBdHmpxQQKvQHm",
			"itemId": "IVMX3IRHKU725WR2HHT6VY2AFFS72FGK",
			"description": "",
			"userId": "fachstelle_museum",
			"type": "CULTURAL_ITEM",
			"createdAt": 1683641908448,
			"updatedAt": 1683641908448,
			"keywordTool": {
				"done": False
			},
		},
		{
			"id": "nDxWtIgBdHmpxQQKNxNQ",
			"itemId": "IVMX3IRHKU725WR2HHT6VY2AFFS72FGK",
			"description": "Neues Lesezeichen",
			"userId": "fachstelle_museum",
			"type": "CULTURAL_ITEM",
			"createdAt": 1683641908448,
			"updatedAt": 1683641908448,
			"keywordTool": {
				"done": False
			},
		}
	]
}

...

  • Bookmarks according to certain criteria are retrieved to be displayed in the frontend.

Example call(s)

  • be displayed in the frontend.

Example call(s)

  • Retrieve all bookmarks by user
    • GET https://dev-ddb.fiz-karlsruhe.de/api/2/favourites/bookmarks?userId=fachstelle_museum
  • Retrieve all bookmarks by user and item ids
    • GET https://dev-ddb.fiz-karlsruhe.de/api/2/favourites/bookmarks?userId=fachstelle_museum
  • Retrieve all bookmarks by user and item ids
    • GET https://dev-ddb.fiz-karlsruhe.de/api/2/favourites/bookmarks?userId=fachstelle_museum&itemIds=itemId________________________01

^ Back to top

FA04 | Update bookmark

...

PUT

...

/favourites/bookmarks/{id}
    • 2/favourites/bookmarks?userId=fachstelle_museum&itemIds=itemId________________________01


^ Back to top

...

FA04 | Update bookmark

PUT

/favourites/bookmarks/{id}

User permission required

Request payload

Code Block
themeMidnight
titleBookmark object
linenumberstrue
collapsetrue
{
	"id": "rjzgAIgBdHmpxQQKvQHm",						// Not used
	"itemId": "IVMX3IRHKU725WR2HHT6VY2AFFS72FGK",		// Optional
	"description": "Another description",				// Optional
	"userId": "fachstelle_museum",						// Not used
	"type": "INSTITUTION",								// Optional
	"createdAt": 1683641908448,							// Not used
	"updatedAt": 1683641908448,							// Not used
	"keywordTool": {									// Optional
		"done": false								 	// Optional
	}
}

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.

...

Response

payload

Code Block
themeMidnight
titleBookmark object
linenumberstrue
collapsetrue
 {
	"id": "rjzgAIgBdHmpxQQKvQHm",						// Not used
	"itemId": "IVMX3IRHKU725WR2HHT6VY2AFFS72FGK",		// Not used
	"description": "Another description",				// Optional
	"userId": "fachstelle_museum",
	"type": "INSTITUTION",
					// Not used"createdAt": 1683641908448,
	"updatedAt": 1683641908555,
	"typekeywordTool": {
		"INSTITUTION",								// Optional
	"createdAt": 1683641908448,							// Not used
	"updatedAt": 1683641908448,							// Not used
	"keywordTool": {									// Optional
		"done": false
	}
}done": false
	}
}

Status codes

  • 200 = Bookmark updated
  • 401 = User is not authorized
  • 404 = Bookmark ID not found
  • 500 = Internal server error

Related Use Case(s)

  • UC07 | Change bookmark description
    • A user changes the description of a bookmark.

Example call(s)

  • Update bookmark
    • PUT https://dev-ddb.fiz-karlsruhe.de/api/2/favourites/bookmarks/YzxuJIsBdHmpxQQKPSya


^ Back to top

...

FA05 | Delete bookmark

DELETE

/favourites/bookmarks/{id}

User permission required

Response payload

Code Block
themeMidnight
titleBookmark object
linenumberstrue
collapsetrue
 {
	"id    "took": 11,
    "rjzgAIgBdHmpxQQKvQHmerrors": false,
	"itemId    "result": "IVMX3IRHKU725WR2HHT6VY2AFFS72FGK",
	"description": "Another description",
	"userId": "fachstelle_museum",
	"type": "INSTITUTION",
	"createdAt": 1683641908448,
	"updatedAt": 1683641908555,
	"keywordTool": {
		"done": false
	}
}

Status codes

  • 200 = Bookmark updated
  • 401 = User is not authorized
  • 404 = Bookmark ID not found
  • 500 = Internal server error

Related Use Case(s)

  • UC07 | Change bookmark description
    • A user changes the description of a bookmark.

Example call(s)

  • Update bookmark
    • PUT https://dev-ddb.fiz-karlsruhe.de/api/2/favourites/bookmarks/YzxuJIsBdHmpxQQKPSya

^ Back to top

FA05 | Delete bookmark

...

DELETE

...

/favourites/bookmarks/{id}
 [
        {
            "id": "TC05____________BM01",
            "index": "bookmark",
            "statusCode": 200,
            "result": "deleted"
        }
    ],
    "statusCode": 200,
    "statusMessage": null
}

User permission required

Status codes

  • 200 = Bookmark deleted
  • 401 = User is not authorized
  • 404 = Bookmark ID not found
  • 500 = Internal server error

...

POST

/favourites/folders

User permission required

Request payload

Code Block
themeMidnight
titleFolder object
linenumberstrue
collapsetrue
{
	"id": "73611165cc142ae53176707d5a92e8f3",	// Not used
    "portal": "DDB",							// Required
    "title": "favorites",						// Required
	"description": "Das ist ein Test!",			// Optional
	"userId": "fachstelle_museum",				// Not used
	"publishingName": "xxx",					// Optional
	"createdAt": 1682070216141,					// Not used
	"updatedAt": 1683642142482,					// Not used
	"bookmarkIds": [							// Optional
		"MESR_IcBosJ3rUWzhkJj",
		"rjzgAIgBdHmpxQQKvQHm"
	],
	"institutionIds": [							// Optional
		"MESR_IcBosJ3rUWzhkJj"
	],
	"blockingToken": "Test",					// Optional
	"blocked": true,							// Optional
	"published": true,							// Optional
	"keywordTool": {							// Optional
		"sentToAdmin": false
	}
}

Response payload

Code Block
themeMidnight
titleFolder object
linenumberstrue
collapsetrue
 {
	"id": "73611165cc142ae53176707d5a92e8f3"
	"portal": "DDB",
	"title": "favorites",
	"description": "Das ist ein Test!",
	"userId": "fachstelle_museum",
	"publishingName": "xxx",
	"createdAt": 1682070216141,
	"updatedAt": 1683642142482,
	"bookmarksIds": [
		"MESR_IcBosJ3rUWzhkJj",
		"rjzgAIgBdHmpxQQKvQHm"
	],
	"institutionIds": [
		"MESR_IcBosJ3rUWzhkJj"
	],
	"blockingToken": "Test",
	"blocked": true,
	"published": true,
	"keywordTool": {
		"sentToAdmin": false
	}
}

...

POST

/favourites/{id}/bookmarks

User permission required

Remarks

  • A bookmark could not be added to the main folder (favorites), because it is added to this folder when you create a bookmark.
  • The folder ID and bookmark ID must exist before adding something.

...

GET

/favourites/folders/{id}

User permission required

Response payload

Code Block
themeMidnight
titleFolder object
linenumberstrue
collapsetrue
{
	"id": "73611165cc142ae53176707d5a92e8f3"
	"portal": "DDB",
	"title": "favorites",
	"description": "Das ist ein Test!",
	"userId": "fachstelle_museum",
	"publishingName": "xxx",
	"createdAt": 1682070216141,
	"updatedAt": 1683642142482,
	"bookmarksIds": [
		"MESR_IcBosJ3rUWzhkJj",
		"rjzgAIgBdHmpxQQKvQHm"
	],
	"institutionIds": [
		"MESR_IcBosJ3rUWzhkJj"
	],
	"blockingToken": "Test",
	"blocked": true,
	"published": true,
	"keywordTool": {
		"sentToAdmin": false
	}
}

...

GET

/favourites/folders/{id}/bookmarks

User permission required

Response payload

Code Block
themeMidnight
titleBookmarkResult object
linenumberstrue
collapsetrue
{
	"query": "user:"73611165cc142ae53176707d5a92e8f3" AND folder:"p0Qyo4cBosJ3rUWznjiY"",
	"total": 4,
	"offset": 0,
	"size": 9999,
	"bookmarks": [
		{
			"id": "rjzgAIgBdHmpxQQKvQHm",
			"itemId": "IVMX3IRHKU725WR2HHT6VY2AFFS72FGK",
			"description": "",
			"userId": "fachstelle_museum",
			"type": "CULTURAL_ITEM",
			"createdAt": 1683641908448,
			"updatedAt": 1683641908448,
			"keywordTool": {
				"done": False
			},
		},
		{
			"id": "nDxWtIgBdHmpxQQKNxNQ",
			"itemId": "IVMX3IRHKU725WR2HHT6VY2AFFS72FGK",
			"description": "Neues Lesezeichen",
			"userId": "fachstelle_museum",
			"type": "CULTURAL_ITEM",
			"createdAt": 1683641908448,
			"updatedAt": 1683641908448,
			"keywordTool": {
				"done": False
			},
		}
	]
}

...

NameValueOccurenceDefaultRequired
userIdID of userOnce-At least userId or title required
portalName of used portalOnceDDB-Optional for DDB, else required
titleTitle of folderOnce-At least userId or title required
offsetBeginn offset of resultsOnce-1-Optional
sizeSize data of resultsOnce-1-Optional

Response payload

Code Block
themeMidnight
titleFolderResult object
linenumberstrue
collapsetrue
{
	"query": "user:"73611165cc142ae53176707d5a92e8f3"",
	"total": 19,
	"offset": 0,
	"size": 9999,
	"folders": [
		{
			"id": "Sjszo4cBdHmpxQQKUvah",
 			"portal": "DDB",
 			"title": "Schiller",
			"description": "",
			"userId": "fachstelle_museum",
			"publishingName": "dio",
			"createdAt": 1682070262371,
			"updatedAt": 1683642142787,
			"bookmarksIds": ["MUSR_IcBosJ3rUWzmkLU"],
			"institutionIds": Null,
			"blockingToken": "",
			"keywordTool": {
				"sentToAdmin": false
			},
			"blocked": false,
			"published": true},
		{
			"id": "rjwQKYgBdHmpxQQKKgSs",
 			"portal": "DDB",
 			"title": "favorites",
			"description": "Das ist ein Test!",
			"userId": "fachstelle_museum",
			"publishingName": "xxx",
			"createdAt": 1682070216141,
			"updatedAt": 1683642142482,
			"bookmarksIds": [],
			"institutionIds": none,
			"blockingToken": "Test",
			"keywordTool": {
				"sentToAdmin": false
			},
			"blocked": true,
			"published": true
		}
	]
}

...

POST

/favourites/folders/{id}

User permission required

Request payload

Code Block
themeMidnight
titleFolder object
linenumberstrue
collapsetrue
 {
	"id": "Sjszo4cBdHmpxQQKUvah",			// Not used
	"portal": "DDB",                        // Required
	"title": "favorites",					// Optional
	"description": "Das ist ein Test!",		// Optional
	"userId": "fachstelle_museum",			// Not used
	"publishingName": "xxx",				// Optional
	"createdAt": 1682070216141,				// Not used
	"updatedAt": 1683642142482,				// Not used
	"bookmarksIds": [						// Optional
		"MESR_IcBosJ3rUWzhkJj",
		"rjzgAIgBdHmpxQQKvQHm"
	],
	"institutionIds": [						// Optional
		"MESR_IcBosJ3rUWzhkJj"
	],
	"blockingToken": "Test",				// Optional
	"blocked": true,						// Optional
	"published": true,						// Optional
	"keywordTool": {						// Optional
		"sentToAdmin": false
	}
}

Response payload

Code Block
themeMidnight
titleFolder object
linenumberstrue
collapsetrue
{
	"id": "Sjszo4cBdHmpxQQKUvah",
	"portal": "DDB",
	"title": "favorites",
	"description": "Das ist ein Test!",
	"userId": "fachstelle_museum",
	"publishingName": "xxx",
	"createdAt": 1682070216141,
	"updatedAt": 1683642142482,
	"bookmarksIds": [
		"MESR_IcBosJ3rUWzhkJj",
		"rjzgAIgBdHmpxQQKvQHm"
	],
	"institutionIds": [
		"MESR_IcBosJ3rUWzhkJj"
	],
	"blockingToken": "Test",
	"blocked": true,
	"published": true,
	"keywordTool": {
		"sentToAdmin": false
	}
}

...

DELETE

/favourites/folders/{id}/bookmarks/{bookmarkId}

User permission required

Remarks

  • A bookmark could not be deleted from the main folder (favorites), because this is done only if the bookmark is deleted (see Delete Bookmark).
  • The folder ID and bookmark ID must exist before deleting something.

...

  • Model object to hold a bookmark (= favorites)

Remarks

  • The possible types of a bookmark are:
    • CULTURAL_ITEM | INSTITUTION | ENTITY | NEWSPAPER | ARTICLE

...