Spaces API
Spaces and grants
GET /orgs/{org}/spaces
Spaces you can read.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
Responses
200- OK. Paged_Space
application/json
POST /orgs/{org}/spaces
Creates a space. Admins create any; members create private spaces they own.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
Request body
application/json, CreateSpace.
| Field | Type | Description |
|---|---|---|
default_role | null | Role | |
humans_only | boolean | Deny agents always. |
icon | string | null | Icon. |
name required | string | Name. |
slug required | string | Slug. |
visibility | null | Visibility |
Responses
201- Created. Space
application/json
GET /orgs/{org}/spaces/{slug}
A space.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
slug required | path | string | The space slug or id. |
Responses
200- OK. Space
application/json
PATCH /orgs/{org}/spaces/{slug}
Changes a space (managers; access changes need a human manager).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
slug required | path | string | The space slug or id. |
Request body
application/json, UpdateSpace.
| Field | Type | Description |
|---|---|---|
default_role | null | Role | |
humans_only | boolean | null | Deny agents always (humans only). |
icon | string | null | Icon. |
name | string | null | Name. |
settings | object | null | Settings to merge. |
visibility | null | Visibility |
Responses
200- OK. Space
application/json
DELETE /orgs/{org}/spaces/{slug}
Deletes (archives) a space (a human manager).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
slug required | path | string | The space slug or id. |
Responses
204- No content
GET /orgs/{org}/spaces/{slug}/grants
A space's grants (its managers).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
slug required | path | string | The space slug or id. |
Responses
200- OK. Paged_GrantView
application/json
GET /orgs/{org}/spaces/{slug}/grants/{subject}
One subject's grant.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
slug required | path | string | The space slug or id. |
subject required | path | string | The subject's handle (actor or team). |
Responses
200- OK. GrantView
application/json
PUT /orgs/{org}/spaces/{slug}/grants/{subject}
Grants a role in a space (a human manager).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
slug required | path | string | The space slug or id. |
subject required | path | string | The subject's handle (actor or team). |
Request body
application/json, PutGrant.
| Field | Type | Description |
|---|---|---|
role required | Role | The role. |
Responses
200- OK. GrantView
application/json
DELETE /orgs/{org}/spaces/{slug}/grants/{subject}
Removes a grant (a human manager).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
slug required | path | string | The space slug or id. |
subject required | path | string | The subject's handle (actor or team). |
Responses
204- No content