API Reference workspaces

Create a workspace

POST/projects/{project_id}/workspaces/

Create a workspace in the project sandbox, or a Git-bound workspace.

Parameters

Body fieldRequiredDescription
nameyesDisplay name
typeyeslocal (sandbox directory) or git (GitLab/GitHub bound)
slugnoDirectory name — generated when omitted, permanent once created
path_modewith localshared or tmp for local workspaces
provider / repo_url / token / default_branchwith gitGit repository binding
artifact_typenoknowledge_base turns the workspace into an OKF knowledge base

Request

curl -X POST "$ALLYBUILD_API_URL/projects/$PROJECT_ID/workspaces/" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"
  -d '{"name": "Docs", "type": "local", "path_mode": "shared"}'

Response

{
  "id": "2b1a9f8e-...",
  "name": "Docs",
  "slug": "docs",
  "type": "local",
  "path_mode": "shared"
}