diff --git a/swh/web/templates/api/api.html b/swh/web/templates/api/api.html --- a/swh/web/templates/api/api.html +++ b/swh/web/templates/api/api.html @@ -242,8 +242,8 @@

Rate limiting

Due to limited resource availability on the back end side, API usage is currently rate limited. - Furthermore, as API usage is currently entirely anonymous (i.e., without any authentication), - API "users" are currently identified by their origin IP address. + Anonymous (i.e., without any authentication) API "users" are currently identified by their origin + IP address.

@@ -270,6 +270,29 @@ X-RateLimit-Limit: 60 X-RateLimit-Remaining: 54 X-RateLimit-Reset: 1485794532 + +

Authentication

+

+ It is possible to perform authenticated requests to the Web API through the use of a bearer token + sent in HTTP Authorization headers. +
+ To obtain such a token, an account to the + Software Heritage Authentication service must be created. +
+ To generate and manage bearer tokens, a dedicated interface is available on the + user profile page once logged in. +

+

+ The following shows how to perform an authenticated request to the Web API using curl. +

curl -H "Authorization: Bearer ${TOKEN}" {{ site_base_url }}api/...
+

+

+ Authenticated requests can be used to lift rate limiting if the user account has the adequate + permission. + If you are in such a need, please contact us + and we will review your request. +

+