Skip to content

Latest commit

 

History

History
192 lines (110 loc) · 6.11 KB

RoleApi.md

File metadata and controls

192 lines (110 loc) · 6.11 KB

\RoleApi

All URIs are relative to http://localhost

Method HTTP request Description
AddMembersToRole Post /roles/{id}/members Add members to a role
CreateRole Post /roles Create a role
DeleteRole Delete /roles/{id} Get a role by its ID
GetRole Get /roles/{id} Get a role by its ID
ListRoles Get /roles List all roles
RemoveMembersFromRole Delete /roles/{id}/members Remove members from a role

AddMembersToRole

AddMembersToRole($id, $body)

Add members to a role

A Role represents a group of users that share the same role and thus permissions. A role could be an administrator, a moderator, a regular user or some other sort of role. This endpoint allows you to add members (users, applications, ...) to a specific role. You have to know the role's ID.

Parameters

Name Type Description Notes
id string The id of the role to modify.
body RoleMembers [optional]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreateRole

Role CreateRole($body)

Create a role

A Role represents a group of users that share the same role and thus permissions. A role could be an administrator, a moderator, a regular user or some other sort of role. This endpoint allows you to create a new role. You may define members as well but you don't have to.

Parameters

Name Type Description Notes
body Role [optional]

Return type

Role

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteRole

DeleteRole($id)

Get a role by its ID

A Role represents a group of users that share the same role and thus permissions. A role could be an administrator, a moderator, a regular user or some other sort of role. This endpoint allows you to delete an existing role. You have to know the role's ID.

Parameters

Name Type Description Notes
id string The id of the role to look up.

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetRole

Role GetRole($id)

Get a role by its ID

A Role represents a group of users that share the same role and thus permissions. A role could be an administrator, a moderator, a regular user or some other sort of role. This endpoint allows you to retrieve an existing role. You have to know the role's ID.

Parameters

Name Type Description Notes
id string The id of the role to look up.

Return type

Role

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListRoles

[]Role ListRoles($member, $limit, $offset)

List all roles

A Role represents a group of users that share the same role and thus permissions. A role could be an administrator, a moderator, a regular user or some other sort of role. This endpoint allows you to retrieve all roles that are stored in the system.

Parameters

Name Type Description Notes
member string The id of the member to look up. [optional]
limit int64 The maximum amount of policies returned. [optional]
offset int64 The offset from where to start looking. [optional]

Return type

[]Role

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RemoveMembersFromRole

RemoveMembersFromRole($id, $body)

Remove members from a role

A Role represents a group of users that share the same role and thus permissions. A role could be an administrator, a moderator, a regular user or some other sort of role. This endpoint allows you to remove members (users, applications, ...) from a specific role. You have to know the role's ID.

Parameters

Name Type Description Notes
id string The id of the role to modify.
body RoleMembers [optional]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]