openapi: 3.2.0 info: title: Harness Environment API version: '1.0' description: The Harness Software Delivery Platform uses OpenAPI Specification v3.0. contact: name: API Support email: contact@harness.io url: https://harness.io/ x-logo: url: https://mma.prnewswire.com/media/779232/Harnes_logo_horizontal.jpg?p=facebook altText: Harness termsOfService: https://harness.io/terms-of-use/ servers: - url: https://app.harness.io description: Harness host URL - url: https://{vanity} description: Vanity URL variables: vanity: default: app.harness.io security: - x-api-key: [] tags: - name: Environment description: The environment service for working with Environment-type infrastructures paths: /v1/idp-environments: parameters: [] post: summary: Create Compile And Execute Environment description: Create environment in catalog, compiles it and then finally execute it. tags: - Environment responses: '200': description: OK operationId: create-compile-and-execute-environment x-stoplight: id: ve9qj9hgiro5a x-internal: false security: - x-api-key: [] parameters: - $ref: '#/components/parameters/AccountHeader5' - $ref: '#/components/parameters/OrgIdentifierQueryParam' - $ref: '#/components/parameters/ProjectIdentifierQueryParam' - name: dryRun in: query required: false schema: type: boolean default: false description: When true, only compiles and validates the environment without creating entity or executing. When false (default), compiles, creates entity, and executes. requestBody: content: application/json: schema: $ref: '#/components/schemas/EnvironmentProxyCreateRequest' /v1/idp-environments/{environment-id}: parameters: - schema: type: string name: environment-id in: path required: true put: summary: Update Compile And Execute Environment description: Update environment in catalog, compiles it and then finally execute it. tags: - Environment responses: '200': description: OK operationId: update-compile-and-execute-environment x-stoplight: id: j5gxzay5ncy66 x-internal: false security: - x-api-key: [] parameters: - $ref: '#/components/parameters/AccountHeader5' - $ref: '#/components/parameters/OrgIdentifierQueryParam' - $ref: '#/components/parameters/ProjectIdentifierQueryParam' requestBody: content: application/json: schema: $ref: '#/components/schemas/EnvironmentProxyUpdateRequest' delete: summary: Delete Environment description: Delete any environment that is no longer active tags: - Environment responses: '200': description: OK operationId: delete-environment1 x-stoplight: id: g5au3w8dvrhxk security: - x-api-key: [] parameters: - $ref: '#/components/parameters/AccountHeader5' - $ref: '#/components/parameters/OrgIdentifierQueryParam' - $ref: '#/components/parameters/ProjectIdentifierQueryParam' /api/environments/compile: post: tags: - Environment summary: Compile Environment description: Endpoint for compiling an environment and a target state to a valid infrastructure operationId: Environment#Compile parameters: - 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/CompileRequestBody' responses: '200': description: OK response. content: application/json: schema: $ref: '#/components/schemas/CompileResponseBody' '400': description: 'bad_request: Bad Request' content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: 'not_found: Not Found' content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: 'already_exists: Already Exists' content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: 'internal_error: Internal Server Error' content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: 'unimplemented: Not Implemented' content: application/json: schema: $ref: '#/components/schemas/Error' security: - x-api-key: [] /api/environments/schemas: get: tags: - Environment summary: Schemas Environment description: Endpoint for retrieving the environment and environment blueprint schemas operationId: Environment#Schemas parameters: - 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/SchemasRequestBody' responses: '200': description: OK response. content: application/json: schema: $ref: '#/components/schemas/SchemasResponseBody' '400': description: 'bad_request: Bad Request' content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: 'not_found: Not Found' content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: 'already_exists: Already Exists' content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: 'internal_error: Internal Server Error' content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: 'unimplemented: Not Implemented' content: application/json: schema: $ref: '#/components/schemas/Error' security: - x-api-key: [] components: schemas: SchemasResponseBody: type: object properties: environmentBlueprintSchema: type: string description: Environment blueprint schema environmentSchema: type: string description: Environment schema required: - environmentBlueprintSchema - environmentSchema Output: type: object properties: description: type: string type: type: string enum: - string - integer - number - object - boolean - array value: {} required: - value additionalProperties: false Infrastructure1: type: object properties: identifier: type: string instances: type: array items: $ref: '#/components/schemas/InfraInstance' metadata: type: object additionalProperties: true outputs: type: object additionalProperties: $ref: '#/components/schemas/Output' targetState: $ref: '#/components/schemas/State' required: - identifier - targetState additionalProperties: false Error: type: object properties: code: type: string details: type: object additionalProperties: type: string message: type: string name: type: string required: - name - message CompileResponseBody: type: object properties: combinedOverrides: $ref: '#/components/schemas/EnvironmentOverrides' configOptions: $ref: '#/components/schemas/EnvironmentConfigOptions' errors: type: array items: $ref: '#/components/schemas/CompileError' infrastructure: $ref: '#/components/schemas/Infrastructure1' required: - configOptions - errors EntityConfigOptions: type: object properties: inputs: type: object additionalProperties: $ref: '#/components/schemas/InterfaceInput' targetState: $ref: '#/components/schemas/State' required: - inputs EnvironmentConfigOptions: type: object properties: entities: type: object additionalProperties: $ref: '#/components/schemas/EntityConfigOptions' inputs: type: object additionalProperties: $ref: '#/components/schemas/InterfaceInput' required: - inputs - entities EnvironmentProxyUpdateRequest: title: EnvironmentProxyUpdateRequest x-stoplight: id: 9adjz79py8fu0 type: object properties: environment_blueprint_version: type: string description: Version of the environment blueprint (e.g., v1.0.0) x-stoplight: id: env_blueprint_version_update based_on_identifier: type: string description: Reference to the environment this is based on in format environment:account.orgIdentifier.projectIdentifier/identifier x-stoplight: id: based_on_id_update overrides: type: string description: Overrides in Yaml format x-stoplight: id: 16pk3frz1hxht target_state: description: Target state for the environment x-stoplight: id: vf9ks00g6mrhn enum: - running - inactive - paused inputs: type: string description: Inputs for the environment as YAML/JSON string (e.g., ttl, resources) x-stoplight: id: env_inputs_update EntityOverrides: type: object properties: config: type: object description: Configuration overrides for the entity additionalProperties: true targetState: $ref: '#/components/schemas/State' required: - config additionalProperties: false Dependency: type: object properties: identifier: type: string optional: type: boolean required: - identifier additionalProperties: false EnvironmentProxyCreateRequest: title: EnvironmentProxyCreateRequest description: Information Environment to be created in catalog - environment name, identifier, owner, blueprint identifier, overrides x-stoplight: id: s9ja1fpx8qh9l type: object required: - environment_name - environment_identifier - owner - environment_blueprint_identifier - environment_blueprint_version - overrides properties: environment_name: type: string description: Environment Name x-stoplight: id: 5s137p3i9fgql environment_identifier: type: string description: Environment Identifier x-stoplight: id: 6pmebr31waga3 owner: type: string description: Owner x-stoplight: id: 9z7etkk6xkx0f environment_blueprint_identifier: type: string description: Environment BluePrint Identifier x-stoplight: id: 0viiddkxmp9tf environment_blueprint_version: type: string description: Version of the environment blueprint (e.g., v1.0.0) x-stoplight: id: env_bp_version based_on_identifier: type: string description: Reference to the environment this is based on in format environment:account.orgIdentifier.projectIdentifier/identifier x-stoplight: id: based_on_id overrides: type: string description: Overrides in Yaml format x-stoplight: id: or7liwjgk3ytj target_state: description: Target state for the environment x-stoplight: id: target_state_create enum: - running - inactive - paused inputs: type: string description: Inputs for the environment as YAML/JSON string (e.g., ttl, resources) x-stoplight: id: env_inputs type: type: string description: Type of the environment (e.g., ephemeral, persistent) x-stoplight: id: env_type tags: type: array description: Tags x-stoplight: id: 2oos0v1c5l74z items: x-stoplight: id: 2eo499jnlwm1g type: string description: type: string description: Description x-stoplight: id: ojutyvaelfa6y CompileError: type: object properties: message: type: string required: - message InterfaceInput: type: object properties: default: {} type: type: string enum: - string - integer - number - object - boolean - array value: {} required: - type additionalProperties: false Steps: type: object properties: apply: type: object additionalProperties: true create: type: object additionalProperties: true delete: type: object additionalProperties: true destroy: type: object additionalProperties: true pause: type: object additionalProperties: true resume: type: object additionalProperties: true required: - apply - destroy additionalProperties: false CompileRequestBody: type: object properties: environmentYaml: type: string description: Environment to compile orgIdentifier: type: string description: Org is the organization identifier. projectIdentifier: type: string description: Project is the project identifier. targetState: $ref: '#/components/schemas/State' description: Scope for the request, including account, org and project. required: - environmentYaml - targetState SchemasRequestBody: type: object properties: orgIdentifier: type: string description: Org is the organization identifier. projectIdentifier: type: string description: Project is the project identifier. description: Scope for the request, including account, org and project. InfraInstance: type: object properties: dependencies: type: object additionalProperties: $ref: '#/components/schemas/Dependency' identifier: type: string implementation: $ref: '#/components/schemas/Implementation' metadata: type: object additionalProperties: true outputs: type: object additionalProperties: $ref: '#/components/schemas/Output' targetState: $ref: '#/components/schemas/State' required: - identifier additionalProperties: false Implementation: type: object properties: backend: type: string steps: $ref: '#/components/schemas/Steps' values: type: object additionalProperties: true required: - backend - steps additionalProperties: false EnvironmentOverrides: type: object properties: config: type: object description: Configuration overrides for the environment additionalProperties: true entities: type: object description: Entity-specific overrides additionalProperties: $ref: '#/components/schemas/EntityOverrides' required: - config - entities additionalProperties: false State: type: object properties: state: type: string enum: - unknown - inactive - instantiated - running - paused required: - state parameters: ProjectIdentifierQueryParam: name: projectIdentifier in: query required: false schema: type: string default: null description: Unique identifier of the project within the organization OrgIdentifierQueryParam: name: orgIdentifier in: query required: false schema: type: string default: null description: Unique identifier of the organization within the account AccountHeader5: name: Harness-Account in: header required: false schema: type: string description: Identifier field of the account the resource is scoped to. securitySchemes: x-api-key: name: x-api-key type: apiKey in: header description: API key is a token provided while making the API calls. This is used to authenticate the client at the exposed endpoint. externalDocs: description: Find out more about Swagger url: http://swagger.io x-stoplight: id: oc91t4vrfnjyi x-tagGroups: - name: Organizations tags: - Organization - name: Projects tags: - Org Project - Project - name: Secrets tags: - Account Secret - Org Secret - Project Secret - Secrets - name: Connectors tags: - Account Connector - Org Connector - Project Connector - Connectors - GoogleSecretManagerConnector - name: Roles tags: - Account Roles - Organization Roles - Project Roles - Roles - name: Resource Groups tags: - Account Resource Groups - Organization Resource Groups - Project Resource Groups - Filter Resource Groups - Harness Resource Group - Zendesk - name: Role Assignments tags: - Account Role Assignments - Org Role Assignments - Project Role Assignments - Role Assignments - name: Platform tags: - Access Control List - Account Banner - Account Banner - Account Licensed Modules - Account License Type - Account Webhooks - AccountSetting - Accounts - Analyze Account Access Policy - Analyze Organization Access Policy - Analyze Project Access Policy - ApiKey - Audit - AuditFilters - Authentication Settings - Canny - Devops Essentials License Data By Account - EULA - Filter - Harness Resource Type - Invite - IP Allowlist - Nextgen Ldap - Notification Channels - Notification Rules - OIDC - Oidc-Access-Token - Oidc-ID-Token - Org Webhooks - Permissions - Project Webhooks - Secret Managers - Service Account - Setting - SMTP - Source Code Manager - Token - User - User Group - Variables - name: Delegate tags: - Agent mTLS Endpoint Management - Delegate Download Resource - Delegate Group Tags Resource - Delegate Setup Resource - Delegate Token Resource - name: Pipelines tags: - Pipelines - Input Sets - Approvals - Pipeline Execution - Pipeline Dashboard - Pipeline Input Set - Pipeline - Pipeline Execution Details - Pipeline Execute - Pipeline Refresh - Pipeline data retention - Triggers - TriggersEvents - Webhook Triggers - Webhook Event Handler - DryRunPipeline - name: Artifact Registry tags: - Registries - Artifacts - Docker Artifacts - Helm Artifacts - quarantine - Webhooks - Spaces - Replication - Registry V3 - Registries - Registry V3 - Packages - Registry V3 - Versions - Registry V3 - Files - Registry V3 - Metadata - Registry V3 - Firewall - Registry V3 - Transfer - name: Database DevOps tags: - Database Schema - Database Instance - Deployed State - Execution Config - Migration State - name: CD tags: - K8s Release Service Mapping - CustomDeployment - Environments - EnvironmentGroup - Infrastructures - Usage - File Store - Service Dashboard - ServiceOverrides - Rollback - tas - name: Deployment Freeze tags: - Freeze CRUD - Freeze Evaluation - Freeze Schema - name: Services tags: - Account Services - Org Services - Project Services - Services - name: Rancher Infrastructures tags: - Account Rancher Infrastructure - Org Rancher Infrastructure - Project Rancher Infrastructure - name: Templates tags: - Account Template - Org Template - Project Template - Templates - Global Templates - name: GitOps tags: - Agents - Application - Applications - Certificates - Clusters - Dashboard Aggregates - Dashboards - GnuPGP Keys - GPG Keys - Hosts - Project mappings - Projects - Reconciler - Repositories - Repository Certificates - Repository credentials - ValidateHost - name: GitX tags: - GitX Webhooks - Org Gitx Webhooks - Project Gitx Webhooks - name: CACM tags: - Anomalies Ignorelist Rule - Anomalies - BI Dashboards - Budgets - Budget Groups - Cost Categories - Cloud Accounts - K8S Connectors Metadata - Notification Settings v2 - Overview - Data Job Status - Recommendation cost settings - Unit Metric - Anomaly Comments - Cloud and AI cost anomaly details - Cloud and AI cost anomalies v2 - Cost Details - Currency Preferences - External Data Provider - AiEngine - CACM governance cost settings - Governance Enforcement Recommendation APIs - Governance Alert - Governance Overview - Governance Recommendation APIs - RuleEnforcement - Rule Executions - Rule - Rule Sets - Perspectives Folders - Perspective Reports - Perspectives - Cost Category Jira Project Mapping - Recommendations Details - Recommendations - Recommendation Jira - Recommendation Preferences - Recommendation Presets - Recommendation Servicenow - Recommendation Tags - Recommendation Ignore List - AutoStopping Rules - AutoStopping Rules V2 - AutoStopping Load Balancers - AutoStopping Fixed Schedules - AutoStopping Alerts - Commitment Orchestrator Events APIs - name: Feature Flags tags: - API Keys - Feature Flags - Targets - Target Groups - Environment Perspectives - Anomalies - Proxy - Tags - name: SRM tags: - Monitored Services - SLOs dashboard - NG SLOs - SLOs - Downtime - Srm Notification - name: Internal Developer Portal - IDP tags: - Entities - Teams - CatalogCustomProperties - Scores - DataSource - KubernetesDataPoints - AggregationRules - AppConfig - PluginInfo - LayoutProxy - Kinds - LayoutsV3 - LayoutsV4 - name: Environment Management - IDP tags: - Environment - Infrastructure - Instance - name: Custom Dashboards tags: - aida - dashboards - downloads - embed - folders - name: Policy Management tags: - dashboard - examples - policies - evaluate - evaluations - policysets - system - name: Code tags: - repository - status_checks - pullreq - upload - webhook - resource - rules - labels - name: IaCM tags: - usage - approvals - costs - executions - module-registry - workspaces - settings - tf-standard-backend - variables - name: STO tags: - Exemptions - Issues - Scans - Products - Test Targets - Target Variants - name: SEI tags: - Collection categories - Collections - Contributors - DORA - name: Git Sync (deprecated) tags: - Git Branches - Git Full Sync - Git Sync Settings - Git Sync - Git Sync Errors - name: Error Models tags: - Error Response - Governance Metadata - name: Supply Chain Security tags: - integration - PipelineInfraConfig - SBOM - Integration Step Config - Delete Step Config - Delete Repositories - Pipeline Store Config - Evidence Vault [Beta] - name: Release Management tags: - Release Groups - Releases - Orchestration Processes - Orchestration Activities - Orchestration Executions - Conflicts - Freeze - Reports - Uploads - name: Resilience Testing tags: - Actions - Action Templates - Chaos Components - Chaos Hubs - ChaosGuard Conditions - ChaosGuard Rules - DR Tests - Experiments - Experiment Templates - Faults - Fault Templates - Chaos Infrastructure - Health - Network Maps - Onboarding - Probes - Probe Templates - Chaos Recommendations - Risks