Clone workspace
Clone the given workspace with new name.
post
Path parameters
orgstring · min: 1 · max: 128RequiredExample:
Org is the organisation identifier.
wcgprojectstring · min: 1 · max: 128RequiredExample:
Project is the project identifier.
1workspacestringRequiredExample:
Asperiores in quas ut.Header parameters
Harness-Accountstring · min: 1 · max: 128RequiredExample:
Account is the internal customer account ID.
gbxBody
identifierstring · min: 1 · max: 128RequiredExample:
Workspace identifier.
r0Pattern: ^[A-Za-z_][A-Za-z0-9_-]*$namestring · min: 1 · max: 128RequiredExample:
Name is the human readable name for the resource.
resource namePattern: ^[A-Za-z_][A-Za-z0-9_ -]*$Responses
200
OK response.
application/json
Create-WorkspaceResponseBody result type (default view)
400
BadRequestError: Bad Request response.
application/vnd.goa.error
401
UnauthorizedError: Unauthorized response.
application/vnd.goa.error
403
ForbiddenError: Forbidden response.
application/vnd.goa.error
404
NotFoundError: Not Found response.
application/vnd.goa.error
408
TimeoutError: Request Timeout response.
application/vnd.goa.error
409
ConflictError: Conflict response.
application/vnd.goa.error
423
LockedError: Locked response.
application/vnd.goa.error
499
ContextCancelledError: response.
application/vnd.goa.error
500
InternalServerError: Internal Server Error response.
application/vnd.goa.error
502
BadGatewayError: Bad Gateway response.
application/vnd.goa.error
post/api/orgs/{org}/projects/{project}/workspaces/{workspace}/clone
POST /api/orgs/{org}/projects/{project}/workspaces/{workspace}/clone HTTP/1.1
Host: localhost:80
Harness-Account: gbx
Content-Type: application/json
Accept: */*
Content-Length: 41
{
"identifier": "2",
"name": "resource name"
}{
"policy_evaluation": {
"account_id": "XRQAjvT37acOiXx9PRaQMF",
"action": "onrun",
"created": 1636370209475,
"details": [
{
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"action": "onrun",
"created": 1636669297674,
"description": "Captures critical production policies",
"details": [
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
},
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
},
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
}
],
"enabled": true,
"identifier": "policyset-1",
"name": "Production Policies",
"org_id": "test-org",
"project_id": "test-project",
"status": "error",
"type": "pipeline",
"updated": 1636669297674
},
{
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"action": "onrun",
"created": 1636669297674,
"description": "Captures critical production policies",
"details": [
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
},
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
},
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
}
],
"enabled": true,
"identifier": "policyset-1",
"name": "Production Policies",
"org_id": "test-org",
"project_id": "test-project",
"status": "error",
"type": "pipeline",
"updated": 1636669297674
},
{
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"action": "onrun",
"created": 1636669297674,
"description": "Captures critical production policies",
"details": [
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
},
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
},
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
}
],
"enabled": true,
"identifier": "policyset-1",
"name": "Production Policies",
"org_id": "test-org",
"project_id": "test-project",
"status": "error",
"type": "pipeline",
"updated": 1636669297674
}
],
"entity": "7bbca5d4-e9f2-4955-9b2a-019ec4d3645e",
"entity_metadata": "7bbca5d4-e9f2-4955-9b2a-019ec4d3645e",
"id": 123,
"input": "",
"org_id": "test-org",
"project_id": "test-project",
"status": "error",
"type": "pipeline,service"
}
}Last updated
Was this helpful?