1.1. API Key Authentication
API Key Creation
API Keys are created from SocrateCloud user interface using the API Keys (or Chei API in romanian) window.
To create an API Key the following information must be provided:
User (mandatory): The user for which the API key is created
Role (mandatory): The role for which the API key is created
Description (optional): A description that will help in the future to remember the purpose for which the key was created
The created API key is displayed in a popup window so that you can copy it and save it to a secure location. After that popup window is closed it will no longer be possible to view the API key.
In case you loose the API key you will have to create a new one.
API Keys do not expire. If you want to stop access for an API Key you must either deactivate or delete it.
API Key Usage
API Key must be sent in the header of the request for each API call. The header name for api key token is x-api-key.
For example, get the list of allowed organization for selected role:
GET /webapi/rest/auth/roleOrgAccess HTTP/1.1
Host: api.socratecloud.com
x-api-key: NRr01JrKvtBYBqdqKK3RAixBi29d508a