diff options
author | David Lawrence <dkl@mozilla.com> | 2015-09-24 16:47:18 +0200 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2015-09-24 16:47:53 +0200 |
commit | 923afd71d4bf1c0854deae96d3af7fd6d268646e (patch) | |
tree | 883bb776040b0c8ae3b98b83efaeee0fba4561a4 /docs/en/rst/api | |
parent | 89e65535c55fb20c916e2ed9492aaae265f5c5de (diff) | |
download | bugzilla-923afd71d4bf1c0854deae96d3af7fd6d268646e.tar.gz bugzilla-923afd71d4bf1c0854deae96d3af7fd6d268646e.tar.xz |
Bug 1204683: Add whoami endpoint
Diffstat (limited to 'docs/en/rst/api')
-rw-r--r-- | docs/en/rst/api/core/v1/user.rst | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/en/rst/api/core/v1/user.rst b/docs/en/rst/api/core/v1/user.rst index e27211a7f..7f835cc8a 100644 --- a/docs/en/rst/api/core/v1/user.rst +++ b/docs/en/rst/api/core/v1/user.rst @@ -378,3 +378,38 @@ and not in 'editusers' group, you will only be returned the ``id``, ``name``, returned are filtered based on your permission to bless each group. The ``saved_searches`` and ``saved_reports`` items are only returned if you are querying your own account, even if you are in the editusers group. + +.. _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. +========== ====== ===================================================== |