Skip to main content

Retrieve users

Jetmir Abdija avatar
Written by Jetmir Abdija
Updated this week

Here you can find the steps for retrieving (all) users from the system. This endpoint serves to retrieve the list of (all) users that are available in the system, as well as their properties. Only the Administrator role in BlueDolphin can retrieve other users from the system.

HTTP responses

HTTP response status code

Interpretation

200 OK

Users retrieved successfully

400 Bad Request

One or more parameters are missing or incorrect.

The response body returns a specific error:

  • take is empty or incorrect

  • take is not 0 or greater

  • start_with is empty or incorrect

  • start_with value not found

401 Unauthorized

Invalid or missing API key secret and/or tenant

403 Forbidden

The user doesn’t have admin rights

To retrieve the list of users in your tenant, make a GET request to the /users[?start_with={start}&take={take}&include_guests={include_guests}] endpoint specifying:

  • Resource/endpoint destination URL. You can choose to send a request to get a complete list or, alternatively, set the optional parameters in the request URI to get a filtered list of users.

Parameter

Required

Type

Default

Description

start_with

X

string

Unique identifier for the user that is returned in the current response

take

X

number (0 or positive)

100

The number of users to return

include_guests

X

boolean

false

When set to true, the response will include guest user accounts.

  • The header for your API request

To retrieve the filtered list of users in our BlueDolphin tenant, where we get 3 starting from the ID 59e43775d51a8afb7d9433ab, we pass a GET request to the URI https://public-api.eu.bluedolphin.app/v1/users?start_with=59e43775d51a8afb7d9433ab&take=3.

curl -L 'https://public-api.eu.bluedolphin.app/v1/users?start_with=59e43775d51a8afb7d9433ab&take=3' \
-H 'x-api-key: YOURAPIKEYSECRET' \
-H 'tenant: yourtenantname' \
-H 'Content-Type: application/json'

Response properties

Property

Type

Description

total_items

number

The number of users returned. It can be checked against take.

users

array

User information

users[].id

string

Unique identifier for the user

users[].first_name

string

The first name of the user

users[].last_name

string

The last name of the user

users[].is_guest_user

boolean

Indicates if the user is a guest user

A successful call returns a response with a 200 OK HTTP status code and the following body:

{
    "total_items": 3,
    "users": [
        {
            "id": "59e43775d51a8afb7d9433ab",
            "first_name": "Jane",
            "last_name": "Smith",
            "is_guest_user": false
        },
        {
            "id": "59e43775d51a8afb7d943300",
            "first_name": "John",
            "last_name": "Blake",
            "is_guest_user": false
        },
        {
            "id": "59e43775d51a8afb7d943330",
            "first_name": "Hanna",
            "last_name": "Wright",
            "is_guest_user": false
        }
    ]
}
Did this answer your question?