fyi.opensocial.putRole

Create or update a role and its grant. Requires group.configure.

Details · procedure
Kindprocedure
Authorityopensocial.fyi
Indexed
cid bafyreigkifrpahgal3attmlal6g6swscvok3ceeu7evm22whsqhcczyu6e

Checks

Valid
  • unlimited-string defs.main.input.schema.properties.descriptionNo maxLength, maxGraphemes or format limits this string.
  • unlimited-string defs.main.input.schema.properties.nameNo maxLength, maxGraphemes or format limits this string.
  • unlimited-string defs.main.input.schema.properties.repoCollections.itemsNo maxLength, maxGraphemes or format limits this string.
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Create or update a role and its grant. Requires group.configure.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "actions": {
              "description": "What the role may do. Written as the scopes that grant each, beside any other scope the role already holds.",
              "items": {
                "ref": "fyi.opensocial.defs#action",
                "type": "ref"
              },
              "type": "array"
            },
            "assignable": {
              "items": {
                "maxLength": 64,
                "type": "string"
              },
              "type": "array"
            },
            "bot": {
              "description": "Whether people with this role are bots: accounts that act on their own, not a person. Giving someone a bot role is how they are marked as one.",
              "type": "boolean"
            },
            "default": {
              "description": "Whether members get this role when they join. Omitted keeps the role's current value.",
              "type": "boolean"
            },
            "description": {
              "type": "string"
            },
            "group": {
              "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.",
              "format": "did",
              "type": "string"
            },
            "name": {
              "description": "What the role is called. Written as the role record's displayName.",
              "type": "string"
            },
            "repoCollections": {
              "description": "Collections holders may write in the group's public repo as the group, `*` for any; written as `repo:` scopes. Omitted keeps the role's current value.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "role": {
              "maxLength": 64,
              "type": "string"
            }
          },
          "required": [
            "group",
            "role",
            "name",
            "actions"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cid": {
              "format": "cid",
              "type": "string"
            },
            "uri": {
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "uri",
            "cid"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "fyi.opensocial.putRole",
  "lexicon": 1
}