API browser technical information

Prev Next

Introduction

This article provides additional guidance on using certain types of endpoints with the API browser, along with important limitations to be aware of. 

For an introduction to how to use the API browser, see the article Get started with the Docebo API browser.

API browser and additional fields

The additional fields used in the platform for the management of users, courses, and enrollment are managed by Superadmins as dynamic values and cannot be documented in the API browser documentation, as they change from platform to platform.

For the same reason, it is not possible to test additional fields from the API browser. As an example, if you want to filter courses according to a course additional field value where xx is the additional field ID (such as field_1, field_2, etc), the string to use would be something like:

https://yourdomain.docebosaas.com/learn/v1/enrollments?field_6=3

The ID to use in your query instead of xx will either be an integer (for example, for dropdown additional fields), a string (for a text additional field), an array, or a date (for date additional field). Here are some examples:

date

'field_12': {'from': '2018-06-26','to': '2018-06-30'},

textfield

'field_6': 'abc'

or

'field_6': ['abc', 'def'], dropdown: 'field_8': 3

iframe additional fields

Extend field_xx and field_xx_yy where yy is the field from the JSON configuration and use this syntax: '$^speakers^speaker'. The value will either be a string (for text additional field) or an array or a date (for date additional field). Examples:

date

'field_12$^datefield': {'from': '2018-06-26','to': '2018-06-30'},

textfield

'field6$^textfield': 'abc'

or

'field6$^textfield': ['abc', 'def']

Dynamically generated JSON attributes

Note that, in some rare cases, dynamically generated attributes in JSON data cannot be properly rendered in the user interface of the reference documentation. This could prevent you from testing the API directly from the documentation itself. In this case, we suggest you use a dedicated tool (for example, Postman).

Endpoints that download files

The API browser cannot be used to test calls to endpoints that download files, such as:

Download the course file content:

GET /learn/v1/filerepo/downloadCourseFile

Generate a PDF file that includes charts for the privacy policy:

POST /report/v1/privacy_policy/pdf

Download the course enrollment statistics PDF file:

POST /learn/v1/courses/enrollment_pdf

GET exported report file stream:

GET /analytics/v1/reports/{id_report}/exports/{id_export}/download

When called from the API browser interface, such endpoints will not return a response or download any file. To test them, please use Postman or other similar tools.

Dealing with array fields for GET requests

The query string parameters described as arrays, should be specified differently depending on the tool you’re using to consume the API:

  • Docebo API browser: Due to internal conversions applied by this tool, the parameters should be separated by a comma. In addition to that, if the parameters are strings, they must be wrapped with double quotes. Example:

    List of additional fields for enrollment status and performance metrics in API documentation.

    “enrollment_status”, “enrollment_completion_percentage”

  • Postman (or similar clients): The parameter must be followed by double square brackets and specified as many times as the values you need to pass. Example:

    API request parameters for retrieving enrollments from learning plans in Hydra.

    <ENDPOINT>?learning_plan_id[]=25&learning_plan_id[]=1&extra_fields[]=enrollment_time_spent&extra_fields[]=enrollment_status