Skip to content

Users

Functions providing user management and membership management. Applying membership that already exists - for example adding a user to a group they already belong to - will have no negative side effect.

CreateUser

    core.CreateUser({email=...})

Create a user if the email is available. Will automatically add to the existing org.

  • Object
    • email: UUID!: email
    • groupId: UUID: (Create) group id
    • externalId: String: (Create) org scoped external id
    • title: String: (Create) org scoped title
    • first: String: (Create) first
    • last: String: (Create) last
    • name: String: (Create) name
    • mobile: String: (Create) mobile
    • gender: String: male | female | other
    • dob: String: valid date
  • Boolean

AddEmailToOrg

    core.AddEmailToOrg({email=...})

Add user to the current org.

  • Object
    • email: String!: email
    • externalId: String: org scoped external id
  • Boolean

AddEmailToGroup

    core.AddEmailToGroup({email=...})

Add user to a specific group using their email.

  • Object
    • email: String!: email
    • groupId: UUID!: group id
  • Boolean

AddToGroup

    core.AddToGroup({id=...})

Add user to a specific group using their user id.

  • Object
    • userId: UUID!: user id
    • id: UUID!: group id
  • Boolean

AddUserLabel

    core.AddUserLabel({userId=...})

Add user label

  • Object
    • userId: UUID!: user id
    • labelId: UUID!: group id
  • Boolean

RemoveUserLabel

    core.RemoveUserLabel({id=...})

Remove user label

  • Object
    • userId: UUID!: user id
    • labelId: UUID!: group id
  • Boolean

UserHasGroup

    core.UserHasGroup({userId=...})

Check to see if a user belongs to a group.

  • Object
    • id: UUID!: email
    • handle: String!: group handle
  • Boolean

UserHasLabel

    core.UserHasLabel({userId=...})

Check to see if a user has a label.

  • Object
    • userId: UUID!: email
    • handle: String!: label handle
  • Boolean

ModifyProgramMembership

    core.ModifyProgramMembership({userId=...})

Add or update the program membership state for a user.

  • Object
    • email: String: provide either user id or email
    • userId: UUID: provide either user id or email
    • programId: UUID!: program id
    • cohortId: UUID!: cohort id
    • role: member | trainer | observer
  • Boolean

AddUserToChannel

    core.AddUserToChannel({userId=...})

Add user to a channel.

  • Object
    • userId: UUID: provide either user id or email
    • channelId: UUID!: cohort id
    • kind: group | ad-hoc | org | managed
  • Boolean

ModifyUser

    core.ModifyUser({userId=...})

Update user properties.

  • Object
    • userId: UUID: user id
    • status: active | retired
    • role: user | admin
    • title: String: org scoped title
    • externalId: String: org scoped external id
    • externalStatus: String: external status
  • Boolean