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": false
}
'{
"data": {
"id": "<string>",
"fqn": "<string>",
"tenantName": "<string>",
"clusterId": "<string>",
"createdBySubject": {
"subjectId": "<string>",
"subjectType": "user",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>",
"subjectPatName": "<string>",
"subjectControllerName": "<string>",
"subjectExternalIdentitySlug": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"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>"
}
],
"ownedBy": {
"account": "<string>"
}
},
"accountId": "<string>",
"environmentId": "<string>",
"isSystemWs": true,
"createdBy": "<string>"
}
}Creates a new workspace or updates an existing one using the provided WorkspaceManifest. The workspace is matched by name and cluster — if both match an existing workspace it is updated, otherwise a new workspace is created. On creation, an authorization entry with admin role is created and the corresponding namespace is applied to the cluster. Collaborators are required when a service account creates a workspace. Set dryRun=true to validate the manifest without applying changes.
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": false
}
'{
"data": {
"id": "<string>",
"fqn": "<string>",
"tenantName": "<string>",
"clusterId": "<string>",
"createdBySubject": {
"subjectId": "<string>",
"subjectType": "user",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>",
"subjectPatName": "<string>",
"subjectControllerName": "<string>",
"subjectExternalIdentitySlug": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"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>"
}
],
"ownedBy": {
"account": "<string>"
}
},
"accountId": "<string>",
"environmentId": "<string>",
"isSystemWs": true,
"createdBy": "<string>"
}
}Documentation Index
Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The created or updated workspace.
The workspace object with full details including cluster info.
Show child attributes
Was this page helpful?