Skip to content

Workspaces API

Workspace endpoints управляют рабочими пространствами, участниками и avatar workspace.

GET /api/v2/workspaces

Возвращает список workspaces, доступных текущему account.

Arguments: нет.

Payload: нет.

Response: array of workspace views.

GET /api/v2/workspaces/:fullname

Возвращает один workspace.

Arguments:

ArgumentLocationDescription
fullnamePathWorkspace fullname.

Payload: нет.

Response: workspace view.

PUT /api/v2/workspaces/:fullname

Создает новый workspace или обновляет существующий.

Arguments:

ArgumentLocationDescription
fullnamePathWorkspace fullname. Должен совпадать с payload.fullname.

Payload:

FieldRequiredDescription
fullnameДаWorkspace fullname.
createOnlyНетЕсли true, endpoint вернет ошибку, если workspace уже существует.
resetInviteНетПерегенерировать invite state.
tagsНетArray of tags.
labelsНетObject with string labels.
meta.titleНетВидимое название workspace.
meta.avatarНетAvatar URL.

Response: workspace view.

DELETE /api/v2/workspaces/:fullname

Удаляет workspace.

Arguments:

ArgumentLocationDescription
fullnamePathWorkspace fullname.

Payload: нет.

Response: operation result.

POST /api/v2/workspaces/:fullname/avatar

Загружает avatar workspace.

Arguments:

ArgumentLocationDescription
fullnamePathWorkspace fullname.

Payload:

FieldRequiredDescription
filenameДаOriginal filename.
contentTypeДаMIME type изображения.
dataДаBase64 image data.

Response: workspace view или avatar upload result с новым avatar URL.

GET /api/v2/workspaces/:workspace/acl

Возвращает список members/ACL entries workspace.

Arguments:

ArgumentLocationDescription
workspacePathWorkspace fullname.

Payload: нет.

Response: ACL entries.

POST /api/v2/workspaces/:workspace/acl

Создает invite или ACL entry.

Arguments:

ArgumentLocationDescription
workspacePathWorkspace fullname.

Payload:

FieldRequiredDescription
inviteДаInvite id/token.

Response: created ACL entry.

PUT /api/v2/workspaces/:workspace/acl/:entryId

Меняет роль member.

Arguments:

ArgumentLocationDescription
workspacePathWorkspace fullname.
entryIdPathACL entry id.

Payload:

FieldRequiredDescription
levelДаOne of owner, admin, developer, user.

Response: updated ACL entry.

DELETE /api/v2/workspaces/:workspace/acl/:entryId

Удаляет member/ACL entry.

Arguments:

ArgumentLocationDescription
workspacePathWorkspace fullname.
entryIdPathACL entry id.

Payload: нет.

Response: operation result.