Document how to check via REST if a user has a certain capability
Change-Id: I78493e9dba2fea1aafd3a08b1e4302f74354a980
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
diff --git a/Documentation/rest-api-accounts.txt b/Documentation/rest-api-accounts.txt
index 6de0690..bbcc44f 100644
--- a/Documentation/rest-api-accounts.txt
+++ b/Documentation/rest-api-accounts.txt
@@ -110,6 +110,33 @@
get::/accounts/self/capabilities?q=createGroup
****
+[[check-account-capability]]
+GET /accounts/\{account-id\}/capabilities/\{capability-id\} (Check Account Capability)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Checks if a user has a certain global capability.
+
+.Request
+----
+ GET /a/accounts/self/capabilities/createGroup HTTP/1.0
+----
+
+If the user has the global capability the string `ok` is returned.
+
+.Response
+----
+ HTTP/1.1 200 OK
+
+ ok
+----
+
+If the user doesn't have the global capability the response is
+`404 Not Found`.
+
+.Check if you can create groups
+****
+get::/accounts/self/capabilities/createGroup
+****
+
[[ids]]
IDs
@@ -129,6 +156,12 @@
* a user name ("username")
* `self` for the calling user
+[[capability-id]]
+\{capability-id\}
+~~~~~~~~~~~~~~~~~
+Identifier of a global capability. Valid values are all field names of
+the link:#capability-info[CapabilityInfo] entity.
+
[[json-entities]]
JSON Entities