Skip to content
Rudolf Kvašňovský edited this page Oct 19, 2018 · 1 revision

API

  • The API is accessible at host:port**/api**. The port may be configured in application.yml file
  • Most of the request requires JWT authorization.
  • Authorization token is obtained in the response header of a successful login request.
  • Authorization header format: 'Authorization:Bearer authorization-token'
  • For now: no role is needed for login endpoint of user-api, READ/READ-WRITE role is needed for aip-api endpoints, ADMIN role is needed for all other endpoints
  • See @RolesAllowed annotation from classes in cz.cas.lib.arcstorage.api package for up-to-date information about roles which are allowed to call the particular endpoint.

Swagger Documentation

  • The Swagger documentation is accessible at: host:port**/swagger-ui.html**.
  • Use login method from user-api to obtain the authorization token. Basic authentication headers for the three different test users are noted in the endpoint description.
  • To use the JWT Authorization header with each request, copy the token obtained from login endpoint to the authentication text field at the top of the swagger page.
  • The Swagger download link used to download object during object retrieval request is broken. Use other tool, e.g. Postman or cURL to call the object retrieval endpoints. Due to the need of authorization header it is not possible to call the endpoint just by pasting the URL to the address bar.
Clone this wiki locally