From cf793dae3fead1df84b6544ee8d2ada53b89efff Mon Sep 17 00:00:00 2001 From: David Read Date: Wed, 7 Dec 2011 17:04:08 +0000 Subject: [PATCH] [doc][s]: Mentioned alternative API authorization header. --- doc/api.rst | 8 ++------ doc/apiv3.rst | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/doc/api.rst b/doc/api.rst index cac5e9f177b..e53985553bc 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -429,13 +429,9 @@ To obtain your API key: 2. The user page shows the API Key: /user/me -The key should be passed in the API request header: +The key should be passed in the API request header ''Authorization'' (or an alternative may be provided such as ''X-CKAN-API-KEY''). For example:: -================= ===== -Header Example value -================= ===== -Authorization ``fde34a3c-b716-4c39-8dc4-881ba115c6d4`` -================= ===== + curl http://thedatahub.org/api/rest/package -d '{"name": "test"}' -H 'Authorization: fde34a3c-b716-4c39-8dc4-881ba115c6d4' If requests that are required to be authorized are not sent with a valid Authorization header, for example the user associated with the diff --git a/doc/apiv3.rst b/doc/apiv3.rst index 92acef984be..4a4485d1700 100644 --- a/doc/apiv3.rst +++ b/doc/apiv3.rst @@ -223,13 +223,9 @@ To obtain your API key: 2. The user page shows the API Key: /user/me -The key should be passed in the API request header: +The key should be passed in the API request header ''Authorization'' (or an alternative may be provided such as ''X-CKAN-API-KEY''). For example:: -================= ===== -Header Example value -================= ===== -Authorization ``fde34a3c-b716-4c39-8dc4-881ba115c6d4`` -================= ===== + curl http://thedatahub.org/api/rest/package -d '{"name": "test"}' -H 'Authorization: fde34a3c-b716-4c39-8dc4-881ba115c6d4' If requests that are required to be authorized are not sent with a valid Authorization header, for example the user associated with the