fyi. opensocial. createSpace
Create a space under the group with its access record and, unless index is false, an index entry. Requires space.create.
- Kind
- A method (procedure)
- Part of
- The reference host
- Record
at://did:plc:2gqnilpksz2e7faj3bwvo6qc/com.atproto.lexicon.schema/fyi.opensocial.createSpace
main procedure
Input
Encoding: application/json
| Field | Type | Description |
|---|---|---|
access (required) | fyi. | |
group (required) | string (did) | The group DID. Every method is served by the group's host and authorized against that group's roles. |
index | boolean
| Add the space to the group's index. |
name | string
| What the group calls it, kept in its index entry. |
skey | string (record-key) | Omit to generate a TID. |
type (required) | string (nsid) |
Output
Encoding: application/json
| Field | Type | Description |
|---|---|---|
access (required) | com. | |
index | com. | Present when the space was indexed. |
space (required) | string (space-ref) |
Errors
SpaceAlreadyExists: A space with this type and skey already exists.ReservedSpace: The meta and members spaces can't be created or deleted.UnknownRole: A grant names a role that doesn't exist.InvalidScope: A grant isn't a space scope.
The schema as published
{
"defs": {
"main": {
"description": "Create a space under the group with its access record and, unless index is false, an index entry. Requires space.create.",
"errors": [
{
"description": "A space with this type and skey already exists.",
"name": "SpaceAlreadyExists"
},
{
"description": "The meta and members spaces can't be created or deleted.",
"name": "ReservedSpace"
},
{
"description": "A grant names a role that doesn't exist.",
"name": "UnknownRole"
},
{
"description": "A grant isn't a space scope.",
"name": "InvalidScope"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"access": {
"ref": "fyi.opensocial.defs#accessConfig",
"type": "ref"
},
"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"
},
"index": {
"default": true,
"description": "Add the space to the group's index.",
"type": "boolean"
},
"name": {
"description": "What the group calls it, kept in its index entry.",
"maxGraphemes": 64,
"maxLength": 640,
"type": "string"
},
"skey": {
"description": "Omit to generate a TID.",
"format": "record-key",
"type": "string"
},
"type": {
"format": "nsid",
"type": "string"
}
},
"required": [
"group",
"type",
"access"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"access": {
"ref": "com.atproto.repo.strongRef",
"type": "ref"
},
"index": {
"description": "Present when the space was indexed.",
"ref": "com.atproto.repo.strongRef",
"type": "ref"
},
"space": {
"format": "space-ref",
"type": "string"
}
},
"required": [
"space",
"access"
],
"type": "object"
}
},
"type": "procedure"
}
},
"id": "fyi.opensocial.createSpace",
"lexicon": 1
}