Configure the REST API#

Colectica Repository exposes its functionality by providing a REST-style API. To enable and use the API, follow these steps:

  1. In appsettings.json, set API:EnableRESTv1 to true. See appsettings.json.

  2. Configure how API clients authenticate. Requests to the API must carry a bearer token in the Authorization header, unless Windows authentication is used.

  3. Assign roles to the users or applications that will call the API. See Roles.

Note

Visit the Colectica REST API v1 documentation page for details of every request and response.

For interactive documentation for all API methods, visit your Portal’s site: https://example.org/swagger. The Swagger page can be disabled with the RepositorySettings:Portal:DisableSwaggerUI setting.

Colectica Designer, Colectica Questionnaires, the Repository CLI, and the Colectica SDK all use this API to communicate with the repository.