PUT
/
api
/
svc
/
v1
/
workspaces
curl --request PUT \
  --url https://{controlPlaneURL}/api/svc/v1/workspaces \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "manifest": {
    "type": "workspace",
    "cluster_fqn": "<string>",
    "name": "<string>",
    "environment_name": "<string>",
    "labels": {},
    "annotations": {},
    "collaborators": [
      {
        "subject": "<string>",
        "role_id": "<string>"
      }
    ],
    "permissions": [
      {
        "resource_fqn": "<string>",
        "resource_type": "<string>",
        "role_id": "<string>"
      }
    ]
  },
  "dryRun": true
}'
{
  "data": {
    "id": "<string>",
    "fqn": "<string>",
    "name": "<string>",
    "tenantName": "<string>",
    "clusterId": "<string>",
    "createdBySubject": {
      "subjectId": "<string>",
      "subjectType": "user",
      "subjectSlug": "<string>",
      "subjectDisplayName": "<string>"
    },
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "environmentId": "<string>",
    "manifest": {
      "type": "workspace",
      "cluster_fqn": "<string>",
      "name": "<string>",
      "environment_name": "<string>",
      "labels": {},
      "annotations": {},
      "collaborators": [
        {
          "subject": "<string>",
          "role_id": "<string>"
        }
      ],
      "permissions": [
        {
          "resource_fqn": "<string>",
          "resource_type": "<string>",
          "role_id": "<string>"
        }
      ]
    },
    "isSystemWs": true,
    "createdBy": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
manifest
object
required

Workspace manifest

dryRun
boolean

Dry run the request

Response

200
application/json
- Creates or updates a workspace with given manifest - Corresponding authorization entry with admin role is made using newly created workspace - Attached with the cluster id where the workspace is created
data
object
required

Workspace