Skip to content

Commit

Permalink
[doc][s]: Mentioned alternative API authorization header.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Read committed Dec 7, 2011
1 parent 3c18594 commit cf793da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 2 additions & 6 deletions doc/apiv3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cf793da

Please sign in to comment.