Codesphere workspaces API
The workspaces API from Codesphere — 21 operation(s) for workspaces.
The workspaces API from Codesphere — 21 operation(s) for workspaces.
openapi: 3.0.0
info:
title: Codesphere Public clusters workspaces API
version: 0.1.0
servers:
- url: https://cloud.codesphere.com/api
tags:
- name: workspaces
paths:
/workspaces/{workspaceId}:
get:
summary: getWorkspace
tags:
- workspaces
parameters:
- name: workspaceId
in: path
required: true
schema:
type: integer
minimum: 0
responses:
'200':
description: Success.
content:
application/json:
schema:
type: object
properties:
teamId:
type: integer
minimum: 0
name:
type: string
planId:
type: integer
minimum: 0
isPrivateRepo:
type: boolean
replicas:
type: integer
minimum: 1
id:
type: integer
minimum: 0
baseImage:
type: string
dataCenterId:
type: integer
minimum: 0
userId:
type: integer
gitUrl:
type: string
nullable: true
initialBranch:
type: string
nullable: true
sourceWorkspaceId:
type: integer
minimum: 0
nullable: true
welcomeMessage:
type: string
nullable: true
vpnConfig:
type: string
nullable: true
restricted:
type: boolean
collectTraces:
type: boolean
persistentLogs:
type: boolean
devDomain:
type: string
createdAt:
type: string
format: date-time
required:
- teamId
- name
- planId
- isPrivateRepo
- replicas
- id
- dataCenterId
- userId
- gitUrl
- initialBranch
- sourceWorkspaceId
- welcomeMessage
- vpnConfig
- restricted
- collectTraces
- persistentLogs
- createdAt
'400':
description: Path or request body variable does not match schema.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 400
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 401
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'404':
description: Workspace is not found.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 404
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
security:
- bearerAuth: []
operationId: workspaces-getWorkspace
patch:
summary: updateWorkspace
tags:
- workspaces
parameters:
- name: workspaceId
in: path
required: true
schema:
type: integer
minimum: 0
requestBody:
content:
application/json:
schema:
type: object
properties:
planId:
type: integer
minimum: 0
baseImage:
type: string
name:
type: string
replicas:
type: integer
minimum: 1
vpnConfig:
type: string
nullable: true
restricted:
type: boolean
storageMib:
type: integer
minimum: 1
nullable: true
sharedVaultName:
type: string
nullable: true
responses:
'200':
description: Success.
'400':
description: Path or request body variable does not match schema.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 400
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 401
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'404':
description: Workspace is not found.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 404
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
security:
- bearerAuth: []
operationId: workspaces-updateWorkspace
delete:
summary: deleteWorkspace
tags:
- workspaces
parameters:
- name: workspaceId
in: path
required: true
schema:
type: integer
minimum: 0
responses:
'200':
description: Success.
'400':
description: Path or request body variable does not match schema.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 400
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 401
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'404':
description: Workspace is not found.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 404
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
security:
- bearerAuth: []
operationId: workspaces-deleteWorkspace
/workspaces/{workspaceId}/status:
get:
summary: getWorkspaceStatus
tags:
- workspaces
parameters:
- name: workspaceId
in: path
required: true
schema:
type: integer
minimum: 0
responses:
'200':
description: Success.
content:
application/json:
schema:
type: object
properties:
isRunning:
type: boolean
required:
- isRunning
'400':
description: Path or request body variable does not match schema.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 400
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 401
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'404':
description: Workspace is not found.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 404
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
security:
- bearerAuth: []
operationId: workspaces-getWorkspaceStatus
/workspaces:
post:
summary: createWorkspace
tags:
- workspaces
parameters: []
requestBody:
content:
application/json:
schema:
type: object
properties:
teamId:
type: integer
minimum: 0
name:
type: string
planId:
type: integer
minimum: 0
isPrivateRepo:
type: boolean
replicas:
type: integer
minimum: 1
baseImage:
type: string
gitUrl:
type: string
initialBranch:
type: string
cloneDepth:
type: integer
minimum: 1
sourceWorkspaceId:
type: integer
minimum: 0
welcomeMessage:
type: string
vpnConfig:
type: string
restricted:
type: boolean
env:
type: array
items:
type: object
properties:
name:
type: string
pattern: ^[A-Za-z_][A-Za-z0-9_.-]*$
example: MY_VAR
value:
type: string
required:
- name
- value
storageMib:
type: integer
minimum: 1
sharedVaultName:
type: string
required:
- teamId
- name
- planId
- isPrivateRepo
- replicas
responses:
'200':
description: Success.
content:
application/json:
schema:
type: object
properties:
teamId:
type: integer
minimum: 0
name:
type: string
planId:
type: integer
minimum: 0
isPrivateRepo:
type: boolean
replicas:
type: integer
minimum: 1
id:
type: integer
minimum: 0
baseImage:
type: string
dataCenterId:
type: integer
minimum: 0
userId:
type: integer
gitUrl:
type: string
nullable: true
initialBranch:
type: string
nullable: true
sourceWorkspaceId:
type: integer
minimum: 0
nullable: true
welcomeMessage:
type: string
nullable: true
vpnConfig:
type: string
nullable: true
restricted:
type: boolean
collectTraces:
type: boolean
persistentLogs:
type: boolean
devDomain:
type: string
createdAt:
type: string
format: date-time
required:
- teamId
- name
- planId
- isPrivateRepo
- replicas
- id
- dataCenterId
- userId
- gitUrl
- initialBranch
- sourceWorkspaceId
- welcomeMessage
- vpnConfig
- restricted
- collectTraces
- persistentLogs
- createdAt
'400':
description: Path or request body variable does not match schema.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 400
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 401
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
security:
- bearerAuth: []
operationId: workspaces-createWorkspace
/workspaces/team/{teamId}:
get:
summary: listWorkspaces
tags:
- workspaces
parameters:
- name: teamId
in: path
required: true
schema:
type: integer
minimum: 0
responses:
'200':
description: Success.
content:
application/json:
schema:
type: array
items:
type: object
properties:
teamId:
type: integer
minimum: 0
name:
type: string
planId:
type: integer
minimum: 0
isPrivateRepo:
type: boolean
replicas:
type: integer
minimum: 1
id:
type: integer
minimum: 0
baseImage:
type: string
dataCenterId:
type: integer
minimum: 0
userId:
type: integer
gitUrl:
type: string
nullable: true
initialBranch:
type: string
nullable: true
sourceWorkspaceId:
type: integer
minimum: 0
nullable: true
welcomeMessage:
type: string
nullable: true
vpnConfig:
type: string
nullable: true
restricted:
type: boolean
collectTraces:
type: boolean
persistentLogs:
type: boolean
devDomain:
type: string
createdAt:
type: string
format: date-time
required:
- teamId
- name
- planId
- isPrivateRepo
- replicas
- id
- dataCenterId
- userId
- gitUrl
- initialBranch
- sourceWorkspaceId
- welcomeMessage
- vpnConfig
- restricted
- collectTraces
- persistentLogs
- createdAt
'400':
description: Path or request body variable does not match schema.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 400
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 401
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
security:
- bearerAuth: []
operationId: workspaces-listWorkspaces
/workspaces/{workspaceId}/landscape/deploy/{profile}:
post:
summary: deployLandscape
tags:
- workspaces
parameters:
- name: workspaceId
in: path
required: true
schema:
type: integer
minimum: 0
- name: profile
in: path
required: true
schema:
type: string
pattern: ^[\w-]+(\.[\w-]+)*$
example: my-profile
responses:
'200':
description: Success.
'400':
description: Workspace does not supportMulti Server Deployments, config contains an invalid templating reference, path or request body variable does not match schema.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 400
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 401
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'404':
description: Workspace is not found.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 404
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
security:
- bearerAuth: []
operationId: workspaces-deployLandscape-1
/workspaces/{workspaceId}/landscape/deploy:
post:
summary: deployLandscape
tags:
- workspaces
parameters:
- name: workspaceId
in: path
required: true
schema:
type: integer
minimum: 0
responses:
'200':
description: Success.
'400':
description: Workspace does not supportMulti Server Deployments, config contains an invalid templating reference, path or request body variable does not match schema.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 400
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 401
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'404':
description: Workspace is not found.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 404
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
security:
- bearerAuth: []
operationId: workspaces-deployLandscape
/workspaces/{workspaceId}/landscape/teardown:
delete:
summary: teardownLandscape
tags:
- workspaces
parameters:
- name: workspaceId
in: path
required: true
schema:
type: integer
minimum: 0
responses:
'200':
description: Success.
'400':
description: Path or request body variable does not match schema.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 400
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 401
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'404':
description: Workspace is not found.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 404
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
security:
- bearerAuth: []
operationId: workspaces-teardownLandscape
/workspaces/{workspaceId}/landscape/scale:
patch:
summary: scaleLandscapeServices
tags:
- workspaces
parameters:
- name: workspaceId
in: path
required: true
schema:
type: integer
minimum: 0
requestBody:
content:
application/json:
schema:
example:
myServer1: 3
myServer2: 2
type: object
additionalProperties:
type: integer
minimum: 1
responses:
'200':
description: Success.
'400':
description: Path or request body variable does not match schema.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 400
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 401
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'404':
description: Workspace is not found.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 404
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
security:
- bearerAuth: []
operationId: workspaces-scaleLandscapeServices
/workspaces/{workspaceId}/pipeline/{stage}/start/{profile}:
post:
summary: startPipelineStage
tags:
- workspaces
parameters:
- name: workspaceId
in: path
required: true
schema:
type: integer
minimum: 0
- name: stage
in: path
required: true
schema:
type: string
enum:
- prepare
- test
- run
- name: profile
in: path
required: true
schema:
type: string
pattern: ^[\w-]+(\.[\w-]+)*$
example: my-profile
responses:
'200':
description: Success.
'400':
description: Workspace is not running, path or request body variable does not match schema.
content:
application/json:
schema:
type: object
properties:
status:
type: integer
enum:
- 400
title:
type: string
detail:
type: string
traceId:
type: string
required:
- status
- title
- traceId
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
type: object
properties:
status:
# --- truncated at 32 KB (70 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/codesphere/refs/heads/main/openapi/codesphere-workspaces-api-openapi.yml