Aleph API

‚Äč

Authorization

By default, any Aleph search will return only public documents in responses to [[API]] requests. If you want to access documents which are not marked public, you will need to sign into the tool. This can be done using the OAuth login flow (i.e. by directing the user to /api/2/sessions/login), with a password-based login that returns a JSON Web Token (JWT), or through the use of an API key.

The API key for any account can be found by clicking on the "Profile" menu item in the navigation menu. It must be sent on all queries using the Authorization HTTP header:

Authorization: ApiKey 363af1e2b03b41c6b3adc604956e2f66

Similarly, a JWT can be sent in the Authorization header, after it has been returned by the login and/or OAuth processes. Aleph does not use session cookies or any other type of stateful API.