Workspace Templates
Workspace Templates Service handles the API for managing template associations with workspaces.
Get the differences between the current workspace YAML and what it will look like when reconciled with the template
Org is the organisation identifier.
l1Project is the project identifier.
r1zWorkspace identifier
7uAccount is the internal customer account ID.
ggOK response.
Current workspace YAML
Fugiat laboriosam vitae.Workspace YAML after applying changes from the template
Ad tenetur autem.Indicates if the workspace needs template-based reconciliation
trueBadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
GET /api/orgs/{org}/projects/{project}/workspace/template/{workspace_id}/yaml-diff HTTP/1.1
Host: localhost:80
Harness-Account: gg
Accept: */*
{
"currentWorkspaceYaml": "Mollitia dolorem omnis.",
"reconcilableWorkspaceYaml": "Dolores repellendus.",
"requiresReconciliation": false
}Add a workspace-template combination to the table.
Org is the organisation identifier.
hProject is the project identifier.
ntAccount is the internal customer account ID.
xcTemplate identifier
eTemplate version
4Workspace identifier
1ldCreated response.
Account identifier.
lTimestamp when the workspace-template association was created.
1627590400Organization identifier.
yfProject identifier.
iv2Template identifier.
nTimestamp when the workspace-template association was last updated.
1627686800Template version associated with the workspace.
bvqWorkspace identifier.
fBadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
POST /api/orgs/{org}/projects/{project}/workspace/templates HTTP/1.1
Host: localhost:80
Harness-Account: xc
Content-Type: application/json
Accept: */*
Content-Length: 55
{
"template_id": "3",
"version": "12",
"workspace_id": "5kc"
}{
"account": "jkh",
"created_at": 1627590400,
"org": "g",
"project": "kn",
"template_id": "wc",
"updated_at": 1627686800,
"version": "it",
"workspace_id": "2d"
}Get all workspaces associated with a specific template ID for a given scope.
Org is the organisation identifier.
xProject is the project identifier.
wf6Template identifier to filter workspaces
168Account is the internal customer account ID.
yOK response.
List of workspaces associated with the template ID
Account identifier.
mTimestamp when the workspace-template association was created.
1627590400Organization identifier.
nsnProject identifier.
8yTemplate identifier.
a5zTimestamp when the workspace-template association was last updated.
1627686800Template version associated with the workspace.
14eWorkspace identifier.
hBadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
GET /api/orgs/{org}/projects/{project}/workspace/templates/{template_id} HTTP/1.1
Host: localhost:80
Harness-Account: y
Accept: */*
[
{
"account": "kn",
"created_at": 1627590400,
"org": "4e",
"project": "bjr",
"template_id": "qr4",
"updated_at": 1627686800,
"version": "8h",
"workspace_id": "6p"
},
{
"account": "kn",
"created_at": 1627590400,
"org": "4e",
"project": "bjr",
"template_id": "qr4",
"updated_at": 1627686800,
"version": "8h",
"workspace_id": "6p"
}
]Update a workspace template combo to change its version.
Org is the organisation identifier.
1Project is the project identifier.
4bTemplate identifier
ybWorkspace identifier
tqqAccount is the internal customer account ID.
53dNew template version
qiqOK response.
Account identifier.
9Timestamp when the workspace-template association was created.
1627590400Organization identifier.
pProject identifier.
wTemplate identifier.
evTimestamp when the workspace-template association was last updated.
1627686800Template version associated with the workspace.
ckWorkspace identifier.
tlBadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
PUT /api/orgs/{org}/projects/{project}/workspace/templates/{template_id}/{workspace_id} HTTP/1.1
Host: localhost:80
Harness-Account: 53d
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"version": "k"
}{
"account": "57",
"created_at": 1627590400,
"org": "jeb",
"project": "z",
"template_id": "24",
"updated_at": 1627686800,
"version": "0ts",
"workspace_id": "c"
}Remove the association between a template and a workspace.
Org is the organisation identifier.
pfrProject is the project identifier.
6aTemplate identifier
rqWorkspace identifier
2Account is the internal customer account ID.
2No Content response.
No content
BadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
DELETE /api/orgs/{org}/projects/{project}/workspace/templates/{template_id}/{workspace_id} HTTP/1.1
Host: localhost:80
Harness-Account: 2
Accept: */*
No content
Last updated
Was this helpful?