> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/api-reference/iacm/variables.md).

# Variables

Variables Service handles the API for managing workspace variables.

## List workspace variables

> List all workspace variables.

```json
{"openapi":"3.0.3","info":{"title":"Infrastructure as Code Management","version":"0.1.0"},"tags":[{"name":"variables","description":"Variables Service handles the API for managing workspace variables."}],"servers":[{"url":"http://localhost:80"}],"paths":{"/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables":{"get":{"tags":["variables"],"summary":"List workspace variables","description":"List all workspace variables.","operationId":"variables#list-variables","parameters":[{"name":"org","in":"path","description":"Org is the organisation identifier.","required":true,"schema":{"type":"string","description":"Org is the organisation identifier.","minLength":1,"maxLength":128}},{"name":"project","in":"path","description":"Project is the project identifier.","required":true,"schema":{"type":"string","description":"Project is the project identifier.","minLength":1,"maxLength":128}},{"name":"workspace","in":"path","description":"Workspace is the resource workspace this variable is associated with.","required":true,"schema":{"type":"string","description":"Workspace is the resource workspace this variable is associated with."}},{"name":"Harness-Account","in":"header","description":"Account is the internal customer account ID.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Account is the internal customer account ID.","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceVariableResourceCollection"}}}},"400":{"description":"BadRequestError: Bad Request response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UnauthorizedError: Unauthorized response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"ForbiddenError: Forbidden response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NotFoundError: Not Found response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"TimeoutError: Request Timeout response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"ConflictError: Conflict response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"LockedError: Locked response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"499":{"description":"ContextCancelledError:  response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"BadGatewayError: Bad Gateway response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"WorkspaceVariableResourceCollection":{"type":"array","items":{"$ref":"#/components/schemas/HarnessIacmWorkspacevariable"}},"HarnessIacmWorkspacevariable":{"type":"object","properties":{"account":{"type":"string","description":"Account is the internal customer account ID.","minLength":1,"maxLength":128},"created":{"type":"integer","description":"Created is the unix timestamp at which the resource was originally created in milliseconds.","format":"int64"},"key":{"type":"string","description":"Key is the identifier for the secret.","pattern":"^[a-zA-Z0-9_]+$","minLength":1,"maxLength":128},"kind":{"type":"string","description":"Kind is the classfcation of the variable.","enum":["env","tf"]},"org":{"type":"string","description":"Org is the organisation identifier.","minLength":1,"maxLength":128},"project":{"type":"string","description":"Project is the project identifier.","minLength":1,"maxLength":128},"updated":{"type":"integer","description":"Modified is the unix timestamp at which the resource was last modified in milliseconds.","format":"int64"},"value":{"type":"string","description":"Value is the value of the secret."},"value_type":{"type":"string","description":"Type indicates the value type of the variable. In the case of secret this is a\nreference to an item in the secret store. Boolean values must be \"true\" or \"false\". JSON values must be valid JSON.","enum":["string","secret","boolean","json","number"]},"workspace":{"type":"string","description":"Workspace is the resource workspace this variable is associated with."}},"description":"WorkspaceVariableResource is the representation for a single environment variable associated with a workspace.","required":["account","org","project","workspace","key","value","value_type","kind","created","updated"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem."},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem."},"name":{"type":"string","description":"Name is the name of this class of errors."},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"required":["name","id","message","temporary","timeout","fault"]}}}}
```

## Create workspace variable

> Creates a new workspace variable

```json
{"openapi":"3.0.3","info":{"title":"Infrastructure as Code Management","version":"0.1.0"},"tags":[{"name":"variables","description":"Variables Service handles the API for managing workspace variables."}],"servers":[{"url":"http://localhost:80"}],"paths":{"/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables":{"post":{"tags":["variables"],"summary":"Create workspace variable","description":"Creates a new workspace variable","operationId":"variables#create-variable","parameters":[{"name":"org","in":"path","description":"Org is the organisation identifier.","required":true,"schema":{"type":"string","description":"Org is the organisation identifier.","minLength":1,"maxLength":128}},{"name":"project","in":"path","description":"Project is the project identifier.","required":true,"schema":{"type":"string","description":"Project is the project identifier.","minLength":1,"maxLength":128}},{"name":"workspace","in":"path","description":"Workspace is the resource workspace this variable is associated with.","required":true,"schema":{"type":"string","description":"Workspace is the resource workspace this variable is associated with."}},{"name":"Harness-Account","in":"header","description":"Account is the internal customer account ID.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Account is the internal customer account ID.","minLength":1,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceVariableRequest"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceVariableResponse"}}}},"400":{"description":"BadRequestError: Bad Request response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/PolicyViolationError"}}}},"401":{"description":"UnauthorizedError: Unauthorized response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"ForbiddenError: Forbidden response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NotFoundError: Not Found response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"TimeoutError: Request Timeout response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"ConflictError: Conflict response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"LockedError: Locked response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"499":{"description":"ContextCancelledError:  response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"BadGatewayError: Bad Gateway response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"CreateWorkspaceVariableRequest":{"type":"object","properties":{"key":{"type":"string","description":"Key is the identifier for the secret.","pattern":"^[a-zA-Z0-9_]+$","minLength":1,"maxLength":128},"kind":{"type":"string","description":"Kind is the classfcation of the variable.","enum":["env","tf"]},"value":{"type":"string","description":"Value is the value of the secret."},"value_type":{"type":"string","description":"Type indicates the value type of the variable. In the case of secret this is a\nreference to an item in the secret store. Boolean values must be \"true\" or \"false\". JSON values must be valid JSON.","enum":["string","secret","boolean","json","number"]}},"required":["key","value","value_type","kind"]},"CreateWorkspaceVariableResponse":{"type":"object","properties":{"account":{"type":"string","description":"Account is the internal customer account ID.","minLength":1,"maxLength":128},"created":{"type":"integer","description":"Created is the unix timestamp at which the resource was originally created in milliseconds.","format":"int64"},"key":{"type":"string","description":"Key is the identifier for the secret.","pattern":"^[a-zA-Z0-9_]+$","minLength":1,"maxLength":128},"kind":{"type":"string","description":"Kind is the classfcation of the variable.","enum":["env","tf"]},"org":{"type":"string","description":"Org is the organisation identifier.","minLength":1,"maxLength":128},"policy_evaluation":{"$ref":"#/components/schemas/Evaluation"},"project":{"type":"string","description":"Project is the project identifier.","minLength":1,"maxLength":128},"updated":{"type":"integer","description":"Modified is the unix timestamp at which the resource was last modified in milliseconds.","format":"int64"},"value":{"type":"string","description":"Value is the value of the secret."},"value_type":{"type":"string","description":"Type indicates the value type of the variable. In the case of secret this is a\nreference to an item in the secret store. Boolean values must be \"true\" or \"false\". JSON values must be valid JSON.","enum":["string","secret","boolean","json","number"]},"workspace":{"type":"string","description":"Workspace is the resource workspace this variable is associated with."}},"required":["account","org","project","workspace","key","value","value_type","kind","created","updated"]},"Evaluation":{"type":"object","properties":{"account_id":{"type":"string","description":"The Harness account in which the evaluation was performed"},"action":{"type":"string","description":"The action that triggered evaluation"},"created":{"type":"integer","description":"The time at which the evaluation was performed in Unix time milliseconds","format":"int64"},"details":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationDetail"},"description":"The detailed results of te evaluation"},"entity":{"type":"string","description":"An arbitrary user-supplied string that globally identifies the entity under evaluation"},"entity_metadata":{"type":"string","description":"Additional arbitrary user-supplied metadata about the entity under evaluation"},"id":{"type":"integer","description":"The ID of this evaluation","format":"int64"},"input":{"description":"The input provided at evaluation time"},"org_id":{"type":"string","description":"The Harness organisation in which the evaluation was performed"},"project_id":{"type":"string","description":"The Harness project in which the evaluation was performed"},"status":{"type":"string","description":"The overall status of the evaluation indicating whether it passed","enum":["error","warning","pass"]},"type":{"type":"string","description":"The types of the entity under evaluation"}},"description":"The result of a single evaluation","required":["id","status","entity","entity_metadata","type","action","account_id","org_id","project_id","created","input","details"]},"EvaluationDetail":{"type":"object","properties":{"account_id":{"type":"string","description":"Harness account ID associated with this policy set","default":""},"action":{"type":"string","description":"Action that triggers the policy set","minLength":1},"created":{"type":"integer","description":"Time the policy set was created","format":"int64"},"description":{"type":"string","description":"Description of the policy set"},"details":{"type":"array","items":{"$ref":"#/components/schemas/EvaluatedPolicy"}},"enabled":{"type":"boolean","description":"Only enabled policy sets are evaluated when evaluating by type/action"},"identifier":{"type":"string","description":"Identifier of the policy set","minLength":1},"name":{"type":"string","description":"Name of the policy set","minLength":1},"org_id":{"type":"string","description":"Harness organization ID associated with this policy set","default":""},"project_id":{"type":"string","description":"Harness project ID associated with this policy set","default":""},"status":{"type":"string","description":"The overall status for this policy set indicating whether it passed","enum":["error","warning","pass"]},"type":{"type":"string","description":"Type of input suitable for the policy set","minLength":1},"updated":{"type":"integer","description":"Time the policy set was last updated","format":"int64"}},"required":["status","details","identifier","name","action","type","enabled","created","updated","account_id","org_id","project_id","entity_selector"]},"EvaluatedPolicy":{"type":"object","properties":{"deny_messages":{"type":"array","items":{"type":"string"},"description":"The values of any `deny` rego rules as returned by the rego engine"},"output":{"description":"The output returned by the rego engine when this policy was evaluated"},"policy":{"$ref":"#/components/schemas/Policy"},"rego_error":{"type":"string","description":"Any errors returned by the rego engine when this policy was evaluated"},"status":{"type":"string","description":"The overall status for this individual policy indicating whether it passed","enum":["error","warning","pass"]}},"required":["status","policy","output","deny_messages","rego_error"]},"Policy":{"type":"object","properties":{"account_id":{"type":"string","description":"Harness account ID associated with this policy","default":""},"created":{"type":"integer","description":"Time the policy was created","format":"int64"},"identifier":{"type":"string","description":"identifier of the policy","minLength":1},"name":{"type":"string","description":"Name of the policy","minLength":1},"org_id":{"type":"string","description":"Harness organization ID associated with this policy","default":""},"project_id":{"type":"string","description":"Harness project ID associated with this policy","default":""},"rego":{"type":"string","description":"Rego that defines the policy","minLength":1},"updated":{"type":"integer","description":"Time the policy was last updated","format":"int64"}},"required":["identifier","name","rego","created","updated","account_id","org_id","project_id"]},"PolicyViolationError":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem."},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem."},"name":{"type":"string","description":"Name is the name of this class of errors."},"policy_evaluation":{"$ref":"#/components/schemas/Evaluation"},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"required":["name","id","message","temporary","timeout","fault"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem."},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem."},"name":{"type":"string","description":"Name is the name of this class of errors."},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"required":["name","id","message","temporary","timeout","fault"]}}}}
```

## Show workspace variable

> Show an individual workspace variable.

```json
{"openapi":"3.0.3","info":{"title":"Infrastructure as Code Management","version":"0.1.0"},"tags":[{"name":"variables","description":"Variables Service handles the API for managing workspace variables."}],"servers":[{"url":"http://localhost:80"}],"paths":{"/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/{kind}/{key}":{"get":{"tags":["variables"],"summary":"Show workspace variable","description":"Show an individual workspace variable.","operationId":"variables#show-variable","parameters":[{"name":"org","in":"path","description":"Org is the organisation identifier.","required":true,"schema":{"type":"string","description":"Org is the organisation identifier.","minLength":1,"maxLength":128}},{"name":"project","in":"path","description":"Project is the project identifier.","required":true,"schema":{"type":"string","description":"Project is the project identifier.","minLength":1,"maxLength":128}},{"name":"workspace","in":"path","description":"Workspace is the resource workspace this variable is associated with.","required":true,"schema":{"type":"string","description":"Workspace is the resource workspace this variable is associated with."}},{"name":"kind","in":"path","description":"Kind is the classfcation of the variable.","required":true,"schema":{"type":"string","description":"Kind is the classfcation of the variable.","enum":["env","tf"]}},{"name":"key","in":"path","description":"Key is the identifier for the secret.","required":true,"schema":{"type":"string","description":"Key is the identifier for the secret.","pattern":"^[a-zA-Z0-9_]+$","minLength":1,"maxLength":128}},{"name":"Harness-Account","in":"header","description":"Account is the internal customer account ID.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Account is the internal customer account ID.","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowWorkspaceVariableResponse"}}}},"400":{"description":"BadRequestError: Bad Request response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UnauthorizedError: Unauthorized response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"ForbiddenError: Forbidden response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NotFoundError: Not Found response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"TimeoutError: Request Timeout response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"ConflictError: Conflict response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"LockedError: Locked response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"499":{"description":"ContextCancelledError:  response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"BadGatewayError: Bad Gateway response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"ShowWorkspaceVariableResponse":{"type":"object","properties":{"account":{"type":"string","description":"Account is the internal customer account ID.","minLength":1,"maxLength":128},"created":{"type":"integer","description":"Created is the unix timestamp at which the resource was originally created in milliseconds.","format":"int64"},"key":{"type":"string","description":"Key is the identifier for the secret.","pattern":"^[a-zA-Z0-9_]+$","minLength":1,"maxLength":128},"kind":{"type":"string","description":"Kind is the classfcation of the variable.","enum":["env","tf"]},"org":{"type":"string","description":"Org is the organisation identifier.","minLength":1,"maxLength":128},"project":{"type":"string","description":"Project is the project identifier.","minLength":1,"maxLength":128},"updated":{"type":"integer","description":"Modified is the unix timestamp at which the resource was last modified in milliseconds.","format":"int64"},"value":{"type":"string","description":"Value is the value of the secret."},"value_type":{"type":"string","description":"Type indicates the value type of the variable. In the case of secret this is a\nreference to an item in the secret store. Boolean values must be \"true\" or \"false\". JSON values must be valid JSON.","enum":["string","secret","boolean","json","number"]},"workspace":{"type":"string","description":"Workspace is the resource workspace this variable is associated with."}},"required":["account","org","project","workspace","key","value","value_type","kind","created","updated"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem."},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem."},"name":{"type":"string","description":"Name is the name of this class of errors."},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"required":["name","id","message","temporary","timeout","fault"]}}}}
```

## Update workspace variable

> Updates the given workspace variable with new info.

```json
{"openapi":"3.0.3","info":{"title":"Infrastructure as Code Management","version":"0.1.0"},"tags":[{"name":"variables","description":"Variables Service handles the API for managing workspace variables."}],"servers":[{"url":"http://localhost:80"}],"paths":{"/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/{kind}/{key}":{"put":{"tags":["variables"],"summary":"Update workspace variable","description":"Updates the given workspace variable with new info.","operationId":"variables#update-variable","parameters":[{"name":"org","in":"path","description":"Org is the organisation identifier.","required":true,"schema":{"type":"string","description":"Org is the organisation identifier.","minLength":1,"maxLength":128}},{"name":"project","in":"path","description":"Project is the project identifier.","required":true,"schema":{"type":"string","description":"Project is the project identifier.","minLength":1,"maxLength":128}},{"name":"workspace","in":"path","description":"Workspace is the resource workspace this variable is associated with.","required":true,"schema":{"type":"string","description":"Workspace is the resource workspace this variable is associated with."}},{"name":"kind","in":"path","description":"Kind is the classfcation of the variable.","required":true,"schema":{"type":"string","description":"Kind is the classfcation of the variable.","enum":["env","tf"]}},{"name":"key","in":"path","description":"Key is the identifier for the secret.","required":true,"schema":{"type":"string","description":"Key is the identifier for the secret.","pattern":"^[a-zA-Z0-9_]+$","minLength":1,"maxLength":128}},{"name":"Harness-Account","in":"header","description":"Account is the internal customer account ID.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Account is the internal customer account ID.","minLength":1,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspaceVariableRequest"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspaceVariableResponse"}}}},"400":{"description":"BadRequestError: Bad Request response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/PolicyViolationError"}}}},"401":{"description":"UnauthorizedError: Unauthorized response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"ForbiddenError: Forbidden response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NotFoundError: Not Found response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"TimeoutError: Request Timeout response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"ConflictError: Conflict response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"LockedError: Locked response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"499":{"description":"ContextCancelledError:  response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"BadGatewayError: Bad Gateway response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"UpdateWorkspaceVariableRequest":{"type":"object","properties":{"value":{"type":"string","description":"Value is the value of the secret."},"value_type":{"type":"string","description":"Type indicates the value type of the variable. In the case of secret this is a\nreference to an item in the secret store. Boolean values must be \"true\" or \"false\". JSON values must be valid JSON.","enum":["string","secret","boolean","json","number"]}},"required":["value","value_type"]},"UpdateWorkspaceVariableResponse":{"type":"object","properties":{"policy_evaluation":{"$ref":"#/components/schemas/Evaluation"}}},"Evaluation":{"type":"object","properties":{"account_id":{"type":"string","description":"The Harness account in which the evaluation was performed"},"action":{"type":"string","description":"The action that triggered evaluation"},"created":{"type":"integer","description":"The time at which the evaluation was performed in Unix time milliseconds","format":"int64"},"details":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationDetail"},"description":"The detailed results of te evaluation"},"entity":{"type":"string","description":"An arbitrary user-supplied string that globally identifies the entity under evaluation"},"entity_metadata":{"type":"string","description":"Additional arbitrary user-supplied metadata about the entity under evaluation"},"id":{"type":"integer","description":"The ID of this evaluation","format":"int64"},"input":{"description":"The input provided at evaluation time"},"org_id":{"type":"string","description":"The Harness organisation in which the evaluation was performed"},"project_id":{"type":"string","description":"The Harness project in which the evaluation was performed"},"status":{"type":"string","description":"The overall status of the evaluation indicating whether it passed","enum":["error","warning","pass"]},"type":{"type":"string","description":"The types of the entity under evaluation"}},"description":"The result of a single evaluation","required":["id","status","entity","entity_metadata","type","action","account_id","org_id","project_id","created","input","details"]},"EvaluationDetail":{"type":"object","properties":{"account_id":{"type":"string","description":"Harness account ID associated with this policy set","default":""},"action":{"type":"string","description":"Action that triggers the policy set","minLength":1},"created":{"type":"integer","description":"Time the policy set was created","format":"int64"},"description":{"type":"string","description":"Description of the policy set"},"details":{"type":"array","items":{"$ref":"#/components/schemas/EvaluatedPolicy"}},"enabled":{"type":"boolean","description":"Only enabled policy sets are evaluated when evaluating by type/action"},"identifier":{"type":"string","description":"Identifier of the policy set","minLength":1},"name":{"type":"string","description":"Name of the policy set","minLength":1},"org_id":{"type":"string","description":"Harness organization ID associated with this policy set","default":""},"project_id":{"type":"string","description":"Harness project ID associated with this policy set","default":""},"status":{"type":"string","description":"The overall status for this policy set indicating whether it passed","enum":["error","warning","pass"]},"type":{"type":"string","description":"Type of input suitable for the policy set","minLength":1},"updated":{"type":"integer","description":"Time the policy set was last updated","format":"int64"}},"required":["status","details","identifier","name","action","type","enabled","created","updated","account_id","org_id","project_id","entity_selector"]},"EvaluatedPolicy":{"type":"object","properties":{"deny_messages":{"type":"array","items":{"type":"string"},"description":"The values of any `deny` rego rules as returned by the rego engine"},"output":{"description":"The output returned by the rego engine when this policy was evaluated"},"policy":{"$ref":"#/components/schemas/Policy"},"rego_error":{"type":"string","description":"Any errors returned by the rego engine when this policy was evaluated"},"status":{"type":"string","description":"The overall status for this individual policy indicating whether it passed","enum":["error","warning","pass"]}},"required":["status","policy","output","deny_messages","rego_error"]},"Policy":{"type":"object","properties":{"account_id":{"type":"string","description":"Harness account ID associated with this policy","default":""},"created":{"type":"integer","description":"Time the policy was created","format":"int64"},"identifier":{"type":"string","description":"identifier of the policy","minLength":1},"name":{"type":"string","description":"Name of the policy","minLength":1},"org_id":{"type":"string","description":"Harness organization ID associated with this policy","default":""},"project_id":{"type":"string","description":"Harness project ID associated with this policy","default":""},"rego":{"type":"string","description":"Rego that defines the policy","minLength":1},"updated":{"type":"integer","description":"Time the policy was last updated","format":"int64"}},"required":["identifier","name","rego","created","updated","account_id","org_id","project_id"]},"PolicyViolationError":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem."},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem."},"name":{"type":"string","description":"Name is the name of this class of errors."},"policy_evaluation":{"$ref":"#/components/schemas/Evaluation"},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"required":["name","id","message","temporary","timeout","fault"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem."},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem."},"name":{"type":"string","description":"Name is the name of this class of errors."},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"required":["name","id","message","temporary","timeout","fault"]}}}}
```

## Destroy workspace variable

> Deletes the given workspace variable.

```json
{"openapi":"3.0.3","info":{"title":"Infrastructure as Code Management","version":"0.1.0"},"tags":[{"name":"variables","description":"Variables Service handles the API for managing workspace variables."}],"servers":[{"url":"http://localhost:80"}],"paths":{"/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/{kind}/{key}":{"delete":{"tags":["variables"],"summary":"Destroy workspace variable","description":"Deletes the given workspace variable.","operationId":"variables#destroy-variable","parameters":[{"name":"org","in":"path","description":"Org is the organisation identifier.","required":true,"schema":{"type":"string","description":"Org is the organisation identifier.","minLength":1,"maxLength":128}},{"name":"project","in":"path","description":"Project is the project identifier.","required":true,"schema":{"type":"string","description":"Project is the project identifier.","minLength":1,"maxLength":128}},{"name":"workspace","in":"path","description":"Workspace is the resource workspace this variable is associated with.","required":true,"schema":{"type":"string","description":"Workspace is the resource workspace this variable is associated with."}},{"name":"kind","in":"path","description":"Kind is the classfcation of the variable.","required":true,"schema":{"type":"string","description":"Kind is the classfcation of the variable.","enum":["env","tf"]}},{"name":"key","in":"path","description":"Key is the identifier for the secret.","required":true,"schema":{"type":"string","description":"Key is the identifier for the secret.","pattern":"^[a-zA-Z0-9_]+$","minLength":1,"maxLength":128}},{"name":"Harness-Account","in":"header","description":"Account is the internal customer account ID.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Account is the internal customer account ID.","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestroyWorkspaceVariableResponse"}}}},"400":{"description":"BadRequestError: Bad Request response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/PolicyViolationError"}}}},"401":{"description":"UnauthorizedError: Unauthorized response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"ForbiddenError: Forbidden response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NotFoundError: Not Found response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"TimeoutError: Request Timeout response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"ConflictError: Conflict response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"LockedError: Locked response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"499":{"description":"ContextCancelledError:  response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"BadGatewayError: Bad Gateway response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"DestroyWorkspaceVariableResponse":{"type":"object","properties":{"policy_evaluation":{"$ref":"#/components/schemas/Evaluation"}}},"Evaluation":{"type":"object","properties":{"account_id":{"type":"string","description":"The Harness account in which the evaluation was performed"},"action":{"type":"string","description":"The action that triggered evaluation"},"created":{"type":"integer","description":"The time at which the evaluation was performed in Unix time milliseconds","format":"int64"},"details":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationDetail"},"description":"The detailed results of te evaluation"},"entity":{"type":"string","description":"An arbitrary user-supplied string that globally identifies the entity under evaluation"},"entity_metadata":{"type":"string","description":"Additional arbitrary user-supplied metadata about the entity under evaluation"},"id":{"type":"integer","description":"The ID of this evaluation","format":"int64"},"input":{"description":"The input provided at evaluation time"},"org_id":{"type":"string","description":"The Harness organisation in which the evaluation was performed"},"project_id":{"type":"string","description":"The Harness project in which the evaluation was performed"},"status":{"type":"string","description":"The overall status of the evaluation indicating whether it passed","enum":["error","warning","pass"]},"type":{"type":"string","description":"The types of the entity under evaluation"}},"description":"The result of a single evaluation","required":["id","status","entity","entity_metadata","type","action","account_id","org_id","project_id","created","input","details"]},"EvaluationDetail":{"type":"object","properties":{"account_id":{"type":"string","description":"Harness account ID associated with this policy set","default":""},"action":{"type":"string","description":"Action that triggers the policy set","minLength":1},"created":{"type":"integer","description":"Time the policy set was created","format":"int64"},"description":{"type":"string","description":"Description of the policy set"},"details":{"type":"array","items":{"$ref":"#/components/schemas/EvaluatedPolicy"}},"enabled":{"type":"boolean","description":"Only enabled policy sets are evaluated when evaluating by type/action"},"identifier":{"type":"string","description":"Identifier of the policy set","minLength":1},"name":{"type":"string","description":"Name of the policy set","minLength":1},"org_id":{"type":"string","description":"Harness organization ID associated with this policy set","default":""},"project_id":{"type":"string","description":"Harness project ID associated with this policy set","default":""},"status":{"type":"string","description":"The overall status for this policy set indicating whether it passed","enum":["error","warning","pass"]},"type":{"type":"string","description":"Type of input suitable for the policy set","minLength":1},"updated":{"type":"integer","description":"Time the policy set was last updated","format":"int64"}},"required":["status","details","identifier","name","action","type","enabled","created","updated","account_id","org_id","project_id","entity_selector"]},"EvaluatedPolicy":{"type":"object","properties":{"deny_messages":{"type":"array","items":{"type":"string"},"description":"The values of any `deny` rego rules as returned by the rego engine"},"output":{"description":"The output returned by the rego engine when this policy was evaluated"},"policy":{"$ref":"#/components/schemas/Policy"},"rego_error":{"type":"string","description":"Any errors returned by the rego engine when this policy was evaluated"},"status":{"type":"string","description":"The overall status for this individual policy indicating whether it passed","enum":["error","warning","pass"]}},"required":["status","policy","output","deny_messages","rego_error"]},"Policy":{"type":"object","properties":{"account_id":{"type":"string","description":"Harness account ID associated with this policy","default":""},"created":{"type":"integer","description":"Time the policy was created","format":"int64"},"identifier":{"type":"string","description":"identifier of the policy","minLength":1},"name":{"type":"string","description":"Name of the policy","minLength":1},"org_id":{"type":"string","description":"Harness organization ID associated with this policy","default":""},"project_id":{"type":"string","description":"Harness project ID associated with this policy","default":""},"rego":{"type":"string","description":"Rego that defines the policy","minLength":1},"updated":{"type":"integer","description":"Time the policy was last updated","format":"int64"}},"required":["identifier","name","rego","created","updated","account_id","org_id","project_id"]},"PolicyViolationError":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem."},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem."},"name":{"type":"string","description":"Name is the name of this class of errors."},"policy_evaluation":{"$ref":"#/components/schemas/Evaluation"},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"required":["name","id","message","temporary","timeout","fault"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem."},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem."},"name":{"type":"string","description":"Name is the name of this class of errors."},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"required":["name","id","message","temporary","timeout","fault"]}}}}
```

## Get variables, provider connectors, and variable files

> Returns all terraform/environment variables, provider connectors, and variable files for a workspace

```json
{"openapi":"3.0.3","info":{"title":"Infrastructure as Code Management","version":"0.1.0"},"tags":[{"name":"variables","description":"Variables Service handles the API for managing workspace variables."}],"servers":[{"url":"http://localhost:80"}],"paths":{"/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/merged":{"get":{"tags":["variables"],"summary":"Get variables, provider connectors, and variable files","description":"Returns all terraform/environment variables, provider connectors, and variable files for a workspace","operationId":"variables#get-variables-and-providers","parameters":[{"name":"org","in":"path","description":"Org is the organisation identifier.","required":true,"schema":{"type":"string","description":"Org is the organisation identifier.","minLength":1,"maxLength":128}},{"name":"project","in":"path","description":"Project is the project identifier.","required":true,"schema":{"type":"string","description":"Project is the project identifier.","minLength":1,"maxLength":128}},{"name":"workspace","in":"path","description":"Workspace is the resource workspace this variable is associated with.","required":true,"schema":{"type":"string","description":"Workspace is the resource workspace this variable is associated with."}},{"name":"Harness-Account","in":"header","description":"Account is the internal customer account ID.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Account is the internal customer account ID.","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVariablesAndProvidersResponse"}}}},"400":{"description":"BadRequestError: Bad Request response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UnauthorizedError: Unauthorized response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"ForbiddenError: Forbidden response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NotFoundError: Not Found response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"TimeoutError: Request Timeout response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"ConflictError: Conflict response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"LockedError: Locked response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"499":{"description":"ContextCancelledError:  response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"BadGatewayError: Bad Gateway response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"GetVariablesAndProvidersResponse":{"type":"object","properties":{"environment_variables":{"type":"array","items":{"$ref":"#/components/schemas/VariableWithPermissions"}},"provider_connectors":{"type":"array","items":{"$ref":"#/components/schemas/ProviderConnectorWithPermissions"}},"terraform_variables":{"type":"array","items":{"$ref":"#/components/schemas/VariableWithPermissions"}},"variable_files":{"type":"array","items":{"$ref":"#/components/schemas/VariableFileWithPermissions"}}},"required":["terraform_variables","environment_variables","provider_connectors","variable_files"]},"VariableWithPermissions":{"type":"object","properties":{"associatedTemplate":{"type":"string"},"associatedVariableSet":{"type":"string"},"created":{"type":"integer","format":"int64"},"inUse":{"type":"boolean","description":"Indicates if this variable is the one actively used in the workspace"},"includeInWorkspace":{"type":"boolean"},"isLocked":{"type":"boolean"},"key":{"type":"string"},"kind":{"type":"string"},"permissions":{"$ref":"#/components/schemas/VariablePermissions"},"source":{"type":"string","enum":["workspace","template","variableSet"]},"updated":{"type":"integer","format":"int64"},"uuid":{"type":"string","description":"Unique identifier for this variable"},"value":{"type":"string"},"value_type":{"type":"string"}},"required":["uuid","key","value","value_type","source","kind","includeInWorkspace","isLocked","created","updated","permissions","inUse"]},"VariablePermissions":{"type":"object","properties":{"canDelete":{"type":"boolean"},"canEditKey":{"type":"boolean"},"canEditValue":{"type":"boolean"},"canEditValueType":{"type":"boolean"}},"required":["canDelete","canEditKey","canEditValue","canEditValueType"]},"ProviderConnectorWithPermissions":{"type":"object","properties":{"associatedTemplate":{"type":"string"},"associatedVariableSet":{"type":"string"},"connector_ref":{"type":"string"},"created":{"type":"integer","format":"int64"},"inUse":{"type":"boolean","description":"Indicates if this connector is the one actively used in the workspace"},"isInWorkspace":{"type":"boolean"},"isLocked":{"type":"boolean"},"permissions":{"$ref":"#/components/schemas/ConnectorPermissions"},"source":{"type":"string","enum":["workspace","template","variableSet"]},"type":{"type":"string","enum":["aws","azure","gcp","vault"]},"updated":{"type":"integer","format":"int64"},"uuid":{"type":"string","description":"Unique identifier for this connector"}},"required":["uuid","connector_ref","type","created","updated","source","isInWorkspace","permissions","inUse","isLocked"]},"ConnectorPermissions":{"type":"object","properties":{"canDelete":{"type":"boolean"}},"required":["canDelete"]},"VariableFileWithPermissions":{"type":"object","properties":{"associatedTemplate":{"type":"string"},"associatedVariableSet":{"type":"string"},"inUse":{"type":"boolean","description":"Indicates if this variable file is the one actively used in the workspace"},"isInWorkspace":{"type":"boolean"},"isLocked":{"type":"boolean"},"permissions":{"$ref":"#/components/schemas/VariableFilePermissions"},"repository":{"type":"string"},"repository_branch":{"type":"string"},"repository_commit":{"type":"string"},"repository_connector":{"type":"string"},"repository_path":{"type":"string"},"repository_sha":{"type":"string"},"source":{"type":"string","enum":["workspace","template","variableSet"]},"uuid":{"type":"string","description":"Unique identifier for this file"}},"required":["uuid","repository","source","isInWorkspace","permissions","inUse","repository_path","isLocked"]},"VariableFilePermissions":{"type":"object","properties":{"canDelete":{"type":"boolean"},"canEdit":{"type":"boolean"}},"required":["canDelete","canEdit"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem."},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem."},"name":{"type":"string","description":"Name is the name of this class of errors."},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"required":["name","id","message","temporary","timeout","fault"]}}}}
```
