This is an automated email from the ASF dual-hosted git repository. shaofengshi pushed a commit to branch document in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/document by this push: new e67017f KYLIN-1454 Add how to use python to generate authorization data for rest api e67017f is described below commit e67017f2a73465c3637c806f7dfa3a098ce5e71c Author: John Zhao <yunjz...@ebay.com> AuthorDate: Fri Feb 26 11:30:04 2016 -0800 KYLIN-1454 Add how to use python to generate authorization data for rest api Signed-off-by: shaofengshi <shaofeng...@apache.org> --- website/_docs/howto/howto_use_restapi.md | 4 ++++ website/_docs20/howto/howto_use_restapi.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/website/_docs/howto/howto_use_restapi.md b/website/_docs/howto/howto_use_restapi.md index 8c4b5f7..1479c93 100644 --- a/website/_docs/howto/howto_use_restapi.md +++ b/website/_docs/howto/howto_use_restapi.md @@ -48,6 +48,10 @@ This page lists the major RESTful APIs provided by Kylin. #### Request Header Authorization data encoded by basic auth is needed in the header, such as: Authorization:Basic {data} +You can generate {data} by using below python script +``` +python -c "import base64; print base64.standard_b64encode('$UserName:$Password')" +``` #### Response Body * userDetails - Defined authorities and status of current user. diff --git a/website/_docs20/howto/howto_use_restapi.md b/website/_docs20/howto/howto_use_restapi.md index 8a925bc..5d472bb 100644 --- a/website/_docs20/howto/howto_use_restapi.md +++ b/website/_docs20/howto/howto_use_restapi.md @@ -46,6 +46,10 @@ This page lists the major RESTful APIs provided by Kylin. #### Request Header Authorization data encoded by basic auth is needed in the header, such as: Authorization:Basic {data} +You can generate {data} by using below python script +``` +python -c "import base64; print base64.standard_b64encode('$UserName:$Password')" +``` #### Response Body * userDetails - Defined authorities and status of current user.