Skip to content

Commit

Permalink
Update docs to reflect that api authorization must be base64 encoded (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jastraat authored Jul 24, 2023
1 parent 5ba4097 commit 8dd4515
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/user-guide/guide_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Learn more about :term:`Moderation State` here.
POST https://[site-domain]/api/1/metastore/schemas/dataset/items/[identifier]/revisions HTTP/1.1
Authorization: Basic user:password
Authorization: Basic [base64 encoded 'user:password' string]
{
"state": "hidden",
Expand Down
13 changes: 13 additions & 0 deletions docs/source/user-guide/guide_dataset.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ API
---
You will need to authenticate with a user account possessing the 'api user' role. Use *Basic Auth*.

Note that the username:password string submitted as the Authorization must be base 64 encoded.

You can obtain the base 64 encoded string from the command line by running the following (replace admin:admin with username:password):

.. code-block::
echo -n 'admin:admin' | base64
// Result
YWRtaW46YWRtaW4=
// When using basic auth via REST API
content-type: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Run a POST command to ``/api/1/metastore/schemas/dataset/items`` with a json formatted request body, the minimal elements are:


Expand Down

0 comments on commit 8dd4515

Please sign in to comment.