LMS Collaborator knowledge base

Home/Technical requirements/API/API - Import organizational structure

API – Import organizational structure

  • To import an organizational structure, you need to send POST request to the following URI /api/v2/orgstructure/import

You can import the organizational structure in two ways:

  1. using a CSV file;
  2. in JSON format.

Import with CSV file

  • The request must be accompanied by a file in the CSV format like this:
  • The request must contain the headings Content-Type: multipart/form-data та X-Cbr-Authorization: Bearer API_TOKEN.

Request example:

curl 'https://your-domain.davintoo.com/api/v2/orgstructure/import' -H 'X-Cbr-Authorization: Bearer API_TOKEN' -H 'Content-Type: multipart/form-data' -F 'file=@/path/to/structure.csv'

Import of organizational structure in JSON format

Instead of a CSV file, you can add information about the organizational structure in JSON format to the body of the request, for example:

  • The request must contain the headers Content-Type: application/json and X-Cbr-Authorization: Bearer API_TOKEN
  • Body settings: raw, JSON

Request example:

`curl 'https://your-domain.davintoo.com/api/v2/orgstructure/import' -H 'X-Cbr-Authorization: Bearer API_TOKEN' -H 'Content-Type: application/json'

Still have questions?
Our technical support team is always happy to help!
Write to us at technical support [email protected]. If you are registered on our Helpdesk - send request button below.
Send request