AlmondTill/G3N API

Someone left — shut their access off

Take a person out of service — their sign-in stops working here; history stays intact.

Manage · a play in 1 step.

The steps

  1. Deactivate their user — access ends now; nothing about the past is lost. — deactivateUser

The calls

Every operation this use case runs, in the order it first appears, with the request and the response its reference page shows.

deactivateUser

deactivateUser — mutation · Deactivate a staff user — it stops being usable but keeps its history and can be reactivated.

Example request

mutation ExampleDeactivateUser($id: ID!, $revision: ID!, $reason: String) {
  deactivateUser(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    accountId
  }
}

Variables:

{
  "id": "01900000-0000-7000-8000-37386ae00000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "reason": "Correcting a miscount."
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

{
  "data": {
    "deactivateUser": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "US-EXMP-0000-000F",
      "type": "User",
      "caption": "Blue jeans",
      "status": "active",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "accountId": "01900000-0000-7000-8000-fec33a710000"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}