RESTAPI:Basic request headers and client id

Aus Cryptshare Documentation
Wechseln zu:Navigation, Suche

Basic request headers

In each request the following header parameters are always required:

Header name Description Value of current Cryptshare version
X-CS-MajorApiVersion This value defines the major API version that should be used. Cryptshare servers may support multiple major api versions simultaneously. 1
X-CS-MinimumMinorApiVersion This value defines the minimum minor API version your requests require. If the server does not support your minimum minor API version, it returns an error and not all required endpoints might be available for you. 10

Client id

The Client id is the most important identifier for REST API consumers. It identifies a client and its attached verifications for email addresses. If it is registered for client id based verification in the Cryptshare Administration Interface, it should be treated like a password that could be used for performing various requests for multiple email addresses.

The Client id has to be used in the "X-CS-ClientId" header.

Therefore, a client id is a string that should have a length of 50 to 4000 characters, consisting of lower-case and upper-case letters and numbers.

Client id creation

RESTAPI endpoint for client id creation

The REST API offers a dedicated endpoint where consumers can request a randomly created client id. This client id should then be stored securely for further use.

GET https://<your-url>/api/clients

Self-created

When the environment supports a secure random generator, a client id could also be created on the consumer's side. Please note the above mentioned requirements for client ids and that the self-created client id should not be easy to guess by brute-force.