Create
/api/v2/access/create
Post
profiles
jwt
Purpose
To allow a user to create an Access Group.
Body Content [input]
{
uid: string,
name: string,
members: string[]
}
Returns if valid [output]
{
accessID: string,
error: 0
}
What the API does
- Loops through each of the
memberin the passedmembersfield and ensures that there’s a record for thatuserin theprofilescollection [404]. - Generates a unique
accessID. - Finds the
profileof the record corresponding to theuidpassed from theprofilescollection and creates and saves a new object inside of theaccess_groupsfield using theuid,nameandmembersfields passed, as well as the generatedaccessID.