From 31651c978e921e9e46cddd455f103fcf4b1a332a Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Wed, 12 Oct 2016 21:45:15 +0000 Subject: Bug 1307003 - Add whoami endpoint r=dylan --- docs/en/rst/api/core/v1/user.rst | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'docs') diff --git a/docs/en/rst/api/core/v1/user.rst b/docs/en/rst/api/core/v1/user.rst index 90728287e..3e3f64bd6 100644 --- a/docs/en/rst/api/core/v1/user.rst +++ b/docs/en/rst/api/core/v1/user.rst @@ -429,3 +429,38 @@ querying your own account, even if you are in the editusers group. * 804 (Invalid Group Name) You passed a group name in the "groups" argument which either does not exist or you do not belong to it. + +.. _rest_user_whoami: + +Who Am I +-------- + +Allows for validating a user's API key, token, or username and password. +If sucessfully authenticated, it returns simple information about the +logged in user. + +**Request** + +.. code-block:: text + + GET /rest/whoami + +**Response** + +.. code-block:: js + + { + "id" : "1234", + "name" : "user@bugzulla.org", + "real_name" : "Test User", + } + +========== ====== ===================================================== +name type description +========== ====== ===================================================== +id int The unique integer ID that Bugzilla uses to represent + this user. Even if the user's login name changes, + this will not change. +real_name string The actual name of the user. May be blank. +name string string The login name of the user. +========== ====== ===================================================== -- cgit v1.2.3-24-g4f1b