Procedure · POST
group.opensocial.putRole
Create or update a role and its grant.
Create or update a role and its grant. Requires group.configure.
- Requires
group.configure
Input
groupstring · didrequiredThe group DID. Every method is served by the group's host and authorized against that group's roles.
rolestringrequirednamestringrequiredWhat the role is called. Written as the role record's displayName.
descriptionstringbotbooleanWhether 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.
defaultbooleanWhether members get this role when they join. Omitted keeps the role's current value.
actionsarray of group.opensocial.defs#actionrequiredWhat the role may do. Written as the scopes that grant each, beside any other scope the role already holds.
assignablearray of stringrepoCollectionsarray of stringCollections 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.
Output
uristring · at-urirequiredcidstring · cidrequiredSchema
Lexicon JSON
{
"lexicon": 1,
"id": "group.opensocial.putRole",
"defs": {
"main": {
"type": "procedure",
"description": "Create or update a role and its grant. 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": "What the role is called. Written as the role record's displayName."
},
"description": {
"type": "string"
},
"bot": {
"type": "boolean",
"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."
},
"default": {
"type": "boolean",
"description": "Whether members get this role when they join. Omitted keeps the role's current value."
},
"actions": {
"type": "array",
"items": {
"type": "ref",
"ref": "group.opensocial.defs#action"
},
"description": "What the role may do. Written as the scopes that grant each, beside any other scope the role already holds."
},
"assignable": {
"type": "array",
"items": {
"type": "string",
"maxLength": 64
}
},
"repoCollections": {
"type": "array",
"items": {
"type": "string"
},
"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."
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": [
"uri",
"cid"
],
"properties": {
"uri": {
"type": "string",
"format": "at-uri"
},
"cid": {
"type": "string",
"format": "cid"
}
}
}
}
}
}
}