Skip to content

Instantly share code, notes, and snippets.

@kpnemo
Created November 23, 2014 10:15
Show Gist options
  • Select an option

  • Save kpnemo/57a80fe3df1ecfbc9286 to your computer and use it in GitHub Desktop.

Select an option

Save kpnemo/57a80fe3df1ecfbc9286 to your computer and use it in GitHub Desktop.
User managment
GROUPS
GET /groups - get group index (?per_page=10&offset=20)
POST /groups - create new group
PUT /groups/:id - update group
DELETE /groups/:id - delete group
{
"id": id,
"name": "Group Name",
"descriptions": "Group descriptions",
"admins": [user1_id, user2_id]
}
USERS
{
"id": id,
"email": user@email.com,
"password": qazwsx,
"groups": [
{
"group_id": group_id,
"role": admin
}
],
"role": "default_user"
}
ROLES
GET, POST, DELETE /roles/:id
{
"id": id,
"name": "Role name",
"system_name": "role_name",
"permissions": permissions_id
}
PERMISSONS
GET, POST, DELETE /permissions/:id
{
"id": id,
"permissions": {
"PUST:groups": ""
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment