Link Search Menu Expand Document

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 member in the passed members field and ensures that there’s a record for that user in the profiles collection [404].
  • Generates a unique accessID.
  • Finds the profile of the record corresponding to the uid passed from the profiles collection and creates and saves a new object inside of the access_groups field using the uid, name andmembers fields passed, as well as the generated accessID.