summaryrefslogtreecommitdiffstats
path: root/docs/en
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2016-10-12 23:45:15 +0200
committerDavid Lawrence <dkl@mozilla.com>2016-10-12 23:45:15 +0200
commit31651c978e921e9e46cddd455f103fcf4b1a332a (patch)
treeb88b472993fa3f99aeec128e8fccfd687173acc4 /docs/en
parentecc8545925a3c591bc6cbbfe0220e05eebe4e294 (diff)
downloadbugzilla-31651c978e921e9e46cddd455f103fcf4b1a332a.tar.gz
bugzilla-31651c978e921e9e46cddd455f103fcf4b1a332a.tar.xz
Bug 1307003 - Add whoami endpoint
r=dylan
Diffstat (limited to 'docs/en')
-rw-r--r--docs/en/rst/api/core/v1/user.rst35
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 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.
+========== ====== =====================================================