Groups

You can create , update , delete groups using our api and also you can assign users to groups.
For example assign some users (students) to group (classroom) and call it a class.
Each group can take as much students as you want.

Create a New Group

{Tenant endpoint}/groups

type :

headers
Name required type description
referer YES string The root of the application that is sending the request (your website at jusoorlabs.com)
accept YES string the basic accept header (always send it as application/json)
token YES string The token provided to you once you've registerd with Jusoor Labs API.
parameters
Name required type description
name YES string the name of the group to be created.
users OPTIONAL array array of integers , which are the id's of the users in the database

Get all groups

{Tenant endpoint}/groups

type :

headers
Name required type description
referer YES string The root of the application that is sending the request (your website at jusoorlabs.com)
accept YES string the basic accept header (always send it as application/json)
token YES string The token provided to you once you've registerd with Jusoor Labs API.
parameters
Name required type description
No parameters required for this request.

Get specific group with users

{Tenant endpoint}/groups/{group_id}

type :

headers
Name required type description
referer YES string The root of the application that is sending the request (your website at jusoorlabs.com)
accept YES string the basic accept header (always send it as application/json)
token YES string The token provided to you once you've registerd with Jusoor Labs API.
parameters
Name required type description
group_id YES Integer the id of the desired group to get (send in the url not in the body of the request).

Update a group

{Tenant endpoint}/group/{group_id}

type : or (if you send data as form data)

headers
Name required type description
referer YES string The root of the application that is sending the request (your website at jusoorlabs.com)
accept YES string the basic accept header (always send it as application/json)
token YES string The token provided to you once you've registerd with Jusoor Labs API.
parameters
Name required type description
group_id YES Integer the id of the desired role to get (send in the url not in the body of the request).
name YES string the name that the group's name will be updated to.
users OPTIONAL string array of integers , which are the id's of the users in the database

Delete a role

{Tenant endpoint}/groups/{group_id}

type :

headers
Name required type description
referer YES string The root of the application that is sending the request (your website at jusoorlabs.com)
accept YES string the basic accept header (always send it as application/json)
token YES string The token provided to you once you've registerd with Jusoor Labs API.
parameters
Name required type description
group_id YES Integer the id of the desired group to get (send in the url not in the body of the request).