MenuMethods

Procedure · POST

group.opensocial.putRole

Create or update a role and its action bindings.

Create or update a role and its action bindings. Requires group.configure.

Requires
group.configure

Input

groupstring · didrequired

The group DID. Every method is served by the group's host and authorized against that group's roles.

rolestringrequired
≤ 64 bytes
namestringrequired
descriptionstring
actionsarray of group.opensocial.permissions#actionrequired
assignablearray of string
≤ 64 bytes
repoCollectionsarray of string

See group.opensocial.permissions#binding. Omitted keeps the role's current value.

Output

uristring · at-urirequired
cidstring · cidrequired

Schema

Lexicon JSON
{
  "lexicon": 1,
  "id": "group.opensocial.putRole",
  "defs": {
    "main": {
      "type": "procedure",
      "description": "Create or update a role and its action bindings. Requires group.configure.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": [
            "group",
            "role",
            "name",
            "actions"
          ],
          "properties": {
            "group": {
              "type": "string",
              "format": "did",
              "description": "The group DID. Every method is served by the group's host and authorized against that group's roles."
            },
            "role": {
              "type": "string",
              "maxLength": 64
            },
            "name": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "actions": {
              "type": "array",
              "items": {
                "type": "ref",
                "ref": "group.opensocial.permissions#action"
              }
            },
            "assignable": {
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 64
              }
            },
            "repoCollections": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "See group.opensocial.permissions#binding. Omitted keeps the role's current value."
            }
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": [
            "uri",
            "cid"
          ],
          "properties": {
            "uri": {
              "type": "string",
              "format": "at-uri"
            },
            "cid": {
              "type": "string",
              "format": "cid"
            }
          }
        }
      }
    }
  }
}

← All methods