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

AddUserToOrg

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

Add user to the current org using the user id

  • Object
    • userId: 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

RemoveUserGroup

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

Remove user from a 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. Note that email, first and last name cannot be modified once a user has been created.

  • 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

ModifyRole

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

Update user properties.

  • Object
    • userId: UUID: user id
    • role: user | admin
  • Boolean

CreateSubscription

    core.CreateSubscription({.. sub info..}, userId)

Create a subscription

  • Object
    • paymentProvider: String:
    • providerHandle: String!:
    • paymentIdentity: SafeUuid:
    • paymentMethod: SafeUuid:
    • subscriptionIdentifier: String:
    • amount: Int!: amount as an integer (multiply decimal currencies by 100)
    • currency: String!:
    • status: String:
    • startDate: LocalDate:
    • endDate: LocalDate:
    • frequency: String:
    • renewal: String:
  • String: userId`:
  • Boolean

UserGroups

    core.UserGroups(userId)

List groups for a user

  • userId
  • Array of User Groups

UserRelations

    core.UserRelations(userId)

List relations for a user

  • userId
  • Array of User Relations

ModifyProfile

    core.ModifyProfile({})

Update the profile for a user

  • userId
  • name
  • first
  • last
  • Result of update