-
Notifications
You must be signed in to change notification settings - Fork 108
REST API endpoint irregularities
Sumio Kiyooka edited this page May 13, 2021
·
1 revision
This page catalogs known endpoints that deviate from the norm when using defaults.
- GET results in HTTP response status code 406: not_acceptable
- Affects version(s): 2021.2
Workaround: specify explicit accept header
headers = {'accept': "application/vnd.blackducksoftware.user-4+json"}
items = bd.get_resource('dormantUsers', headers=headers)
- Event dict returned is non-standard i.e. has no ['_meta']['links']
- Retrieving all items using pagination may return duplicates and thus giving incorrect results.
- Affects version(s): 2021.2
- Fixed version: 2021.4
Workaround: specify a sort order
url = f"/api/journal/projects/{projectId}/versions/{versionId}"
params = {'sort': "timestamp ASC"}
events = list(bd.get_items(url, page_size=1000, params=params))