API

WorkspaceSpace

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/organizations/{organization_id}/workspace_spaces create Created workspace space
GET /api/v1/organizations/{organization_id}/workspace_spaces list Workspace spaces visible to the current member
GET /api/v1/organizations/{organization_id}/workspace_spaces/{id} load Workspace space

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

workspace_spaces, err := client.WorkspaceSpace(nil).List(map[string]any{"organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(workspace_spaces)
workspace_space, err := client.WorkspaceSpace(nil).Load(map[string]any{"id": "example_id", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(workspace_space)
created, err := client.WorkspaceSpace(nil).Create(map[string]any{"organization_id": "example", "icon_name": "example", "name": "example", "slug": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

Construct client as shown in the Lua setup, then call the operations:

local workspace_spaces, err = client:WorkspaceSpace():list({ organization_id = "example" })
local workspace_space, err = client:WorkspaceSpace():load({ id = "example_id", organization_id = "example" })
local created, err = client:WorkspaceSpace():create({ organization_id = "example", icon_name = "example", name = "example", slug = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$workspace_spaces = $client->WorkspaceSpace()->list(["organization_id" => "example"]);
$workspace_space = $client->WorkspaceSpace()->load(["id" => "example_id", "organization_id" => "example"]);
$created = $client->WorkspaceSpace()->create(["organization_id" => "example", "icon_name" => "example", "name" => "example", "slug" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

workspace_spaces = client.WorkspaceSpace().list({"organization_id": "example"})
workspace_space = client.WorkspaceSpace().load({"id": "example_id", "organization_id": "example"})
created = client.WorkspaceSpace().create({ "organization_id": "example", "icon_name": "example", "name": "example", "slug": "example" })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

workspace_spaces = client.WorkspaceSpace.list({ "organization_id" => "example" })
workspace_space = client.WorkspaceSpace.load({ "id" => "example_id", "organization_id" => "example" })
created = client.WorkspaceSpace.create({ "organization_id" => "example", "icon_name" => "example", "name" => "example", "slug" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const workspace_spaces = await client.WorkspaceSpace().list({ organization_id: "example" })
const workspace_space = await client.WorkspaceSpace().load({ id: "example_id", organization_id: "example" })
const created = await client.WorkspaceSpace().create({ organization_id: "example", icon_name: "example", name: "example", slug: "example" })

Fields

Field Type Required Description
created_at string Yes Created At
default_branch string No Default Branch
description one,string,null Yes Description
hidden boolean Yes Hidden
icon_name string Yes Icon Name
id string Yes Id
import_status one,string,null Yes Import Status
name string Yes Name
organization_id string Yes Organization Id
position one,integer,null Yes Position
repository_id string Yes Repository Id
repository_slug string Yes Repository Slug
slug string Yes Slug
status string Yes Status
updated_at string Yes Updated At

create

POST /api/v1/organizations/{organization_id}/workspace_spaces

Operation ID: post_api_v1_organizations_organization_id_workspace_spaces.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes

Request body

application/json

Property Type Required Description
default_branch string No
description string No
icon_name enum: book-open, boxes, briefcase-business, code-xml, file-text, folder, ... Yes
name string Yes
slug string Yes

Responses

200: Created workspace space

application/json

Property Type Required Description
space object Yes
space.created_at string (date-time) Yes
space.description string Yes
space.hidden boolean Yes
space.icon_name enum: book-open, boxes, briefcase-business, code-xml, file-text, folder, ... Yes
space.id string Yes
space.import_status enum: queued, running, succeeded, failed, canceled Yes
space.name string Yes
space.organization_id string Yes
space.position integer Yes
space.repository_id string Yes
space.repository_slug string Yes
space.slug string Yes
space.status enum: active, archived Yes
space.updated_at string (date-time) Yes
201: Created workspace space

application/json

Property Type Required Description
space object Yes
space.created_at string (date-time) Yes
space.description string Yes
space.hidden boolean Yes
space.icon_name enum: book-open, boxes, briefcase-business, code-xml, file-text, folder, ... Yes
space.id string Yes
space.import_status enum: queued, running, succeeded, failed, canceled Yes
space.name string Yes
space.organization_id string Yes
space.position integer Yes
space.repository_id string Yes
space.repository_slug string Yes
space.slug string Yes
space.status enum: active, archived Yes
space.updated_at string (date-time) Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

list

GET /api/v1/organizations/{organization_id}/workspace_spaces

Operation ID: api_v1_organization_workspace_spaces.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes

Responses

200: Workspace spaces visible to the current member

application/json

Property Type Required Description
spaces array of object Yes
spaces[].created_at string (date-time) Yes
spaces[].description string Yes
spaces[].hidden boolean Yes
spaces[].icon_name enum: book-open, boxes, briefcase-business, code-xml, file-text, folder, ... Yes
spaces[].id string Yes
spaces[].import_status enum: queued, running, succeeded, failed, canceled Yes
spaces[].name string Yes
spaces[].organization_id string Yes
spaces[].position integer Yes
spaces[].repository_id string Yes
spaces[].repository_slug string Yes
spaces[].slug string Yes
spaces[].status enum: active, archived Yes
spaces[].updated_at string (date-time) Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

load

GET /api/v1/organizations/{organization_id}/workspace_spaces/{id}

Operation ID: api_v1_organization_workspace_space.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes

Responses

200: Workspace space

application/json

Property Type Required Description
space object Yes
space.created_at string (date-time) Yes
space.description string Yes
space.hidden boolean Yes
space.icon_name enum: book-open, boxes, briefcase-business, code-xml, file-text, folder, ... Yes
space.id string Yes
space.import_status enum: queued, running, succeeded, failed, canceled Yes
space.name string Yes
space.organization_id string Yes
space.position integer Yes
space.repository_id string Yes
space.repository_slug string Yes
space.slug string Yes
space.status enum: active, archived Yes
space.updated_at string (date-time) Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway