Here we define the steps for retrieving all API keys for a specific user in BlueDolphin. Only the Administrators role in BlueDolphin enables the user to retrieve personalized API keys of other users.
HTTP responses
HTTP response status code | Interpretation |
200 OK | A list of API keys retrieved successfully |
400 Bad Request | One or more parameters are missing or incorrect. The response body returns a specific error:
|
401 Unauthorized | Invalid or missing API key secret and/or tenant |
To retrieve the list of all personalized API keys for a given user, make a GET request to the /user-api-keys[?UserId={id}]
endpoint specifying:
Resource/endpoint destination URL. Replace the path parameter {id} with the ID of the user that you want to retrieve API keys for.
The header for your API request
In this example, we want to retrieve the list of personalized API keys for the user ID 72f62077d23a6eeb4a772836
. To get the list, we will pass a GET request to the URI https://public-api.eu.bluedolphin.app/v1/user-api-keys?UserId=72f62077d23a6eeb4a772836
.
curl -L 'https://public-api.eu.bluedolphin.app/v1/user-api-keys?UserId=72f62077d23a6eeb4a772836' \ -H 'x-key: YOURAPIKEYSECRET' \ -H 'tenant: yourtenantname' \ -H 'Content-Type: application/json'
Response properties
Property | Type | Description |
id | string | Unique identifier for the API key |
user_id | string | Unique identifier for the user |
name | string | Key name |
expiration_date | string | The date of expiration in ISO-8601 date format (YY-MM-DD) |
created_on | string | The date of creation in ISO-8601 date-time Zulu format |
updated_on | string | null | The date of the last update in ISO-8601 date-time Zulu format or null when not updated yet |
scopes | string[] | The list of scope identifiers. Currently, there is one value available, which is 'public_api'. |
A successful call returns a response with a 200 OK
HTTP status code and the following array:
[ { "id": "63c57b3882345012d9e7a157", "user_id": "72f62077d23a6eeb4a772836", "name": "NewKey", "expiration_date": "2024-08-08", "created_on": "2023-08-08T09:15:00Z", "updated_on": "2023-08-09T10:15:00Z", "scopes": [ "public_api" ] }, { "id": "57b57c2197287115e4a3e397", "user_id": "72f62077d23a6eeb4a772836", "name": "NewAPIKey", "expiration_date": "2024-07-08", "created_on": "2023-07-08T09:15:00Z", "updated_on": "2023-07-08T10:15:00Z", "scopes": [ "public_api" ] } ]