health.hats.institution.endRole

An administrator ends someone's role at their institution, when the person didn't choose to go, or records a leaving by revoking the credential. The node writes the ended PractitionerRole, pointing its forward where the administrator says, and a Provenance naming the administrator. Authenticated as the administrator (service auth), who must hold institution.administrator there.

Repository @hats.health did:plc:uvvhtareovj2oaregs7vsibv namespace authority
Details · procedure
Kindprocedure
Authorityinstitution.hats.health
Indexed
cid bafyreiecm2wvv2dsyuj3mbxptnol3jol64lmi2ey2wt2nnutsul3hulk6q

Checks

Valid Lint pass
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "An administrator ends someone's role at their institution, when the person didn't choose to go, or records a leaving by revoking the credential. The node writes the ended PractitionerRole, pointing its forward where the administrator says, and a Provenance naming the administrator. Authenticated as the administrator (service auth), who must hold institution.administrator there.",
      "errors": [
        {
          "description": "The caller holds no institution.administrator role in force there.",
          "name": "NotAdministrator"
        },
        {
          "description": "The person holds no role there to end.",
          "name": "NoRole"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "forward": {
              "description": "Whom requests for them go to now: a colleague's DID, or the institution's own. The ended role's endpoint.",
              "format": "did",
              "type": "string"
            },
            "institution": {
              "description": "The institution, by its DID.",
              "format": "did",
              "type": "string"
            },
            "practitioner": {
              "description": "Whose role ends.",
              "format": "did",
              "type": "string"
            }
          },
          "required": [
            "institution",
            "practitioner"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "endedAt": {
              "format": "datetime",
              "type": "string"
            },
            "role": {
              "description": "The ended PractitionerRole, which stays published with its end date.",
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "role",
            "endedAt"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "health.hats.institution.endRole",
  "lexicon": 1
}