Document account-id for '/accounts/' REST endpoints

Change-Id: I5d82428fa3ab19e6e7b906f2cadeaad618fb36d8
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin 2013-02-14 14:22:25 +01:00
parent 92b7410572
commit f502dd0adf
3 changed files with 32 additions and 10 deletions

View File

@ -8,13 +8,16 @@ link:rest-api.html[REST API].
Endpoints
---------
[[accounts_self_capabilities]]
GET /accounts/self/capabilities (Account Capabilities)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[[list-account-capabilities]]
GET /accounts/\{account-id\}/capabilities (List Account Capabilities)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Returns the global capabilities (such as `createProject` or
`createGroup`) that are enabled for the calling user. This can be used
by UI tools to discover if administrative features are available
to the caller, so they can hide (or show) relevant UI actions.
`createGroup`) that are enabled for the specified user.
If the global capabilities for the calling user should be listed,
`self` can be used as account-id. This can be used by UI tools to
discover if administrative features are available to the caller, so
they can hide (or show) relevant UI actions.
.Request
----
@ -107,6 +110,25 @@ get::/accounts/self/capabilities?q=createGroup
****
[[ids]]
IDs
---
[[account-id]]
\{account-id\}
~~~~~~~~~~~~~~
Identifier that uniquely identifies one account.
This can be:
* a string of the format "Full Name <email@example.com>"
* just the email address ("email@example")
* a full name if it is unique ("Full Name")
* an account ID ("18419")
* a user name ("username")
* `self` for the calling user
GERRIT
------
Part of link:index.html[Gerrit Code Review]

View File

@ -932,14 +932,14 @@ IDs
[[account-id]]
\{account-id\}
~~~~~~~~~~~~~~
Identifier for an account.
Identifier that uniquely identifies one account.
This can be:
* a string of the format "Full Name <email@example.com>"
* just the email address ("email@example")
* a full name ("Full Name")
* an account id ("18419")
* a full name if it is unique ("Full Name")
* an account ID ("18419")
* a user name ("username")
[[group-id]]

View File

@ -274,7 +274,7 @@ ad-hoc scripting use cases.
** link:http://gerrit-documentation.googlecode.com/svn/Documentation/2.5/rest-api-projects.html[list projects]
** link:http://gerrit-documentation.googlecode.com/svn/Documentation/2.5/rest-api-projects.html#suggest-projects[suggest
projects]
** link:http://gerrit-documentation.googlecode.com/svn/Documentation/2.5/rest-api-accounts.html#accounts_self_capabilities[query
** link:http://gerrit-documentation.googlecode.com/svn/Documentation/2.5/rest-api-accounts.html#list-account-capabilities[query
the global capabilities of the calling user]
* Support link:http://gerrit-documentation.googlecode.com/svn/Documentation/2.5/rest-api.html#authentication[anonymous