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.
69qProject is the project identifier.
kWorkspace identifier
4Account is the internal customer account ID.
t4OK response.
Current workspace YAML
Dolorem natus quisquam in quam corporis libero.Workspace YAML after applying changes from the template
Nemo natus voluptatum iure est veniam ipsum.Indicates if the workspace needs template-based reconciliation
falseBadRequestError: 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: t4
Accept: */*
{
"currentWorkspaceYaml": "Inventore incidunt asperiores quisquam.",
"reconcilableWorkspaceYaml": "Possimus quo.",
"requiresReconciliation": false
}Add a workspace-template combination to the table.
Org is the organisation identifier.
y8Project is the project identifier.
uoAccount is the internal customer account ID.
cTemplate identifier
nzfTemplate version
496Workspace identifier
fCreated response.
Account identifier.
4ilTimestamp when the workspace-template association was created.
1627590400Organization identifier.
luProject identifier.
5pTemplate identifier.
5Timestamp when the workspace-template association was last updated.
1627686800Template version associated with the workspace.
aWorkspace identifier.
0BadRequestError: 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: c
Content-Type: application/json
Accept: */*
Content-Length: 55
{
"template_id": "hb",
"version": "1",
"workspace_id": "e2x"
}{
"account": "c",
"created_at": 1627590400,
"org": "ku5",
"project": "m5s",
"template_id": "9x9",
"updated_at": 1627686800,
"version": "n",
"workspace_id": "w78"
}Get all workspaces associated with a specific template ID for a given scope.
Org is the organisation identifier.
h6Project is the project identifier.
tTemplate identifier to filter workspaces
t8bAccount is the internal customer account ID.
vOK response.
List of workspaces associated with the template ID
Account identifier.
yTimestamp when the workspace-template association was created.
1627590400Organization identifier.
mProject identifier.
xzyTemplate identifier.
sdsTimestamp when the workspace-template association was last updated.
1627686800Template version associated with the workspace.
yWorkspace identifier.
xBadRequestError: 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: v
Accept: */*
[
{
"account": "w",
"created_at": 1627590400,
"org": "e8d",
"project": "04",
"template_id": "6",
"updated_at": 1627686800,
"version": "qw",
"workspace_id": "owm"
},
{
"account": "w",
"created_at": 1627590400,
"org": "e8d",
"project": "04",
"template_id": "6",
"updated_at": 1627686800,
"version": "qw",
"workspace_id": "owm"
}
]Update a workspace template combo to change its version.
Org is the organisation identifier.
azProject is the project identifier.
6zTemplate identifier
rWorkspace identifier
jAccount is the internal customer account ID.
xn6New template version
czOK response.
Account identifier.
ioTimestamp when the workspace-template association was created.
1627590400Organization identifier.
sdProject identifier.
fcTemplate identifier.
fTimestamp when the workspace-template association was last updated.
1627686800Template version associated with the workspace.
aiWorkspace identifier.
nBadRequestError: 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: xn6
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"version": "2d"
}{
"account": "lr4",
"created_at": 1627590400,
"org": "fjp",
"project": "7pr",
"template_id": "c7",
"updated_at": 1627686800,
"version": "x",
"workspace_id": "04"
}Remove the association between a template and a workspace.
Org is the organisation identifier.
jxProject is the project identifier.
pTemplate identifier
aWorkspace identifier
gl0Account is the internal customer account ID.
ldNo 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: ld
Accept: */*
No content
Last updated
Was this helpful?