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!
: emailgroupId: UUID
: (Create) group idexternalId: String
: (Create) org scoped external idtitle: String
: (Create) org scoped titlefirst: String
: (Create) firstlast: String
: (Create) lastname: String
: (Create) namemobile: String
: (Create) mobilegender: String
: male | female | otherdob: String
: valid date
- Boolean
AddEmailToOrg
core.AddEmailToOrg({email=...})
Add user to the current org.
- Object
email: String!
: emailexternalId: String
: org scoped external id
- Boolean
AddUserToOrg
core.AddUserToOrg({userId=...})
Add user to the current org using the user id
- Object
userId: String!
: emailexternalId: String
: org scoped external id
- Boolean
AddEmailToGroup
core.AddEmailToGroup({email=...})
Add user to a specific group using their email.
- Object
email: String!
: emailgroupId: UUID!
: group id
- Boolean
AddToGroup
core.AddToGroup({id=...})
Add user to a specific group using their user id.
- Object
userId: UUID!
: user idid: UUID!
: group id
- Boolean
RemoveUserGroup
core.RemoveUserGroup({id=...})
Remove user from a group using their user id.
- Object
userId: UUID!
: user idid: UUID!
: group id
- Boolean
AddUserLabel
core.AddUserLabel({userId=...})
Add user label
- Object
userId: UUID!
: user idlabelId: UUID!
: group id
- Boolean
RemoveUserLabel
core.RemoveUserLabel({id=...})
Remove user label
- Object
userId: UUID!
: user idlabelId: UUID!
: group id
- Boolean
UserHasGroup
core.UserHasGroup({userId=...})
Check to see if a user belongs to a group.
- Object
id: UUID!
: emailhandle: String!
: group handle
- Boolean
UserHasLabel
core.UserHasLabel({userId=...})
Check to see if a user has a label.
- Object
userId: UUID!
: emailhandle: 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 emailuserId: UUID
: provide either user id or emailprogramId: UUID!
: program idcohortId: UUID!
: cohort idrole
: member | trainer | observer
- Boolean
AddUserToChannel
core.AddUserToChannel({userId=...})
Add user to a channel.
- Object
userId: UUID
: provide either user id or emailchannelId: UUID!
: cohort idkind
: 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 idstatus
: active | retiredrole
: user | admintitle: String
: org scoped titleexternalId: String
: org scoped external idexternalStatus: String
: external status
- Boolean
ModifyRole
core.ModifyUser({userId=..., role=...})
Update user properties.
- Object
userId: UUID
: user idrole
: 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