Update user roles list API documentation

This commit is contained in:
Wayne Witzel III 2016-04-07 10:36:12 -04:00
parent 547506a3bf
commit 39f05e2f11
2 changed files with 16 additions and 0 deletions

View File

@ -183,4 +183,8 @@ class RoleMetadata(Metadata):
metadata = super(RoleMetadata, self).determine_metadata(request, view)
if 'actions' in metadata:
metadata['actions'].pop('POST')
metadata['actions']['POST'] = {
"id": {"type": "integer", "label": "ID", "help_text": "Database ID for this role."},
"disassociate": {"type": "integer", "label": "Disassociate", "help_text": "Provide to remove this role."},
}
return metadata

View File

@ -0,0 +1,12 @@
# List Roles for this User:
Make a GET request to this resource to retrieve a list of roles associated with the selected user.
{% include "api/_list_common.md" %}
# Associate Roles with this User:
Make a POST request to this resource to add or remove a role from this user. The following fields may be modified:
* `id`: Required. The Role ID to add to the user.
* `disassociate`: Optional. Provide if you want to remove the role.