//SCHEMADocs
Console

Members

Members are the people who sign in to the //SCHEMA console on behalf of your organization. Each has one role:

RoleScopes
ownerall six scopes
adminall six scopes
membereverything except config_write

Owners and admins can manage members and credentials; only an owner can make someone else an owner. Nobody can change their own role or remove themselves — another administrator has to.

See Manage members.

The OrgMember object#

A person with access to your organization.

Attributes

  • userPkInt!
    Unique identifier.
  • emailString!
    Their email address, which is also their login.
  • displayNameStringnullable
    Their name, if set.
  • roleString!
    owner, admin or member.
  • statusString!
    invited, active, suspended or deactivated. Only active members can sign in.
  • hasPasswordBoolean!
    Whether they have a password at all.
  • joinedAtDateTime!
    When they joined your organization.
  • lastLoginAtDateTimenullable
    When they last signed in.
  • sharedWithOtherOrgsBoolean!
    Whether they also belong to another organization. If so, you cannot reset their password.
  • isYouBoolean!
    true on the caller's own row.

The AddedMember object#

The result of addOrgMember.

Attributes

  • userPkInt!
    The member's user id.
  • emailString!
    Their email address.
  • roleString!
    The role they were given.
  • passwordStringnullable
    A generated password, shown once. null if they already had a //SCHEMA account.
  • createdBoolean!
    true if a new account was created; false if an existing user joined.

The AddOrgMemberInput input object#

A person to add.

Fields

  • emailString!required
    Their email address, which becomes their login. Case-insensitive for matching.
  • displayNameString
    Their name. Optional.
  • roleString
    owner, admin or member. Defaults to member.

List members#

queryorgMembers→[OrgMember!]!config_read

Everyone with access to your organization, longest-standing first.

Arguments

None.

Returns

A list of OrgMember objects.

Request
query {
  orgMembers {
    userPk
    email
    role
    status
    isYou
  }
}
Response
{
  "data": {
    "orgMembers": [
      { "userPk": 1001, "email": "[email protected]", "role": "owner", "status": "active", "isYou": true },
      { "userPk": 1044, "email": "[email protected]", "role": "member", "status": "active", "isYou": false }
    ]
  }
}

List grantable roles#

querygrantableRoles→[String!]!config_write

The roles this caller may give a member. Includes owner only for a signed-in owner.

Arguments

None.

Returns

A list of role names — member, admin, and possibly owner.

Request
query {
  grantableRoles
}
Response
{
  "data": {
    "grantableRoles": ["member", "admin"]
  }
}

Add a member#

mutationaddOrgMember→AddedMember!config_write

Add someone to your organization by email address.

If the address is new to //SCHEMA, an account is created and a generated password is returned once in password. If the person already has a //SCHEMA account (for another organization), they join with their existing credential and password is null.

Arguments

  • inputAddOrgMemberInput!required
    Who to add, and in what role.
    Show child parameters
    • emailString!required
      Their email address, which becomes their login. Case-insensitive for matching.
    • displayNameString
      Their name. Optional.
    • roleString
      owner, admin or member. Defaults to member.

Returns

An AddedMember.

Request
mutation {
  addOrgMember(input: { email: "[email protected]", role: "admin" }) {
    userPk
    role
    created
    password
  }
}
Response
{
  "data": {
    "addOrgMember": {
      "userPk": 1052,
      "role": "admin",
      "created": true,
      "password": "7KQ2M-D9XHT-4VRWB-P3NZE"
    }
  }
}

Change a member's role#

mutationsetOrgMemberRole→Boolean!config_write

Give a member a different role. You cannot change your own role, only an owner can grant owner, and the last owner cannot be demoted.

Arguments

  • userPkInt!required
    The member.
  • roleString!required
    owner, admin or member.

Returns

true on success.

Request
mutation {
  setOrgMemberRole(userPk: 1044, role: "admin")
}
Response
{
  "data": {
    "setOrgMemberRole": true
  }
}

Remove a member#

mutationremoveOrgMember→Boolean!config_write

Remove someone from your organization. Their access ends on their next request. Their //SCHEMA account survives, since it may belong to other organizations. You cannot remove yourself.

Arguments

  • userPkInt!required
    The member to remove.

Returns

true if they were a member and were removed; false otherwise.

Request
mutation {
  removeOrgMember(userPk: 1044)
}
Response
{
  "data": {
    "removeOrgMember": true
  }
}

Reset a member's password#

mutationresetOrgMemberPassword→String!config_write

Replace a member's password with a generated one and sign them out everywhere. The new password is returned once.

Refused for your own account (use changePassword) and for anyone who also belongs to another organization — their credential is not yours to replace.

Arguments

  • userPkInt!required
    The member.

Returns

The new password.

Request
mutation {
  resetOrgMemberPassword(userPk: 1044)
}
Response
{
  "data": {
    "resetOrgMemberPassword": "R8WEM-2KT9C-HX4QZ-B7NPA"
  }
}

Change your password#

mutationchangePassword→Boolean!any credential

Change the signed-in user's own password. Requires the current password. Every other session of yours is signed out; the one making this request stays signed in.

Only for signed-in users — an API key has no password, and the request is refused.

Arguments

  • oldPasswordString!required
    Your current password.
  • newPasswordString!required
    The new password.

Returns

true on success.

Request
mutation ChangePassword($old: String!, $new: String!) {
  changePassword(oldPassword: $old, newPassword: $new)
}
Variables
{
  "old": "correct horse battery",
  "new": "staple orbit lantern fjord"
}
Response
{
  "data": {
    "changePassword": true
  }
}