For the complete documentation index, see llms.txt. This page is also available as Markdown.

Ansible

Ansible Service handles the API for ansible entities.

List Ansible Activities on account level

get

List all activities at account scope. Org and project scoped activities are not included.

Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
sortstring · enumOptional

Sort order for results

Default: created,DESCExample: created,ASCPossible values:
InventorySearchTermstringOptional

Search term to filter by inventory identifier

Example: inventory_1
PlaybookSearchTermstringOptional

Search term to filter by playbook identifier

Example: playbook_1
activity_typestringOptional

Activity type filter

Example: Et eos.
statusstringOptional

Activity status filter

Example: Esse nihil magnam dolorum dolores a.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: s8
Responses
200

OK response.

application/json
get/api/ansible/activities
GET /api/ansible/activities HTTP/1.1
Host: localhost:80
Harness-Account: s8
Accept: */*
[
  {
    "account": "mld",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Sapiente dolorem.",
    "metadata": {
      "activity_status": "Dolorem amet quae.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Quia aut eum dignissimos itaque.",
      "git_commit_message": "Aspernatur assumenda eius sit vitae quos dolorem.",
      "git_commit_sha": "Facilis et harum.",
      "git_repo": "Iure reprehenderit.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 3729912682196842500,
        "host_changed": 7326503586878806000,
        "host_failed": 510844048246640640,
        "host_ok": 7033055310389248000,
        "host_skipped": 8298202262197766000,
        "host_unreachable": 3136096962125600300,
        "output_size_bytes": 5580013020588243000,
        "payload_size_bytes": 5024210113655448000,
        "total_hosts": 3289931238796667000,
        "total_tasks": 8463213749394180000
      },
      "pipeline": "Sint consequuntur libero commodi veritatis atque.",
      "pipeline_execution_id": "Omnis autem ullam quas et.",
      "pipeline_execution_number": "Rem cumque molestias assumenda.",
      "pipeline_name": "Et accusamus veniam libero.",
      "pipeline_stage_id": "Repellat soluta.",
      "plugin_version": "Amet totam laboriosam voluptas.",
      "results_uuid": "Officia necessitatibus quis provident consequatur.",
      "trigger": {
        "Alias quis.": "Quaerat quasi.",
        "Autem aut.": "Quis ipsa est.",
        "Qui et.": "Molestiae autem nisi."
      }
    },
    "org": "12",
    "playbooks": "Qui est.",
    "project": "0"
  },
  {
    "account": "mld",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Sapiente dolorem.",
    "metadata": {
      "activity_status": "Dolorem amet quae.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Quia aut eum dignissimos itaque.",
      "git_commit_message": "Aspernatur assumenda eius sit vitae quos dolorem.",
      "git_commit_sha": "Facilis et harum.",
      "git_repo": "Iure reprehenderit.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 3729912682196842500,
        "host_changed": 7326503586878806000,
        "host_failed": 510844048246640640,
        "host_ok": 7033055310389248000,
        "host_skipped": 8298202262197766000,
        "host_unreachable": 3136096962125600300,
        "output_size_bytes": 5580013020588243000,
        "payload_size_bytes": 5024210113655448000,
        "total_hosts": 3289931238796667000,
        "total_tasks": 8463213749394180000
      },
      "pipeline": "Sint consequuntur libero commodi veritatis atque.",
      "pipeline_execution_id": "Omnis autem ullam quas et.",
      "pipeline_execution_number": "Rem cumque molestias assumenda.",
      "pipeline_name": "Et accusamus veniam libero.",
      "pipeline_stage_id": "Repellat soluta.",
      "plugin_version": "Amet totam laboriosam voluptas.",
      "results_uuid": "Officia necessitatibus quis provident consequatur.",
      "trigger": {
        "Alias quis.": "Quaerat quasi.",
        "Autem aut.": "Quis ipsa est.",
        "Qui et.": "Molestiae autem nisi."
      }
    },
    "org": "12",
    "playbooks": "Qui est.",
    "project": "0"
  },
  {
    "account": "mld",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Sapiente dolorem.",
    "metadata": {
      "activity_status": "Dolorem amet quae.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Quia aut eum dignissimos itaque.",
      "git_commit_message": "Aspernatur assumenda eius sit vitae quos dolorem.",
      "git_commit_sha": "Facilis et harum.",
      "git_repo": "Iure reprehenderit.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 3729912682196842500,
        "host_changed": 7326503586878806000,
        "host_failed": 510844048246640640,
        "host_ok": 7033055310389248000,
        "host_skipped": 8298202262197766000,
        "host_unreachable": 3136096962125600300,
        "output_size_bytes": 5580013020588243000,
        "payload_size_bytes": 5024210113655448000,
        "total_hosts": 3289931238796667000,
        "total_tasks": 8463213749394180000
      },
      "pipeline": "Sint consequuntur libero commodi veritatis atque.",
      "pipeline_execution_id": "Omnis autem ullam quas et.",
      "pipeline_execution_number": "Rem cumque molestias assumenda.",
      "pipeline_name": "Et accusamus veniam libero.",
      "pipeline_stage_id": "Repellat soluta.",
      "plugin_version": "Amet totam laboriosam voluptas.",
      "results_uuid": "Officia necessitatibus quis provident consequatur.",
      "trigger": {
        "Alias quis.": "Quaerat quasi.",
        "Autem aut.": "Quis ipsa est.",
        "Qui et.": "Molestiae autem nisi."
      }
    },
    "org": "12",
    "playbooks": "Qui est.",
    "project": "0"
  }
]

Show ansible activity on account level

get

Show an individual account scoped ansible activity.

Path parameters
idstringRequired

The unique ID for this activity

Example: Id iure.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: f8
Responses
200

OK response.

application/json
accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 2rj
createdinteger · int64Required

Timestamp when the resource was created.

Example: 1627590400
event_typestring · enumRequired

The type of event that occurred

Example: activity-executionPossible values:
idstringRequired

The unique identifier for this activity

Example: dc538c61-de48-4220-958c-5f3c4f983daa
inventoriesstringRequired

Inventories associated with this event

Example: Porro nihil non non ut omnis eaque.
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: js5
playbooksstringRequired

Playbooks associated with this event

Example: Nihil hic consequuntur culpa in assumenda molestiae.
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: xi
get/api/ansible/activities/{id}
GET /api/ansible/activities/{id} HTTP/1.1
Host: localhost:80
Harness-Account: f8
Accept: */*
{
  "account": "tmn",
  "created": 1627590400,
  "event_type": "activity-execution",
  "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
  "inventories": "Quia qui aliquam dolores nemo.",
  "metadata": {
    "activity_status": "Asperiores quod molestiae consequatur vitae.",
    "filters": "tags=deploy skip-tags=slow limit=web",
    "git_branch": "Voluptas animi dolor dolorem laborum.",
    "git_commit_message": "Dolor facere.",
    "git_commit_sha": "Voluptatem quia earum voluptatem quas in.",
    "git_repo": "Dolores nobis.",
    "metrics": {
      "circuit_breaker_triggered": false,
      "duration_ms": 4956144492920646000,
      "host_changed": 7991066862074085000,
      "host_failed": 7286501368895138000,
      "host_ok": 8723992317937321000,
      "host_skipped": 7515790151550636000,
      "host_unreachable": 1865379895225030100,
      "output_size_bytes": 7964733890466916000,
      "payload_size_bytes": 2592876429800924000,
      "total_hosts": 7520422272859706000,
      "total_tasks": 5767911488264385000
    },
    "pipeline": "Ex vel quaerat sunt minima dolor.",
    "pipeline_execution_id": "Nulla ratione et omnis.",
    "pipeline_execution_number": "Ipsum qui totam cum.",
    "pipeline_name": "Et alias quis sint porro delectus est.",
    "pipeline_stage_id": "Pariatur porro earum sed.",
    "plugin_version": "Est laudantium.",
    "results_uuid": "Quam repellat omnis eos aut.",
    "trigger": {
      "Id molestias.": "Beatae aut asperiores nulla."
    }
  },
  "org": "h",
  "playbooks": "Aut voluptas corporis similique nisi.",
  "project": "zm"
}

Show data on account level

get

Get binary data generated by an account scoped ansible run.

Path parameters
idstringRequired

The unique identifier for the data

Example: dc538c61-de48-4220-958c-5f3c4f983daa
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: weu
Responses
200

OK response.

application/json
string · binaryOptional
get/api/ansible/data/{id}
GET /api/ansible/data/{id} HTTP/1.1
Host: localhost:80
Harness-Account: weu
Accept: */*
binary

Get Ansible file on account level

get

Retrieve an account scoped playbook's YAML file from its configured git repository.

Query parameters
resource_typestring · enumRequired

Type of ansible resource (playbook or inventory).

Example: playbookPossible values:
identifierstringRequired

Identifier of the playbook or inventory.

Example: my-playbook
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: k
Responses
200

OK response.

application/json
string · binaryOptional
get/api/ansible/file
GET /api/ansible/file?resource_type=playbook&identifier=my-playbook HTTP/1.1
Host: localhost:80
Harness-Account: k
Accept: */*
binary

List Ansible playbooks on account level

get

List all playbooks at account scope. Org and project scoped playbooks are not included.

Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
searchTermstringOptional

Filter results by partial name match

Default: ""Example: mysta
sortstring · enumOptional

Sort order for results

Default: name,ASCExample: updated,DESCPossible values:
tagsstring[]Optional

Filter results by tags (OR logic, exact match)

Example: ["Eius vitae.","Molestiae tenetur consequuntur.","Ut et nihil soluta doloribus enim.","Iure asperiores."]
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 0rx
Responses
200

OK response.

application/json
get/api/ansible/playbook
GET /api/ansible/playbook HTTP/1.1
Host: localhost:80
Harness-Account: 0rx
Accept: */*
[
  {
    "account": "r",
    "ansible_galaxy": true,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Rem reprehenderit qui dolore quo qui similique.",
    "identifier": "Aspernatur repudiandae voluptate.",
    "name": "test playbook",
    "org": "7af",
    "project": "yt",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Sit dolores.",
      "Voluptas facilis in est sunt veniam repudiandae.",
      "Quas praesentium magni.",
      "Rerum cumque sunt."
    ],
    "updated": 1627686800,
    "vars": "Et iste maiores consectetur doloribus autem laboriosam."
  },
  {
    "account": "r",
    "ansible_galaxy": true,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Rem reprehenderit qui dolore quo qui similique.",
    "identifier": "Aspernatur repudiandae voluptate.",
    "name": "test playbook",
    "org": "7af",
    "project": "yt",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Sit dolores.",
      "Voluptas facilis in est sunt veniam repudiandae.",
      "Quas praesentium magni.",
      "Rerum cumque sunt."
    ],
    "updated": 1627686800,
    "vars": "Et iste maiores consectetur doloribus autem laboriosam."
  }
]

Create Ansible playbook on account level

post

Create a new playbook at account scope.

Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: ncp
Body
ansible_galaxybooleanOptional

Install Ansible Galaxy dependencies

Default: falseExample: true
ansible_galaxy_requirements_filestringOptional

Path to Ansible Galaxy requirements file

Example: requirements.yml
descriptionstring · max: 1024Optional

Description documents the playbook purpose and usage

Example: Playbook for deploying web services to production
identifierstringRequired

The unique identifier for this playbook

Example: Quia neque nemo dolores harum quam qui.
namestring · min: 1 · max: 1024Required

Name is the human readable name

Example: test playbook
repositorystringOptional

Repository is the name of the repository to use.

Example: my-repo
repository_branchstringOptional

Repository Branch in which the playbook should be accessed.

Example: main
repository_commitstringOptional

Repository Commit/Tag in which the playbook should be accessed.

Example: abc10ed
repository_connectorstringOptional

Repository Connector is the reference to the connector to use for this playbook.

Example: my-connector
repository_pathstringRequired

Repository Path is the path in which the playbook resides.

Default: ""Example: playbooks/
tagsstring[]Optional

Tags associated with the playbook

Example: ["Dolorum voluptatum.","Eveniet quo voluptatem.","Consectetur cumque magni."]
Responses
201

Created response.

application/json
accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: vs
ansible_galaxybooleanOptional

Install Ansible Galaxy dependencies

Default: falseExample: true
ansible_galaxy_requirements_filestringOptional

Path to Ansible Galaxy requirements file

Example: requirements.yml
createdinteger · int64Required

Timestamp when the resource was created.

Example: 1627590400
descriptionstring · max: 1024Optional

Description documents the playbook purpose and usage

Example: Playbook for deploying web services to production
env_varsstringOptional

The environment vars in the playbook

Example: Qui est.
identifierstringRequired

The unique identifier for this playbook

Example: Neque tenetur repellendus.
namestring · min: 1 · max: 1024Required

Name is the human readable name

Example: test playbook
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: r
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: c
repositorystringOptional

Repository is the name of the repository to use.

Example: my-repo
repository_branchstringOptional

Repository Branch in which the playbook should be accessed.

Example: main
repository_commitstringOptional

Repository Commit/Tag in which the playbook should be accessed.

Example: abc10ed
repository_connectorstringOptional

Repository Connector is the reference to the connector to use for this playbook.

Example: my-connector
repository_pathstringRequired

Repository Path is the path in which the playbook resides.

Default: ""Example: playbooks/
tagsstring[]Optional

Tags associated with the playbook

Example: ["A deserunt asperiores enim qui.","Rerum reprehenderit voluptas illum voluptas deserunt quisquam.","Quis et et at."]
updatedinteger · int64Required

Timestamp when the resource was last updated.

Example: 1627686800
varsstringOptional

The vars in the playbook

Example: Aut architecto et qui.
post/api/ansible/playbook
POST /api/ansible/playbook HTTP/1.1
Host: localhost:80
Harness-Account: ncp
Content-Type: application/json
Accept: */*
Content-Length: 1469

{
  "ansible_galaxy": true,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "description": "Playbook for deploying web services to production",
  "env_vars": {
    "Animi numquam assumenda nostrum aut voluptatum nulla.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    "Quo sed nostrum aliquam occaecati recusandae quaerat.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    "Vero odio et non nihil a.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  },
  "identifier": "Fuga voluptatem.",
  "name": "test playbook",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Vitae nesciunt illo minima enim.",
    "Consequuntur mollitia optio.",
    "Qui qui autem eius quisquam eum.",
    "Quas deserunt tempore."
  ],
  "vars": {
    "Dolorum reiciendis voluptatem.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  }
}
{
  "account": "q",
  "ansible_galaxy": false,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "created": 1627590400,
  "description": "Playbook for deploying web services to production",
  "env_vars": "Esse autem natus qui molestiae.",
  "identifier": "Inventore at occaecati nihil.",
  "name": "test playbook",
  "org": "4q",
  "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"
          }
        ],
        "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"
          }
        ],
        "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"
          }
        ],
        "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"
  },
  "project": "z7",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Veniam est qui minus minus.",
    "Sed iure veniam vitae quo corporis quaerat.",
    "Excepturi voluptatem est nihil."
  ],
  "updated": 1627686800,
  "vars": "Eveniet dolor tempora dignissimos saepe eum."
}

Show Ansible playbook on account level

get

Show an individual account scoped playbook.

Path parameters
identifierstringRequired

The unique identifier for this playbook

Example: Voluptate et harum voluptatem qui deleniti.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: l
Responses
200

OK response.

application/json
accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 0ai
ansible_galaxybooleanOptional

Install Ansible Galaxy dependencies

Default: falseExample: false
ansible_galaxy_requirements_filestringOptional

Path to Ansible Galaxy requirements file

Example: requirements.yml
createdinteger · int64Required

Timestamp when the resource was created.

Example: 1627590400
descriptionstring · max: 1024Optional

Description documents the playbook purpose and usage

Example: Playbook for deploying web services to production
env_varsstringOptional

The environment vars in the playbook

Example: Ea est tenetur est eos distinctio corporis.
identifierstringRequired

The unique identifier for this playbook

Example: Quia quasi ipsa vero rerum possimus numquam.
namestring · min: 1 · max: 1024Required

Name is the human readable name

Example: test playbook
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 0
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: f
repositorystringOptional

Repository is the name of the repository to use.

Example: my-repo
repository_branchstringOptional

Repository Branch in which the playbook should be accessed.

Example: main
repository_commitstringOptional

Repository Commit/Tag in which the playbook should be accessed.

Example: abc10ed
repository_connectorstringOptional

Repository Connector is the reference to the connector to use for this playbook.

Example: my-connector
repository_pathstringRequired

Repository Path is the path in which the playbook resides.

Default: ""Example: playbooks/
tagsstring[]Optional

Tags associated with the playbook

Example: ["Adipisci dolor.","Pariatur atque est odit quam placeat.","Omnis sint."]
updatedinteger · int64Required

Timestamp when the resource was last updated.

Example: 1627686800
varsstringOptional

The vars in the playbook

Example: Quidem reprehenderit omnis dolore rerum autem.
get/api/ansible/playbook/{identifier}
GET /api/ansible/playbook/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: l
Accept: */*
{
  "account": "h",
  "ansible_galaxy": false,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "created": 1627590400,
  "description": "Playbook for deploying web services to production",
  "env_vars": "Corrupti ullam inventore tenetur.",
  "identifier": "Corrupti quas.",
  "name": "test playbook",
  "org": "anm",
  "project": "rn",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Quis illo aut ipsa.",
    "Quia dolor tempore temporibus at.",
    "Ut aliquid perspiciatis exercitationem vero fugit corrupti."
  ],
  "updated": 1627686800,
  "vars": "Laboriosam eos assumenda et."
}

Update Ansible playbook on account level

put

Update an existing account scoped playbook.

Path parameters
identifierstringRequired

The unique identifier for this playbook

Example: Harum cupiditate deserunt fugit.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: q
Body
ansible_galaxybooleanOptional

Install Ansible Galaxy dependencies

Default: falseExample: true
ansible_galaxy_requirements_filestringOptional

Path to Ansible Galaxy requirements file

Example: requirements.yml
descriptionstring · max: 1024Optional

Description documents the playbook purpose and usage

Example: Playbook for deploying web services to production
namestring · min: 1 · max: 1024Required

Name is the human readable name

Example: test playbook
repositorystringOptional

Repository is the name of the repository to use.

Example: my-repo
repository_branchstringOptional

Repository Branch in which the playbook should be accessed.

Example: main
repository_commitstringOptional

Repository Commit/Tag in which the playbook should be accessed.

Example: abc10ed
repository_connectorstringOptional

Repository Connector is the reference to the connector to use for this playbook.

Example: my-connector
repository_pathstringRequired

Repository Path is the path in which the playbook resides.

Default: ""Example: playbooks/
tagsstring[]Optional

Tags associated with the playbook

Example: ["Omnis aut praesentium nisi.","Non ut."]
Responses
200

OK response.

application/json
put/api/ansible/playbook/{identifier}
PUT /api/ansible/playbook/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: q
Content-Type: application/json
Accept: */*
Content-Length: 1213

{
  "ansible_galaxy": true,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "description": "Playbook for deploying web services to production",
  "env_vars": {
    "Dolor similique dolorum ullam.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  },
  "name": "test playbook",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Soluta beatae commodi.",
    "Consequuntur velit libero quia autem architecto molestias.",
    "Placeat optio soluta eligendi.",
    "Voluptates minima itaque."
  ],
  "vars": {
    "Expedita labore aut asperiores ducimus.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    "Illo dignissimos consequatur iusto expedita eos.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  }
}
{
  "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"
          }
        ],
        "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"
          }
        ],
        "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"
          }
        ],
        "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"
  }
}

Delete Ansible playbook on account level

delete

Delete an existing account scoped playbook.

Path parameters
identifierstringRequired

The unique identifier for this playbook

Example: Occaecati doloribus velit recusandae.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: x
Responses
200

OK response.

No content

delete/api/ansible/playbook/{identifier}
DELETE /api/ansible/playbook/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: x
Accept: */*

No content

Show Ansible playbook vars on account level

get

Show an individual account scoped playbook vars.

Path parameters
identifierstringRequired

Playbook identifier

Example: Ratione quasi non.
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: pto
Responses
200

OK response.

application/json
get/api/ansible/playbook/{identifier}/vars
GET /api/ansible/playbook/{identifier}/vars HTTP/1.1
Host: localhost:80
Harness-Account: pto
Accept: */*
{
  "env_vars": [
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    },
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    },
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    }
  ],
  "vars": [
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    },
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    },
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    }
  ]
}

Create dynamic Ansible playbook variable on account level

post

Create a new dynamic variable on an account scoped playbook.

Path parameters
identifierstringRequired

The unique identifier for this playbook

Example: test_playbook
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 3
Body
Responses
201

Created response.

No content

post/api/ansible/playbook/{identifier}/vars
POST /api/ansible/playbook/{identifier}/vars HTTP/1.1
Host: localhost:80
Harness-Account: 3
Content-Type: application/json
Accept: */*
Content-Length: 1445

{
  "env_vars": [
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    }
  ],
  "vars": [
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    }
  ]
}

No content

Update dynamic Ansible playbook variable on account level

put

Update an existing dynamic variable on an account scoped playbook.

Path parameters
identifierstringRequired

The unique identifier for this playbook

Example: test_playbook
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: zk
Body
Responses
200

OK response.

No content

put/api/ansible/playbook/{identifier}/vars
PUT /api/ansible/playbook/{identifier}/vars HTTP/1.1
Host: localhost:80
Harness-Account: zk
Content-Type: application/json
Accept: */*
Content-Length: 1682

{
  "env_vars": [
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    }
  ],
  "vars": [
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    }
  ]
}

No content

Delete dynamic Ansible playbook variable on account level

delete

Delete a dynamic variable from an account scoped playbook.

Path parameters
identifierstringRequired

The unique identifier for this playbook

Example: test_playbook
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: c8l
Body
varsstring[]RequiredExample: ["Dolorem recusandae impedit voluptates assumenda omnis.","Ut numquam.","Excepturi voluptas deleniti asperiores officiis dolorum.","Qui sit tempore."]
Responses
200

OK response.

No content

delete/api/ansible/playbook/{identifier}/vars
DELETE /api/ansible/playbook/{identifier}/vars HTTP/1.1
Host: localhost:80
Harness-Account: c8l
Content-Type: application/json
Accept: */*
Content-Length: 130

{
  "vars": [
    "Amet occaecati maxime ut.",
    "Voluptatem nihil iusto asperiores.",
    "Veritatis ea aperiam qui beatae sapiente voluptatem."
  ]
}

No content

List Ansible Activities on org level

get

List all activities at org scope. Account and project scoped activities are not included.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: y
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
sortstring · enumOptional

Sort order for results

Default: created,DESCExample: created,ASCPossible values:
InventorySearchTermstringOptional

Search term to filter by inventory identifier

Example: inventory_1
PlaybookSearchTermstringOptional

Search term to filter by playbook identifier

Example: playbook_1
activity_typestringOptional

Activity type filter

Example: Enim aspernatur vel.
statusstringOptional

Activity status filter

Example: Saepe rem iste.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: a
Responses
200

OK response.

application/json
get/api/orgs/{org}/ansible/activities
GET /api/orgs/{org}/ansible/activities HTTP/1.1
Host: localhost:80
Harness-Account: a
Accept: */*
[
  {
    "account": "mld",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Sapiente dolorem.",
    "metadata": {
      "activity_status": "Dolorem amet quae.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Quia aut eum dignissimos itaque.",
      "git_commit_message": "Aspernatur assumenda eius sit vitae quos dolorem.",
      "git_commit_sha": "Facilis et harum.",
      "git_repo": "Iure reprehenderit.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 3729912682196842500,
        "host_changed": 7326503586878806000,
        "host_failed": 510844048246640640,
        "host_ok": 7033055310389248000,
        "host_skipped": 8298202262197766000,
        "host_unreachable": 3136096962125600300,
        "output_size_bytes": 5580013020588243000,
        "payload_size_bytes": 5024210113655448000,
        "total_hosts": 3289931238796667000,
        "total_tasks": 8463213749394180000
      },
      "pipeline": "Sint consequuntur libero commodi veritatis atque.",
      "pipeline_execution_id": "Omnis autem ullam quas et.",
      "pipeline_execution_number": "Rem cumque molestias assumenda.",
      "pipeline_name": "Et accusamus veniam libero.",
      "pipeline_stage_id": "Repellat soluta.",
      "plugin_version": "Amet totam laboriosam voluptas.",
      "results_uuid": "Officia necessitatibus quis provident consequatur.",
      "trigger": {
        "Alias quis.": "Quaerat quasi.",
        "Autem aut.": "Quis ipsa est.",
        "Qui et.": "Molestiae autem nisi."
      }
    },
    "org": "12",
    "playbooks": "Qui est.",
    "project": "0"
  },
  {
    "account": "mld",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Sapiente dolorem.",
    "metadata": {
      "activity_status": "Dolorem amet quae.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Quia aut eum dignissimos itaque.",
      "git_commit_message": "Aspernatur assumenda eius sit vitae quos dolorem.",
      "git_commit_sha": "Facilis et harum.",
      "git_repo": "Iure reprehenderit.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 3729912682196842500,
        "host_changed": 7326503586878806000,
        "host_failed": 510844048246640640,
        "host_ok": 7033055310389248000,
        "host_skipped": 8298202262197766000,
        "host_unreachable": 3136096962125600300,
        "output_size_bytes": 5580013020588243000,
        "payload_size_bytes": 5024210113655448000,
        "total_hosts": 3289931238796667000,
        "total_tasks": 8463213749394180000
      },
      "pipeline": "Sint consequuntur libero commodi veritatis atque.",
      "pipeline_execution_id": "Omnis autem ullam quas et.",
      "pipeline_execution_number": "Rem cumque molestias assumenda.",
      "pipeline_name": "Et accusamus veniam libero.",
      "pipeline_stage_id": "Repellat soluta.",
      "plugin_version": "Amet totam laboriosam voluptas.",
      "results_uuid": "Officia necessitatibus quis provident consequatur.",
      "trigger": {
        "Alias quis.": "Quaerat quasi.",
        "Autem aut.": "Quis ipsa est.",
        "Qui et.": "Molestiae autem nisi."
      }
    },
    "org": "12",
    "playbooks": "Qui est.",
    "project": "0"
  },
  {
    "account": "mld",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Sapiente dolorem.",
    "metadata": {
      "activity_status": "Dolorem amet quae.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Quia aut eum dignissimos itaque.",
      "git_commit_message": "Aspernatur assumenda eius sit vitae quos dolorem.",
      "git_commit_sha": "Facilis et harum.",
      "git_repo": "Iure reprehenderit.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 3729912682196842500,
        "host_changed": 7326503586878806000,
        "host_failed": 510844048246640640,
        "host_ok": 7033055310389248000,
        "host_skipped": 8298202262197766000,
        "host_unreachable": 3136096962125600300,
        "output_size_bytes": 5580013020588243000,
        "payload_size_bytes": 5024210113655448000,
        "total_hosts": 3289931238796667000,
        "total_tasks": 8463213749394180000
      },
      "pipeline": "Sint consequuntur libero commodi veritatis atque.",
      "pipeline_execution_id": "Omnis autem ullam quas et.",
      "pipeline_execution_number": "Rem cumque molestias assumenda.",
      "pipeline_name": "Et accusamus veniam libero.",
      "pipeline_stage_id": "Repellat soluta.",
      "plugin_version": "Amet totam laboriosam voluptas.",
      "results_uuid": "Officia necessitatibus quis provident consequatur.",
      "trigger": {
        "Alias quis.": "Quaerat quasi.",
        "Autem aut.": "Quis ipsa est.",
        "Qui et.": "Molestiae autem nisi."
      }
    },
    "org": "12",
    "playbooks": "Qui est.",
    "project": "0"
  }
]

Show ansible activity on org level

get

Show an individual org scoped ansible activity.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: u
idstringRequired

The unique ID for this activity

Example: Aliquid dignissimos quis ullam voluptas qui vero.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: r0
Responses
200

OK response.

application/json
accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: d
createdinteger · int64Required

Timestamp when the resource was created.

Example: 1627590400
event_typestring · enumRequired

The type of event that occurred

Example: activity-executionPossible values:
idstringRequired

The unique identifier for this activity

Example: dc538c61-de48-4220-958c-5f3c4f983daa
inventoriesstringRequired

Inventories associated with this event

Example: Qui aut quia accusantium sint quo.
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: r
playbooksstringRequired

Playbooks associated with this event

Example: Fugiat earum voluptatem.
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: l
get/api/orgs/{org}/ansible/activities/{id}
GET /api/orgs/{org}/ansible/activities/{id} HTTP/1.1
Host: localhost:80
Harness-Account: r0
Accept: */*
{
  "account": "0tt",
  "created": 1627590400,
  "event_type": "activity-execution",
  "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
  "inventories": "Aliquid odio expedita porro modi ratione.",
  "metadata": {
    "activity_status": "Asperiores quod molestiae consequatur vitae.",
    "filters": "tags=deploy skip-tags=slow limit=web",
    "git_branch": "Voluptas animi dolor dolorem laborum.",
    "git_commit_message": "Dolor facere.",
    "git_commit_sha": "Voluptatem quia earum voluptatem quas in.",
    "git_repo": "Dolores nobis.",
    "metrics": {
      "circuit_breaker_triggered": false,
      "duration_ms": 4956144492920646000,
      "host_changed": 7991066862074085000,
      "host_failed": 7286501368895138000,
      "host_ok": 8723992317937321000,
      "host_skipped": 7515790151550636000,
      "host_unreachable": 1865379895225030100,
      "output_size_bytes": 7964733890466916000,
      "payload_size_bytes": 2592876429800924000,
      "total_hosts": 7520422272859706000,
      "total_tasks": 5767911488264385000
    },
    "pipeline": "Ex vel quaerat sunt minima dolor.",
    "pipeline_execution_id": "Nulla ratione et omnis.",
    "pipeline_execution_number": "Ipsum qui totam cum.",
    "pipeline_name": "Et alias quis sint porro delectus est.",
    "pipeline_stage_id": "Pariatur porro earum sed.",
    "plugin_version": "Est laudantium.",
    "results_uuid": "Quam repellat omnis eos aut.",
    "trigger": {
      "Id molestias.": "Beatae aut asperiores nulla."
    }
  },
  "org": "y",
  "playbooks": "Ut eum.",
  "project": "4n"
}

Show data on org level

get

Get binary data generated by an org scoped ansible run.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: af
idstringRequired

The unique identifier for the data

Example: dc538c61-de48-4220-958c-5f3c4f983daa
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: ago
Responses
200

OK response.

application/json
string · binaryOptional
get/api/orgs/{org}/ansible/data/{id}
GET /api/orgs/{org}/ansible/data/{id} HTTP/1.1
Host: localhost:80
Harness-Account: ago
Accept: */*
binary

Get Ansible file on org level

get

Retrieve an org scoped playbook's YAML file from its configured git repository.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 41
Query parameters
resource_typestring · enumRequired

Type of ansible resource (playbook or inventory).

Example: playbookPossible values:
identifierstringRequired

Identifier of the playbook or inventory.

Example: my-playbook
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: p
Responses
200

OK response.

application/json
string · binaryOptional
get/api/orgs/{org}/ansible/file
GET /api/orgs/{org}/ansible/file?resource_type=playbook&identifier=my-playbook HTTP/1.1
Host: localhost:80
Harness-Account: p
Accept: */*
binary

List Ansible playbooks on org level

get

List all playbooks at org scope. Account and project scoped playbooks are not included.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: v07
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
searchTermstringOptional

Filter results by partial name match

Default: ""Example: mysta
sortstring · enumOptional

Sort order for results

Default: name,ASCExample: name,DESCPossible values:
tagsstring[]Optional

Filter results by tags (OR logic, exact match)

Example: ["Numquam veniam.","Illum ab.","Quo unde.","Nihil nemo sint quia totam et."]
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: f54
Responses
200

OK response.

application/json
get/api/orgs/{org}/ansible/playbook
GET /api/orgs/{org}/ansible/playbook HTTP/1.1
Host: localhost:80
Harness-Account: f54
Accept: */*
[
  {
    "account": "r",
    "ansible_galaxy": true,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Rem reprehenderit qui dolore quo qui similique.",
    "identifier": "Aspernatur repudiandae voluptate.",
    "name": "test playbook",
    "org": "7af",
    "project": "yt",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Sit dolores.",
      "Voluptas facilis in est sunt veniam repudiandae.",
      "Quas praesentium magni.",
      "Rerum cumque sunt."
    ],
    "updated": 1627686800,
    "vars": "Et iste maiores consectetur doloribus autem laboriosam."
  },
  {
    "account": "r",
    "ansible_galaxy": true,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Rem reprehenderit qui dolore quo qui similique.",
    "identifier": "Aspernatur repudiandae voluptate.",
    "name": "test playbook",
    "org": "7af",
    "project": "yt",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Sit dolores.",
      "Voluptas facilis in est sunt veniam repudiandae.",
      "Quas praesentium magni.",
      "Rerum cumque sunt."
    ],
    "updated": 1627686800,
    "vars": "Et iste maiores consectetur doloribus autem laboriosam."
  }
]

Create Ansible playbook on org level

post

Create a new playbook at org scope.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: u
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: lx
Body
ansible_galaxybooleanOptional

Install Ansible Galaxy dependencies

Default: falseExample: true
ansible_galaxy_requirements_filestringOptional

Path to Ansible Galaxy requirements file

Example: requirements.yml
descriptionstring · max: 1024Optional

Description documents the playbook purpose and usage

Example: Playbook for deploying web services to production
identifierstringRequired

The unique identifier for this playbook

Example: Aliquam expedita eius esse quos distinctio.
namestring · min: 1 · max: 1024Required

Name is the human readable name

Example: test playbook
repositorystringOptional

Repository is the name of the repository to use.

Example: my-repo
repository_branchstringOptional

Repository Branch in which the playbook should be accessed.

Example: main
repository_commitstringOptional

Repository Commit/Tag in which the playbook should be accessed.

Example: abc10ed
repository_connectorstringOptional

Repository Connector is the reference to the connector to use for this playbook.

Example: my-connector
repository_pathstringRequired

Repository Path is the path in which the playbook resides.

Default: ""Example: playbooks/
tagsstring[]Optional

Tags associated with the playbook

Example: ["Ad aut expedita est beatae ex dolor.","Quod dolores fugiat ipsa necessitatibus voluptatem sit.","Voluptas et."]
Responses
201

Created response.

application/json
accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 7
ansible_galaxybooleanOptional

Install Ansible Galaxy dependencies

Default: falseExample: true
ansible_galaxy_requirements_filestringOptional

Path to Ansible Galaxy requirements file

Example: requirements.yml
createdinteger · int64Required

Timestamp when the resource was created.

Example: 1627590400
descriptionstring · max: 1024Optional

Description documents the playbook purpose and usage

Example: Playbook for deploying web services to production
env_varsstringOptional

The environment vars in the playbook

Example: Occaecati sed pariatur nam.
identifierstringRequired

The unique identifier for this playbook

Example: Nam cumque et sunt unde.
namestring · min: 1 · max: 1024Required

Name is the human readable name

Example: test playbook
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: i9
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: hfj
repositorystringOptional

Repository is the name of the repository to use.

Example: my-repo
repository_branchstringOptional

Repository Branch in which the playbook should be accessed.

Example: main
repository_commitstringOptional

Repository Commit/Tag in which the playbook should be accessed.

Example: abc10ed
repository_connectorstringOptional

Repository Connector is the reference to the connector to use for this playbook.

Example: my-connector
repository_pathstringRequired

Repository Path is the path in which the playbook resides.

Default: ""Example: playbooks/
tagsstring[]Optional

Tags associated with the playbook

Example: ["Culpa ullam voluptas.","Unde placeat deleniti.","Incidunt est voluptas consequatur."]
updatedinteger · int64Required

Timestamp when the resource was last updated.

Example: 1627686800
varsstringOptional

The vars in the playbook

Example: Sunt occaecati eius doloremque consequatur impedit.
post/api/orgs/{org}/ansible/playbook
POST /api/orgs/{org}/ansible/playbook HTTP/1.1
Host: localhost:80
Harness-Account: lx
Content-Type: application/json
Accept: */*
Content-Length: 1641

{
  "ansible_galaxy": true,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "description": "Playbook for deploying web services to production",
  "env_vars": {
    "Fugiat modi architecto quia qui suscipit.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    "Fugit enim iure non est possimus.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  },
  "identifier": "Quod provident distinctio ea quos vero laboriosam.",
  "name": "test playbook",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Voluptatem quidem qui libero vero qui.",
    "Hic eum vero facilis ab."
  ],
  "vars": {
    "Fugiat aliquid.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    "Ipsam est sunt.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    "Perspiciatis sit placeat consequatur eum ratione at.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  }
}
{
  "account": "b56",
  "ansible_galaxy": true,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "created": 1627590400,
  "description": "Playbook for deploying web services to production",
  "env_vars": "Nostrum eos nihil et.",
  "identifier": "Velit unde aspernatur ex doloribus.",
  "name": "test playbook",
  "org": "r",
  "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"
          }
        ],
        "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"
          }
        ],
        "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"
          }
        ],
        "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"
  },
  "project": "2",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Veritatis eaque corporis nesciunt distinctio.",
    "Dolorum qui quisquam fugit.",
    "Ut corrupti."
  ],
  "updated": 1627686800,
  "vars": "Quo ad numquam maxime quod."
}

Show Ansible playbook on org level

get

Show an individual org scoped playbook.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: ta7
identifierstringRequired

The unique identifier for this playbook

Example: Non maxime sapiente.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: ywv
Responses
200

OK response.

application/json
accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: c77
ansible_galaxybooleanOptional

Install Ansible Galaxy dependencies

Default: falseExample: false
ansible_galaxy_requirements_filestringOptional

Path to Ansible Galaxy requirements file

Example: requirements.yml
createdinteger · int64Required

Timestamp when the resource was created.

Example: 1627590400
descriptionstring · max: 1024Optional

Description documents the playbook purpose and usage

Example: Playbook for deploying web services to production
env_varsstringOptional

The environment vars in the playbook

Example: Corrupti et veniam corporis omnis.
identifierstringRequired

The unique identifier for this playbook

Example: Aut est ipsa non consequatur voluptatem.
namestring · min: 1 · max: 1024Required

Name is the human readable name

Example: test playbook
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: g
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: a5j
repositorystringOptional

Repository is the name of the repository to use.

Example: my-repo
repository_branchstringOptional

Repository Branch in which the playbook should be accessed.

Example: main
repository_commitstringOptional

Repository Commit/Tag in which the playbook should be accessed.

Example: abc10ed
repository_connectorstringOptional

Repository Connector is the reference to the connector to use for this playbook.

Example: my-connector
repository_pathstringRequired

Repository Path is the path in which the playbook resides.

Default: ""Example: playbooks/
tagsstring[]Optional

Tags associated with the playbook

Example: ["Laborum dignissimos totam.","Deserunt illo sunt qui et."]
updatedinteger · int64Required

Timestamp when the resource was last updated.

Example: 1627686800
varsstringOptional

The vars in the playbook

Example: Omnis impedit dolor reprehenderit ex.
get/api/orgs/{org}/ansible/playbook/{identifier}
GET /api/orgs/{org}/ansible/playbook/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: ywv
Accept: */*
{
  "account": "d1d",
  "ansible_galaxy": true,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "created": 1627590400,
  "description": "Playbook for deploying web services to production",
  "env_vars": "Blanditiis iusto non aperiam modi ex quidem.",
  "identifier": "Nostrum omnis.",
  "name": "test playbook",
  "org": "h6x",
  "project": "7up",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Cupiditate eum voluptatem quo unde aut.",
    "Consequuntur illo et voluptate deleniti.",
    "Incidunt consequatur harum debitis.",
    "Id vero inventore atque non maiores labore."
  ],
  "updated": 1627686800,
  "vars": "Occaecati vel ad repudiandae enim a dicta."
}

Update Ansible playbook on org level

put

Update an existing org scoped playbook.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 7b
identifierstringRequired

The unique identifier for this playbook

Example: Itaque sed.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: t0
Body
ansible_galaxybooleanOptional

Install Ansible Galaxy dependencies

Default: falseExample: true
ansible_galaxy_requirements_filestringOptional

Path to Ansible Galaxy requirements file

Example: requirements.yml
descriptionstring · max: 1024Optional

Description documents the playbook purpose and usage

Example: Playbook for deploying web services to production
namestring · min: 1 · max: 1024Required

Name is the human readable name

Example: test playbook
repositorystringOptional

Repository is the name of the repository to use.

Example: my-repo
repository_branchstringOptional

Repository Branch in which the playbook should be accessed.

Example: main
repository_commitstringOptional

Repository Commit/Tag in which the playbook should be accessed.

Example: abc10ed
repository_connectorstringOptional

Repository Connector is the reference to the connector to use for this playbook.

Example: my-connector
repository_pathstringRequired

Repository Path is the path in which the playbook resides.

Default: ""Example: playbooks/
tagsstring[]Optional

Tags associated with the playbook

Example: ["Blanditiis quod quisquam enim.","Quas est labore.","Doloribus vel eos velit.","Explicabo ad aut."]
Responses
200

OK response.

application/json
put/api/orgs/{org}/ansible/playbook/{identifier}
PUT /api/orgs/{org}/ansible/playbook/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: t0
Content-Type: application/json
Accept: */*
Content-Length: 1153

{
  "ansible_galaxy": false,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "description": "Playbook for deploying web services to production",
  "env_vars": {
    "Et sit neque laborum.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  },
  "name": "test playbook",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Pariatur at aut ratione odio.",
    "Recusandae occaecati.",
    "Voluptate voluptatum.",
    "Minus autem sunt culpa."
  ],
  "vars": {
    "Laborum vel quaerat rerum delectus.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    "Molestiae temporibus cupiditate vel sint.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  }
}
{
  "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"
          }
        ],
        "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"
          }
        ],
        "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"
          }
        ],
        "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"
  }
}

Delete Ansible playbook on org level

delete

Delete an existing org scoped playbook.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: bej
identifierstringRequired

The unique identifier for this playbook

Example: Corporis esse cum.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: tq0
Responses
200

OK response.

No content

delete/api/orgs/{org}/ansible/playbook/{identifier}
DELETE /api/orgs/{org}/ansible/playbook/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: tq0
Accept: */*

No content

Show Ansible playbook vars on org level

get

Show an individual org scoped playbook vars.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: s11
identifierstringRequired

Playbook identifier

Example: Et et sed aspernatur recusandae.
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 61e
Responses
200

OK response.

application/json
get/api/orgs/{org}/ansible/playbook/{identifier}/vars
GET /api/orgs/{org}/ansible/playbook/{identifier}/vars HTTP/1.1
Host: localhost:80
Harness-Account: 61e
Accept: */*
{
  "env_vars": [
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    },
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    },
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    }
  ],
  "vars": [
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    },
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    },
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    }
  ]
}

Create dynamic Ansible playbook variable on org level

post

Create a new dynamic variable on an org scoped playbook.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 0
identifierstringRequired

The unique identifier for this playbook

Example: test_playbook
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: nrg
Body
Responses
201

Created response.

No content

post/api/orgs/{org}/ansible/playbook/{identifier}/vars
POST /api/orgs/{org}/ansible/playbook/{identifier}/vars HTTP/1.1
Host: localhost:80
Harness-Account: nrg
Content-Type: application/json
Accept: */*
Content-Length: 1919

{
  "env_vars": [
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    }
  ],
  "vars": [
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    }
  ]
}

No content

Update dynamic Ansible playbook variable on org level

put

Update an existing dynamic variable on an org scoped playbook.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: b
identifierstringRequired

The unique identifier for this playbook

Example: test_playbook
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 2y
Body
Responses
200

OK response.

No content

put/api/orgs/{org}/ansible/playbook/{identifier}/vars
PUT /api/orgs/{org}/ansible/playbook/{identifier}/vars HTTP/1.1
Host: localhost:80
Harness-Account: 2y
Content-Type: application/json
Accept: */*
Content-Length: 1445

{
  "env_vars": [
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    }
  ],
  "vars": [
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    }
  ]
}

No content

Delete dynamic Ansible playbook variable on org level

delete

Delete a dynamic variable from an org scoped playbook.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: f
identifierstringRequired

The unique identifier for this playbook

Example: test_playbook
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: et
Body
varsstring[]RequiredExample: ["Veniam dolore officiis aut.","Rerum rem explicabo vitae minus praesentium.","Dolorum voluptas rerum ad est eos et."]
Responses
200

OK response.

No content

delete/api/orgs/{org}/ansible/playbook/{identifier}/vars
DELETE /api/orgs/{org}/ansible/playbook/{identifier}/vars HTTP/1.1
Host: localhost:80
Harness-Account: et
Content-Type: application/json
Accept: */*
Content-Length: 92

{
  "vars": [
    "Architecto non voluptas.",
    "Modi facilis doloribus aspernatur consequatur velit."
  ]
}

No content

List Ansible Activities

get

List all activities.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: rq
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: fj8
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
sortstring · enumOptional

Sort order for results

Default: created,DESCExample: created,ASCPossible values:
InventorySearchTermstringOptional

Search term to filter by inventory identifier

Example: inventory_1
PlaybookSearchTermstringOptional

Search term to filter by playbook identifier

Example: playbook_1
activity_typestringOptional

Activity type filter

Example: Voluptas quos.
statusstringOptional

Activity status filter

Example: Ut voluptas.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 30
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/ansible/activities
GET /api/orgs/{org}/projects/{project}/ansible/activities HTTP/1.1
Host: localhost:80
Harness-Account: 30
Accept: */*
[
  {
    "account": "mld",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Sapiente dolorem.",
    "metadata": {
      "activity_status": "Dolorem amet quae.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Quia aut eum dignissimos itaque.",
      "git_commit_message": "Aspernatur assumenda eius sit vitae quos dolorem.",
      "git_commit_sha": "Facilis et harum.",
      "git_repo": "Iure reprehenderit.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 3729912682196842500,
        "host_changed": 7326503586878806000,
        "host_failed": 510844048246640640,
        "host_ok": 7033055310389248000,
        "host_skipped": 8298202262197766000,
        "host_unreachable": 3136096962125600300,
        "output_size_bytes": 5580013020588243000,
        "payload_size_bytes": 5024210113655448000,
        "total_hosts": 3289931238796667000,
        "total_tasks": 8463213749394180000
      },
      "pipeline": "Sint consequuntur libero commodi veritatis atque.",
      "pipeline_execution_id": "Omnis autem ullam quas et.",
      "pipeline_execution_number": "Rem cumque molestias assumenda.",
      "pipeline_name": "Et accusamus veniam libero.",
      "pipeline_stage_id": "Repellat soluta.",
      "plugin_version": "Amet totam laboriosam voluptas.",
      "results_uuid": "Officia necessitatibus quis provident consequatur.",
      "trigger": {
        "Alias quis.": "Quaerat quasi.",
        "Autem aut.": "Quis ipsa est.",
        "Qui et.": "Molestiae autem nisi."
      }
    },
    "org": "12",
    "playbooks": "Qui est.",
    "project": "0"
  },
  {
    "account": "mld",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Sapiente dolorem.",
    "metadata": {
      "activity_status": "Dolorem amet quae.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Quia aut eum dignissimos itaque.",
      "git_commit_message": "Aspernatur assumenda eius sit vitae quos dolorem.",
      "git_commit_sha": "Facilis et harum.",
      "git_repo": "Iure reprehenderit.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 3729912682196842500,
        "host_changed": 7326503586878806000,
        "host_failed": 510844048246640640,
        "host_ok": 7033055310389248000,
        "host_skipped": 8298202262197766000,
        "host_unreachable": 3136096962125600300,
        "output_size_bytes": 5580013020588243000,
        "payload_size_bytes": 5024210113655448000,
        "total_hosts": 3289931238796667000,
        "total_tasks": 8463213749394180000
      },
      "pipeline": "Sint consequuntur libero commodi veritatis atque.",
      "pipeline_execution_id": "Omnis autem ullam quas et.",
      "pipeline_execution_number": "Rem cumque molestias assumenda.",
      "pipeline_name": "Et accusamus veniam libero.",
      "pipeline_stage_id": "Repellat soluta.",
      "plugin_version": "Amet totam laboriosam voluptas.",
      "results_uuid": "Officia necessitatibus quis provident consequatur.",
      "trigger": {
        "Alias quis.": "Quaerat quasi.",
        "Autem aut.": "Quis ipsa est.",
        "Qui et.": "Molestiae autem nisi."
      }
    },
    "org": "12",
    "playbooks": "Qui est.",
    "project": "0"
  },
  {
    "account": "mld",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Sapiente dolorem.",
    "metadata": {
      "activity_status": "Dolorem amet quae.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Quia aut eum dignissimos itaque.",
      "git_commit_message": "Aspernatur assumenda eius sit vitae quos dolorem.",
      "git_commit_sha": "Facilis et harum.",
      "git_repo": "Iure reprehenderit.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 3729912682196842500,
        "host_changed": 7326503586878806000,
        "host_failed": 510844048246640640,
        "host_ok": 7033055310389248000,
        "host_skipped": 8298202262197766000,
        "host_unreachable": 3136096962125600300,
        "output_size_bytes": 5580013020588243000,
        "payload_size_bytes": 5024210113655448000,
        "total_hosts": 3289931238796667000,
        "total_tasks": 8463213749394180000
      },
      "pipeline": "Sint consequuntur libero commodi veritatis atque.",
      "pipeline_execution_id": "Omnis autem ullam quas et.",
      "pipeline_execution_number": "Rem cumque molestias assumenda.",
      "pipeline_name": "Et accusamus veniam libero.",
      "pipeline_stage_id": "Repellat soluta.",
      "plugin_version": "Amet totam laboriosam voluptas.",
      "results_uuid": "Officia necessitatibus quis provident consequatur.",
      "trigger": {
        "Alias quis.": "Quaerat quasi.",
        "Autem aut.": "Quis ipsa est.",
        "Qui et.": "Molestiae autem nisi."
      }
    },
    "org": "12",
    "playbooks": "Qui est.",
    "project": "0"
  }
]

Show ansible activity

get

Show an individual ansible activity.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: e
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 3
idstringRequired

The unique ID for this activity

Example: Asperiores quia ipsum molestiae laborum qui in.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: x
Responses
200

OK response.

application/json
accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: d
createdinteger · int64Required

Timestamp when the resource was created.

Example: 1627590400
event_typestring · enumRequired

The type of event that occurred

Example: activity-executionPossible values:
idstringRequired

The unique identifier for this activity

Example: dc538c61-de48-4220-958c-5f3c4f983daa
inventoriesstringRequired

Inventories associated with this event

Example: Et voluptatem tempore corporis et.
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: c1
playbooksstringRequired

Playbooks associated with this event

Example: Tenetur et rerum eum perferendis aperiam quos.
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: bc
get/api/orgs/{org}/projects/{project}/ansible/activities/{id}
GET /api/orgs/{org}/projects/{project}/ansible/activities/{id} HTTP/1.1
Host: localhost:80
Harness-Account: x
Accept: */*
{
  "account": "cg",
  "created": 1627590400,
  "event_type": "activity-execution",
  "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
  "inventories": "Dicta eligendi sit explicabo.",
  "metadata": {
    "activity_status": "Asperiores quod molestiae consequatur vitae.",
    "filters": "tags=deploy skip-tags=slow limit=web",
    "git_branch": "Voluptas animi dolor dolorem laborum.",
    "git_commit_message": "Dolor facere.",
    "git_commit_sha": "Voluptatem quia earum voluptatem quas in.",
    "git_repo": "Dolores nobis.",
    "metrics": {
      "circuit_breaker_triggered": false,
      "duration_ms": 4956144492920646000,
      "host_changed": 7991066862074085000,
      "host_failed": 7286501368895138000,
      "host_ok": 8723992317937321000,
      "host_skipped": 7515790151550636000,
      "host_unreachable": 1865379895225030100,
      "output_size_bytes": 7964733890466916000,
      "payload_size_bytes": 2592876429800924000,
      "total_hosts": 7520422272859706000,
      "total_tasks": 5767911488264385000
    },
    "pipeline": "Ex vel quaerat sunt minima dolor.",
    "pipeline_execution_id": "Nulla ratione et omnis.",
    "pipeline_execution_number": "Ipsum qui totam cum.",
    "pipeline_name": "Et alias quis sint porro delectus est.",
    "pipeline_stage_id": "Pariatur porro earum sed.",
    "plugin_version": "Est laudantium.",
    "results_uuid": "Quam repellat omnis eos aut.",
    "trigger": {
      "Id molestias.": "Beatae aut asperiores nulla."
    }
  },
  "org": "20",
  "playbooks": "Sit qui quae saepe molestias dolores est.",
  "project": "xp"
}

List data

get

List all stored data for a inventory or playbook.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 50
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 4u8
Query parameters
inventory_search_termstringOptional

Inventory search term

Example: Rem nihil ad.
playbook_search_termstringOptional

Playbook search term

Example: Accusantium quia dolores harum laborum aut.
pipeline_execution_idstringOptional

Filter by pipeline execution ID

Example: Quia nam est.
pipeline_stage_idstringOptional

Filter by pipeline execution stage ID

Example: Et molestiae.
data_typestringOptional

Filter by data type

Example: Dolorem hic fugit fuga repellat quasi.
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 999
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/ansible/data
GET /api/orgs/{org}/projects/{project}/ansible/data HTTP/1.1
Host: localhost:80
Harness-Account: 999
Accept: */*
[
  {
    "account": "uwb",
    "created": 58238389623161304,
    "data_type": "task_results",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Voluptatem voluptas.",
    "org": "y",
    "pipeline_execution_id": "Est cupiditate et quia in nisi.",
    "pipeline_id": "Est vero dolore et.",
    "pipeline_stage_id": "Molestiae quia.",
    "playbooks": "Eos ea eaque consequuntur animi placeat qui.",
    "project": "d7v",
    "stage_id": "Laboriosam assumenda modi quisquam laboriosam facere."
  },
  {
    "account": "uwb",
    "created": 58238389623161304,
    "data_type": "task_results",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Voluptatem voluptas.",
    "org": "y",
    "pipeline_execution_id": "Est cupiditate et quia in nisi.",
    "pipeline_id": "Est vero dolore et.",
    "pipeline_stage_id": "Molestiae quia.",
    "playbooks": "Eos ea eaque consequuntur animi placeat qui.",
    "project": "d7v",
    "stage_id": "Laboriosam assumenda modi quisquam laboriosam facere."
  }
]

Create data

post

Store binary data generated by ansible.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: un
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: mg
Query parameters
pipeline_idstringOptional

The unique identifier for the associated pipeline

Example: Est reiciendis consequatur sunt quae.
stage_idstringOptional

The unique identifier for a stage

Example: Repudiandae rerum vero earum incidunt rerum.
pipeline_execution_idstringOptional

The unique identifier for the associated pipeline execution

Example: Pariatur aperiam.
pipeline_stage_idstringOptional

The unique identifier for the associated pipeline execution stage

Example: Id excepturi ullam nostrum.
data_typestring · enumRequired

Type of data stored

Example: task_resultsPossible values:
inventoriesstringRequired

Inventories associated with this event

Example: Accusantium placeat id totam ratione dolore.
playbooksstringRequired

Playbooks associated with this event

Example: Et sequi sit sed harum cupiditate.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: y0
Content-Lengthinteger · int64Optional

Size in bytes of the data.

Example: 2824900171263843000
Responses
200

OK response.

application/json
idstringRequired

The unique identifier for the data

Example: dc538c61-de48-4220-958c-5f3c4f983daa
post/api/orgs/{org}/projects/{project}/ansible/data
POST /api/orgs/{org}/projects/{project}/ansible/data?data_type=task_results&inventories=Accusantium+placeat+id+totam+ratione+dolore.&playbooks=Et+sequi+sit+sed+harum+cupiditate. HTTP/1.1
Host: localhost:80
Harness-Account: y0
Accept: */*
{
  "id": "dc538c61-de48-4220-958c-5f3c4f983daa"
}

Show data

get

Get binary data generated by the provisioner, such as plans and state files.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: n
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 8
idstringRequired

The unique identifier for the data

Example: dc538c61-de48-4220-958c-5f3c4f983daa
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: zn
Responses
200

OK response.

application/json
string · binaryOptional
get/api/orgs/{org}/projects/{project}/ansible/data/{id}
GET /api/orgs/{org}/projects/{project}/ansible/data/{id} HTTP/1.1
Host: localhost:80
Harness-Account: zn
Accept: */*
binary

Send event

post
Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 4t
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: p9
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 4s
Body
event_typestring · enumRequired

The type of event that occurred

Example: activity-executionPossible values:
inventoriesstringRequired

Inventories associated with this event

Example: Pariatur ullam modi voluptate assumenda quisquam.
playbooksstringRequired

Playbooks associated with this event

Example: Itaque id praesentium explicabo.
Responses
200

OK response.

No content

post/api/orgs/{org}/projects/{project}/ansible/events
POST /api/orgs/{org}/projects/{project}/ansible/events HTTP/1.1
Host: localhost:80
Harness-Account: 4s
Content-Type: application/json
Accept: */*
Content-Length: 1424

{
  "event_type": "activity-execution",
  "inventories": "Corrupti excepturi dolorum possimus.",
  "metadata": {
    "activity_status": "Est omnis voluptas.",
    "filters": "tags=deploy skip-tags=slow limit=web",
    "git_branch": "Et id.",
    "git_commit_message": "Sed est iste ea.",
    "git_commit_sha": "Aut aut et facilis delectus recusandae pariatur.",
    "git_repo": "Asperiores aut eum quis quia quos quaerat.",
    "metrics": {
      "circuit_breaker_triggered": false,
      "duration_ms": 7390561685357238000,
      "host_changed": 8467723547224066000,
      "host_failed": 628267883614234200,
      "host_ok": 3028832422680946000,
      "host_skipped": 7722797242178057000,
      "host_unreachable": 6446899952438172000,
      "output_size_bytes": 5696886528735868000,
      "payload_size_bytes": 7462415569247186000,
      "total_hosts": 4895565323984840000,
      "total_tasks": 4597798843542031400
    },
    "pipeline": "Vero ipsam molestiae non mollitia ea.",
    "pipeline_execution_id": "Nihil recusandae rerum recusandae ea qui.",
    "pipeline_execution_number": "Dolore voluptatibus.",
    "pipeline_name": "Voluptatibus tempore aut facere facere et magnam.",
    "pipeline_stage_id": "Repellat quisquam dolorem sed magni.",
    "plugin_version": "Rerum ut in aliquam eaque.",
    "results_uuid": "Dolores minima expedita sed architecto eligendi.",
    "trigger": {
      "Et aliquid autem adipisci maiores.": "Inventore reprehenderit harum illum cupiditate quis illo.",
      "Molestias voluptatem quo numquam eos.": "Sunt et.",
      "Omnis ipsa.": "Qui animi eum porro et a non."
    }
  },
  "playbooks": "Dolorem corrupti."
}

No content

Get Ansible file

get

Retrieve a playbook or plugin inventory YAML file from its configured git repository.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 4e
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: v
Query parameters
resource_typestring · enumRequired

Type of ansible resource (playbook or inventory).

Example: playbookPossible values:
identifierstringRequired

Identifier of the playbook or inventory.

Example: my-playbook
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 4v4
Responses
200

OK response.

application/json
string · binaryOptional
get/api/orgs/{org}/projects/{project}/ansible/file
GET /api/orgs/{org}/projects/{project}/ansible/file?resource_type=playbook&identifier=my-playbook HTTP/1.1
Host: localhost:80
Harness-Account: 4v4
Accept: */*
binary

List Ansible Hosts

get

List all hosts across all inventories.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: fz
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: bux
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
sortstring · enumOptional

Sort order for results

Default: host_address,ASCExample: updated,DESCPossible values:
searchTermstringOptional

Filter results by partial host address match

Default: ""Example: web-server
inventorystringOptional

Filter results by inventory membership

Default: ""Example: production-inventory
statusstringOptional

Filter results by last activity status

Default: ""Example: ok
startTimeinteger · int64Optional

Filter results by last activity created time (Unix timestamp in milliseconds) - inclusive start of time range

Example: 1627590400000
endTimeinteger · int64Optional

Filter results by last activity created time (Unix timestamp in milliseconds) - inclusive end of time range

Example: 1630268800000
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: plp
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/ansible/hosts
GET /api/orgs/{org}/projects/{project}/ansible/hosts HTTP/1.1
Host: localhost:80
Harness-Account: plp
Accept: */*
[
  {
    "created": 1627590400,
    "host_address": "web-server-1.example.com",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": [
      "inventory-1",
      "inventory-2"
    ],
    "last_activity": {
      "created": 1627590400,
      "playbooks": [
        "deploy.yml"
      ],
      "status": "ok"
    },
    "updated": 1627590400
  },
  {
    "created": 1627590400,
    "host_address": "web-server-1.example.com",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": [
      "inventory-1",
      "inventory-2"
    ],
    "last_activity": {
      "created": 1627590400,
      "playbooks": [
        "deploy.yml"
      ],
      "status": "ok"
    },
    "updated": 1627590400
  },
  {
    "created": 1627590400,
    "host_address": "web-server-1.example.com",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": [
      "inventory-1",
      "inventory-2"
    ],
    "last_activity": {
      "created": 1627590400,
      "playbooks": [
        "deploy.yml"
      ],
      "status": "ok"
    },
    "updated": 1627590400
  },
  {
    "created": 1627590400,
    "host_address": "web-server-1.example.com",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": [
      "inventory-1",
      "inventory-2"
    ],
    "last_activity": {
      "created": 1627590400,
      "playbooks": [
        "deploy.yml"
      ],
      "status": "ok"
    },
    "updated": 1627590400
  }
]

Show Ansible Host

get

Get details for a single host.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: rhk
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: lk
idstringRequired

The unique identifier for this host

Example: dc538c61-de48-4220-958c-5f3c4f983daa
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: r
Responses
200

OK response.

application/json
createdinteger · int64Required

Timestamp when the resource was created

Example: 1627590400
host_addressstringRequired

The address of the host (hostname or IP)

Example: web-server-1.example.com
idstringRequired

The unique identifier for this host

Example: dc538c61-de48-4220-958c-5f3c4f983daa
inventoriesstring[]Optional

List of inventory identifiers this host belongs to

Example: ["inventory-1","inventory-2"]
updatedinteger · int64Required

Timestamp when the resource was last updated

Example: 1627590400
get/api/orgs/{org}/projects/{project}/ansible/hosts/{id}
GET /api/orgs/{org}/projects/{project}/ansible/hosts/{id} HTTP/1.1
Host: localhost:80
Harness-Account: r
Accept: */*
{
  "created": 1627590400,
  "host_address": "web-server-1.example.com",
  "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
  "inventories": [
    "inventory-1",
    "inventory-2"
  ],
  "last_activity": {
    "created": 1627590400,
    "playbooks": [
      "deploy.yml"
    ],
    "status": "ok"
  },
  "updated": 1627590400
}

List Ansible Host Activities

get

List all activities for a specific host.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 2
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: t5k
idstringRequired

The unique identifier for this host

Example: dc538c61-de48-4220-958c-5f3c4f983daa
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
sortstring · enumOptional

Sort order for results

Default: created,DESCExample: created,DESCPossible values:
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 3m
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/ansible/hosts/{id}/activities
GET /api/orgs/{org}/projects/{project}/ansible/hosts/{id}/activities HTTP/1.1
Host: localhost:80
Harness-Account: 3m
Accept: */*
[
  {
    "account": "42p",
    "created": 1627590400,
    "data": "Dolorum quia incidunt.",
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Delectus deleniti animi libero dolore.",
    "metadata": {
      "activity_status": "Dolorem amet quae.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Quia aut eum dignissimos itaque.",
      "git_commit_message": "Aspernatur assumenda eius sit vitae quos dolorem.",
      "git_commit_sha": "Facilis et harum.",
      "git_repo": "Iure reprehenderit.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 3729912682196842500,
        "host_changed": 7326503586878806000,
        "host_failed": 510844048246640640,
        "host_ok": 7033055310389248000,
        "host_skipped": 8298202262197766000,
        "host_unreachable": 3136096962125600300,
        "output_size_bytes": 5580013020588243000,
        "payload_size_bytes": 5024210113655448000,
        "total_hosts": 3289931238796667000,
        "total_tasks": 8463213749394180000
      },
      "pipeline": "Sint consequuntur libero commodi veritatis atque.",
      "pipeline_execution_id": "Omnis autem ullam quas et.",
      "pipeline_execution_number": "Rem cumque molestias assumenda.",
      "pipeline_name": "Et accusamus veniam libero.",
      "pipeline_stage_id": "Repellat soluta.",
      "plugin_version": "Amet totam laboriosam voluptas.",
      "results_uuid": "Officia necessitatibus quis provident consequatur.",
      "trigger": {
        "Alias quis.": "Quaerat quasi.",
        "Autem aut.": "Quis ipsa est.",
        "Qui et.": "Molestiae autem nisi."
      }
    },
    "org": "5z",
    "playbooks": "Sint voluptatem sunt aliquam rem.",
    "project": "t3",
    "status": "ok"
  },
  {
    "account": "42p",
    "created": 1627590400,
    "data": "Dolorum quia incidunt.",
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Delectus deleniti animi libero dolore.",
    "metadata": {
      "activity_status": "Dolorem amet quae.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Quia aut eum dignissimos itaque.",
      "git_commit_message": "Aspernatur assumenda eius sit vitae quos dolorem.",
      "git_commit_sha": "Facilis et harum.",
      "git_repo": "Iure reprehenderit.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 3729912682196842500,
        "host_changed": 7326503586878806000,
        "host_failed": 510844048246640640,
        "host_ok": 7033055310389248000,
        "host_skipped": 8298202262197766000,
        "host_unreachable": 3136096962125600300,
        "output_size_bytes": 5580013020588243000,
        "payload_size_bytes": 5024210113655448000,
        "total_hosts": 3289931238796667000,
        "total_tasks": 8463213749394180000
      },
      "pipeline": "Sint consequuntur libero commodi veritatis atque.",
      "pipeline_execution_id": "Omnis autem ullam quas et.",
      "pipeline_execution_number": "Rem cumque molestias assumenda.",
      "pipeline_name": "Et accusamus veniam libero.",
      "pipeline_stage_id": "Repellat soluta.",
      "plugin_version": "Amet totam laboriosam voluptas.",
      "results_uuid": "Officia necessitatibus quis provident consequatur.",
      "trigger": {
        "Alias quis.": "Quaerat quasi.",
        "Autem aut.": "Quis ipsa est.",
        "Qui et.": "Molestiae autem nisi."
      }
    },
    "org": "5z",
    "playbooks": "Sint voluptatem sunt aliquam rem.",
    "project": "t3",
    "status": "ok"
  }
]

List Inventories For Host

get

List all inventories that a specific host belongs to.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: x
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 8
idstringRequired

The unique identifier for this host

Example: dc538c61-de48-4220-958c-5f3c4f983daa
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: p4y
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/ansible/hosts/{id}/inventories
GET /api/orgs/{org}/projects/{project}/ansible/hosts/{id}/inventories HTTP/1.1
Host: localhost:80
Harness-Account: p4y
Accept: */*
[
  {
    "account": "zd",
    "created": 1627590400,
    "description": "Production infrastructure inventory",
    "identifier": "test_inventory",
    "name": "test inventory",
    "org": "2w0",
    "project": "u",
    "tags": [
      "Molestias autem cum sint.",
      "Eum omnis."
    ],
    "type": "remote",
    "updated": 1627686800
  },
  {
    "account": "zd",
    "created": 1627590400,
    "description": "Production infrastructure inventory",
    "identifier": "test_inventory",
    "name": "test inventory",
    "org": "2w0",
    "project": "u",
    "tags": [
      "Molestias autem cum sint.",
      "Eum omnis."
    ],
    "type": "remote",
    "updated": 1627686800
  }
]

Get Ansible Host Stats

get

Get aggregated statistics for a specific host.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 9
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: a
idstringRequired

The unique identifier for this host

Example: dc538c61-de48-4220-958c-5f3c4f983daa
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 1z
Responses
200

OK response.

application/json
avg_tasks_last_5_runsnumber · doubleRequired

Average number of tasks executed across the last 5 runs

Example: 12.4
failures_7dinteger · int64Required

Number of failed runs (status failures or unreachable) in the last 7 days

Example: 2
last_playbookstring[]Optional

Playbooks from the most recent execution against this host

Example: ["deploy.yml"]
last_playbook_atinteger · int64Optional

Timestamp (ms) of the most recent execution against this host

Example: 1627590400000
success_rate_30dnumber · doubleRequired

Percentage of successful runs in the last 30 days (0-100)

Example: 95.5
total_runs_30dinteger · int64Required

Total number of runs in the last 30 days

Example: 42
get/api/orgs/{org}/projects/{project}/ansible/hosts/{id}/stats
GET /api/orgs/{org}/projects/{project}/ansible/hosts/{id}/stats HTTP/1.1
Host: localhost:80
Harness-Account: 1z
Accept: */*
{
  "avg_tasks_last_5_runs": 12.4,
  "failures_7d": 2,
  "last_playbook": [
    "deploy.yml"
  ],
  "last_playbook_at": 1627590400000,
  "success_rate_30d": 95.5,
  "total_runs_30d": 42
}

Export Ansible Hosts to CSV

get

Export all filtered hosts to CSV format. Includes all matching hosts (not paginated).

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: hli
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: e1
Query parameters
searchTermstringOptional

Search term to filter hosts by name

Example: Maxime rem odio aspernatur quidem.
inventorystringOptional

Filter results by inventory identifier

Example: Voluptatem harum ad similique.
statusstring · enumOptional

Filter results by host status (based on most recent activity)

Example: rescuedPossible values:
startTimeinteger · int64Optional

Filter results by last activity created time (Unix timestamp in milliseconds) - inclusive start of time range

Example: 1620268800000
endTimeinteger · int64Optional

Filter results by last activity created time (Unix timestamp in milliseconds) - inclusive end of time range

Example: 1630268800000
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 5w0
Responses
200

OK response.

text/csv
string · binaryOptionalExample: [85,116,32,116,101,109,112,111,114,97,46]
get/api/orgs/{org}/projects/{project}/ansible/hosts/export
GET /api/orgs/{org}/projects/{project}/ansible/hosts/export HTTP/1.1
Host: localhost:80
Harness-Account: 5w0
Accept: */*
[
  79,
  109,
  110,
  105,
  115,
  32,
  109,
  111,
  108,
  108,
  105,
  116,
  105,
  97,
  46
]

Get Ansible Hosts Summary

get

Get aggregated host counts grouped by the latest activity status, scoped to an account/org/project.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: c
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: pos
Query parameters
searchTermstringOptional

Filter results by partial host address match

Default: ""Example: web-server
inventorystringOptional

Filter results by inventory membership

Default: ""Example: production-inventory
startTimeinteger · int64Optional

Filter results by latest activity created time (Unix timestamp in milliseconds) - inclusive start of time range

Example: 1627590400000
endTimeinteger · int64Optional

Filter results by latest activity created time (Unix timestamp in milliseconds) - inclusive end of time range

Example: 1630268800000
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: q8k
Responses
200

OK response.

application/json
changedinteger · int64Required

Number of hosts whose latest activity status is 'changed'

Example: 4
failuresinteger · int64Required

Number of hosts whose latest activity status is 'failures'

Example: 0
ignoredinteger · int64Required

Number of hosts whose latest activity status is 'ignored'

Example: 0
okinteger · int64Required

Number of hosts whose latest activity status is 'ok'

Example: 3
rescuedinteger · int64Required

Number of hosts whose latest activity status is 'rescued'

Example: 0
skippedinteger · int64Required

Number of hosts whose latest activity status is 'skipped'

Example: 0
totalinteger · int64Required

Total number of hosts matching the filters

Example: 7
unknowninteger · int64Required

Number of hosts with no activity rows (no derivable latest status)

Example: 0
unreachableinteger · int64Required

Number of hosts whose latest activity status is 'unreachable'

Example: 0
get/api/orgs/{org}/projects/{project}/ansible/hosts/summary
GET /api/orgs/{org}/projects/{project}/ansible/hosts/summary HTTP/1.1
Host: localhost:80
Harness-Account: q8k
Accept: */*
{
  "changed": 4,
  "failures": 0,
  "ignored": 0,
  "ok": 3,
  "rescued": 0,
  "skipped": 0,
  "total": 7,
  "unknown": 0,
  "unreachable": 0
}

List Ansible inventory

get

List all inventories.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: xsh
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: a7b
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
searchTermstringOptional

Filter results by partial name match

Default: ""Example: mysta
sortstring · enumOptional

Sort order for results

Default: name,ASCExample: updated,ASCPossible values:
includeDetailsbooleanOptional

Include inventory details

Default: falseExample: false
tagsstring[]Optional

Filter results by tags (OR logic, exact match)

Example: ["Aut quod expedita.","Consequatur officia sequi temporibus.","Rerum harum explicabo voluptatibus ut.","Fugit tempora."]
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: tm
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/ansible/inventory
GET /api/orgs/{org}/projects/{project}/ansible/inventory HTTP/1.1
Host: localhost:80
Harness-Account: tm
Accept: */*
[
  {
    "account": "vja",
    "created": 1627590400,
    "data": "{ \"hosts\": { \"host1.example.com\": null, \"host2.example.com\": null }}",
    "description": "Production infrastructure inventory",
    "identifier": "test_inventory",
    "name": "test inventory",
    "org": "ff",
    "project": "6n",
    "tags": [
      "Voluptatem a porro cum.",
      "Aliquam adipisci et aut molestias omnis iste.",
      "Modi vel dicta velit."
    ],
    "type": "remote",
    "updated": 1627686800
  },
  {
    "account": "vja",
    "created": 1627590400,
    "data": "{ \"hosts\": { \"host1.example.com\": null, \"host2.example.com\": null }}",
    "description": "Production infrastructure inventory",
    "identifier": "test_inventory",
    "name": "test inventory",
    "org": "ff",
    "project": "6n",
    "tags": [
      "Voluptatem a porro cum.",
      "Aliquam adipisci et aut molestias omnis iste.",
      "Modi vel dicta velit."
    ],
    "type": "remote",
    "updated": 1627686800
  },
  {
    "account": "vja",
    "created": 1627590400,
    "data": "{ \"hosts\": { \"host1.example.com\": null, \"host2.example.com\": null }}",
    "description": "Production infrastructure inventory",
    "identifier": "test_inventory",
    "name": "test inventory",
    "org": "ff",
    "project": "6n",
    "tags": [
      "Voluptatem a porro cum.",
      "Aliquam adipisci et aut molestias omnis iste.",
      "Modi vel dicta velit."
    ],
    "type": "remote",
    "updated": 1627686800
  }
]

Create Ansible inventory

post

Create a new inventory.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 13
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: z2
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: gb
Body
descriptionstring · max: 1024Optional

Description documents the inventory purpose and usage

Example: Production infrastructure inventory
identifierstringRequired

The unique identifier for this inventory

Example: test_inventory
namestring · min: 1 · max: 1024Required

Name is the human readable name

Example: test inventory
tagsstring[]Optional

Tags associated with the inventory

Example: ["Repellat corporis sed perspiciatis saepe voluptatem mollitia.","Sit voluptatem ducimus dolor voluptatem fuga.","Consectetur fugiat ut.","Vel nihil fugiat unde pariatur hic."]
typestring · enumRequired

Type indicates what kind of inventory this is

Example: manualPossible values:
Responses
201

Created response.

application/json
accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: lu
createdinteger · int64Required

Timestamp when the resource was created.

Example: 1627590400
descriptionstring · max: 1024Optional

Description documents the inventory purpose and usage

Example: Production infrastructure inventory
identifierstringRequired

The unique identifier for this inventory

Example: test_inventory
namestring · min: 1 · max: 1024Required

Name is the human readable name

Example: test inventory
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 2k
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: mq3
tagsstring[]Optional

Tags associated with the inventory

Example: ["Perspiciatis dolores perspiciatis quibusdam reprehenderit ut.","Saepe est voluptatem.","Voluptatibus et alias."]
typestring · enumRequired

Type indicates what kind of inventory this is

Example: dynamicPossible values:
updatedinteger · int64Required

Timestamp when the resource was last updated.

Example: 1627686800
post/api/orgs/{org}/projects/{project}/ansible/inventory
POST /api/orgs/{org}/projects/{project}/ansible/inventory HTTP/1.1
Host: localhost:80
Harness-Account: gb
Content-Type: application/json
Accept: */*
Content-Length: 1204

{
  "description": "Production infrastructure inventory",
  "dynamic_groups": [
    {
      "configuration": {
        "host_address_attribute": "<+attributes.public_dns>",
        "include_conditions": [
          {
            "attribute": "tag.environment",
            "operator": "equals",
            "value": "prod"
          }
        ],
        "resource_type": "aws_instance"
      },
      "connector_identifier": "my-workspace",
      "connector_type": "workspace"
    }
  ],
  "groups": [
    {
      "hosts": [
        {
          "host1.example.com": null
        }
      ],
      "name": "my-group"
    }
  ],
  "identifier": "test_inventory",
  "name": "test inventory",
  "plugin_options": {
    "inline_yaml": "all:\\n  hosts:\\n    localhost:\\n",
    "provider_connector_identifier": "my_aws_connector",
    "provider_connector_type": "aws",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "account.my_git_connector",
    "repository_path": "inventories/plugin-inventory.yml",
    "source_type": "git"
  },
  "remote_source": {
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "account.my_git_connector",
    "repository_path": "inventories/production/hosts.yml"
  },
  "tags": [
    "Minima et laborum in et.",
    "Aspernatur aut facere labore est eius similique.",
    "Qui doloribus magni unde qui odit ipsa."
  ],
  "type": "dynamic",
  "vars": [
    {
      "name": "my-var",
      "value": "my-value"
    }
  ]
}
{
  "account": "2y",
  "created": 1627590400,
  "description": "Production infrastructure inventory",
  "identifier": "test_inventory",
  "name": "test inventory",
  "org": "e",
  "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"
          }
        ],
        "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"
          }
        ],
        "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"
          }
        ],
        "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"
  },
  "project": "n",
  "tags": [
    "Saepe ratione amet.",
    "Tempore ipsam doloribus.",
    "Harum optio quo voluptatem.",
    "Non ab ad deserunt velit adipisci."
  ],
  "type": "plugin",
  "updated": 1627686800
}

Show Ansible inventory

get

Show an individual inventory.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: d
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: c
identifierstringRequired

Inventory identifier

Example: Rem ut veritatis ut.
Query parameters
useArraysbooleanOptional

Use arrays when displaying inventory data

Default: falseExample: false
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 5v
Responses
200

OK response.

application/json
accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: h
createdinteger · int64Required

Timestamp when the resource was created.

Example: 1627590400
datastringRequired

The data representing the inventory

Example: { "hosts": { "host1.example.com": null, "host2.example.com": null }}
descriptionstring · max: 1024Optional

Description documents the inventory purpose and usage

Example: Production infrastructure inventory
identifierstringRequired

The unique identifier for this inventory

Example: test_inventory
namestring · min: 1 · max: 1024Required

Name is the human readable name

Example: test inventory
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: mu
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 6
tagsstring[]Optional

Tags associated with the inventory

Example: ["Iusto veritatis non.","Excepturi eaque consequatur quasi numquam numquam necessitatibus.","Non perferendis natus voluptas sit dolores sint."]
typestring · enumRequired

Type indicates what kind of inventory this is

Example: remotePossible values:
updatedinteger · int64Required

Timestamp when the resource was last updated.

Example: 1627686800
get/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}
GET /api/orgs/{org}/projects/{project}/ansible/inventory/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: 5v
Accept: */*
{
  "account": "ff",
  "created": 1627590400,
  "data": "{ \"hosts\": { \"host1.example.com\": null, \"host2.example.com\": null }}",
  "description": "Production infrastructure inventory",
  "identifier": "test_inventory",
  "name": "test inventory",
  "org": "2k",
  "project": "uuw",
  "tags": [
    "Aut quis ad quae quia itaque voluptatem.",
    "Est consequatur deleniti et.",
    "Consequuntur molestiae soluta sapiente ducimus.",
    "Illum ullam et ullam voluptatem."
  ],
  "type": "remote",
  "updated": 1627686800
}

Update Ansible inventory

put

Update an existing inventory.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 553
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: g6o
identifierstringRequired

The unique identifier for this inventory

Example: test_inventory
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: qyq
Body
datastringRequired

The data representing the inventory

Example: { "hosts": { "host1.example.com": null, "host2.example.com": null }}
descriptionstring · max: 1024Optional

Description documents the inventory purpose and usage

Example: Production infrastructure inventory
namestring · min: 1 · max: 1024Required

Name is the human readable name

Example: test inventory
tagsstring[]Optional

Tags associated with the inventory

Example: ["Nobis et ratione nesciunt.","Sint voluptates facere nobis sit libero error.","Consequuntur et eveniet id."]
Responses
200

OK response.

application/json
put/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}
PUT /api/orgs/{org}/projects/{project}/ansible/inventory/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: qyq
Content-Type: application/json
Accept: */*
Content-Length: 237

{
  "data": "{ \"hosts\": { \"host1.example.com\": null, \"host2.example.com\": null }}",
  "description": "Production infrastructure inventory",
  "name": "test inventory",
  "tags": [
    "Assumenda veniam qui amet nostrum nisi officia.",
    "Placeat minus."
  ]
}
{
  "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"
          }
        ],
        "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"
          }
        ],
        "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"
          }
        ],
        "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"
  }
}

Delete Ansible inventory

delete

Delete an existing inventory.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: c
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 6q
identifierstringRequired

The unique identifier for this inventory

Example: Quo asperiores eum.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: p
Responses
200

OK response.

No content

delete/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}
DELETE /api/orgs/{org}/projects/{project}/ansible/inventory/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: p
Accept: */*

No content

Show Ansible inventory as ansible compatible YAML

get

Show an individual inventory as YAML.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: dvc
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: v3g
identifierstringRequired

The unique identifier for this inventory

Example: Officia molestiae aut mollitia dolores.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: r
Responses
200

OK response.

application/yaml
Other propertiesanyOptional
get/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/ansible
GET /api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/ansible HTTP/1.1
Host: localhost:80
Harness-Account: r
Accept: */*
Aut est fugiat reprehenderit id.: Quod magnam laborum optio et neque.

Show Ansible inventory groups

get

Show an individual inventory's groups.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: ik
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: c5
identifierstringRequired

Inventory identifier

Example: Et est fugiat.
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: r
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/groups
GET /api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/groups HTTP/1.1
Host: localhost:80
Harness-Account: r
Accept: */*
{
  "groups": [
    "Placeat incidunt error.",
    "Enim molestiae molestiae et quidem deleniti ut."
  ]
}

Show Ansible inventory hosts

get

Show an individual inventory hosts.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: to
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 6
identifierstringRequired

Inventory identifier

Example: Pariatur est qui voluptatem fugit autem ea.
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
groupstringOptional

Filter results by group

Default: ""Example: Est pariatur qui omnis qui nemo.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: a
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/hosts
GET /api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/hosts HTTP/1.1
Host: localhost:80
Harness-Account: a
Accept: */*
{
  "hosts": [
    {
      "created": 3168776483555413500,
      "groups": [
        "Suscipit qui animi est magnam qui.",
        "Qui ut repudiandae a modi deleniti laudantium.",
        "Et fuga rerum aut.",
        "Autem sit fugiat facere sit voluptatem."
      ],
      "host_address": "host1.example.com",
      "updated": 7149443571064899000,
      "vars": [
        {
          "file_name": "Ea iste sunt ab accusantium.",
          "key": "vq",
          "uuid": "123e4567-e89b-12d3-a456-426655440000",
          "value": "Provident veritatis dolor.",
          "value_type": "Tenetur enim."
        },
        {
          "file_name": "Ea iste sunt ab accusantium.",
          "key": "vq",
          "uuid": "123e4567-e89b-12d3-a456-426655440000",
          "value": "Provident veritatis dolor.",
          "value_type": "Tenetur enim."
        }
      ]
    },
    {
      "created": 3168776483555413500,
      "groups": [
        "Suscipit qui animi est magnam qui.",
        "Qui ut repudiandae a modi deleniti laudantium.",
        "Et fuga rerum aut.",
        "Autem sit fugiat facere sit voluptatem."
      ],
      "host_address": "host1.example.com",
      "updated": 7149443571064899000,
      "vars": [
        {
          "file_name": "Ea iste sunt ab accusantium.",
          "key": "vq",
          "uuid": "123e4567-e89b-12d3-a456-426655440000",
          "value": "Provident veritatis dolor.",
          "value_type": "Tenetur enim."
        },
        {
          "file_name": "Ea iste sunt ab accusantium.",
          "key": "vq",
          "uuid": "123e4567-e89b-12d3-a456-426655440000",
          "value": "Provident veritatis dolor.",
          "value_type": "Tenetur enim."
        }
      ]
    },
    {
      "created": 3168776483555413500,
      "groups": [
        "Suscipit qui animi est magnam qui.",
        "Qui ut repudiandae a modi deleniti laudantium.",
        "Et fuga rerum aut.",
        "Autem sit fugiat facere sit voluptatem."
      ],
      "host_address": "host1.example.com",
      "updated": 7149443571064899000,
      "vars": [
        {
          "file_name": "Ea iste sunt ab accusantium.",
          "key": "vq",
          "uuid": "123e4567-e89b-12d3-a456-426655440000",
          "value": "Provident veritatis dolor.",
          "value_type": "Tenetur enim."
        },
        {
          "file_name": "Ea iste sunt ab accusantium.",
          "key": "vq",
          "uuid": "123e4567-e89b-12d3-a456-426655440000",
          "value": "Provident veritatis dolor.",
          "value_type": "Tenetur enim."
        }
      ]
    }
  ]
}

Create Ansible inventory host

post

Create a new inventory host.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: u
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: v9t
identifierstringRequired

The unique identifier for this inventory

Example: test_inventory
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 42
Body
groupsstring[]Optional

Groups is the list of groups the host belongs to.

Example: ["Non exercitationem aut voluptatem nobis.","Error numquam beatae.","Odio dolor quia necessitatibus aut aut.","Quaerat eius ut."]
host_addressstringRequired

Host address is the address of the host.

Example: host1.example.com
Responses
201

Created response.

No content

post/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/hosts
POST /api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/hosts HTTP/1.1
Host: localhost:80
Harness-Account: 42
Content-Type: application/json
Accept: */*
Content-Length: 935

{
  "groups": [
    "Dolor dolorem ab.",
    "Sed et incidunt ipsum.",
    "Aut quasi aut ratione est perspiciatis."
  ],
  "host_address": "host1.example.com",
  "vars": [
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  ]
}

No content

Replace Ansible static inventory data from YAML/INI

put

Replace the data of an existing static (manual) Ansible inventory by parsing YAML or INI content. Preserves secret UUIDs for keys carried over.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: l86
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: vn
identifierstring · min: 1 · max: 128Required

The identifier of the inventory to replace.

Example: t39
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: g
Body
contentstring · min: 1 · max: 1048576Required

Raw inventory content.

Example: 6m
formatstring · enumRequired

Source format of the content.

Example: iniPossible values:
Responses
200

OK response.

application/json
warningsstring[]Required

Warnings surfaced during replace.

Example: ["Laudantium delectus.","Repudiandae eos.","Non autem quia.","Eveniet et aliquam tenetur fugit."]
put/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/import
PUT /api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/import HTTP/1.1
Host: localhost:80
Harness-Account: g
Content-Type: application/json
Accept: */*
Content-Length: 32

{
  "content": "nbl",
  "format": "ini"
}
{
  "warnings": [
    "Dignissimos amet.",
    "Quod aut sint."
  ]
}

Update Ansible plugin inventory

put

Update an existing plugin inventory configuration.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: he
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: kw
identifierstringRequired

Inventory identifier

Example: Magnam voluptate tempora aspernatur qui deleniti molestiae.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: rl
Body
Responses
200

OK response.

application/json
put/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/plugin
PUT /api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/plugin HTTP/1.1
Host: localhost:80
Harness-Account: rl
Content-Type: application/json
Accept: */*
Content-Length: 358

{
  "plugin_options": {
    "inline_yaml": "all:\\n  hosts:\\n    localhost:\\n",
    "provider_connector_identifier": "my_aws_connector",
    "provider_connector_type": "aws",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "account.my_git_connector",
    "repository_path": "inventories/plugin-inventory.yml",
    "source_type": "git"
  }
}
{
  "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"
          }
        ],
        "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"
          }
        ],
        "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"
          }
        ],
        "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"
  }
}

Update Ansible remote inventory git source

put

Update the git source of an existing remote inventory.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: kr
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 5z
identifierstringRequired

Inventory identifier

Example: Officia quae qui aut aut eum delectus.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: sy
Body
Responses
200

OK response.

application/json
put/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/remote
PUT /api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/remote HTTP/1.1
Host: localhost:80
Harness-Account: sy
Content-Type: application/json
Accept: */*
Content-Length: 202

{
  "remote_source": {
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "account.my_git_connector",
    "repository_path": "inventories/production/hosts.yml"
  }
}
{
  "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"
          }
        ],
        "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"
          }
        ],
        "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"
          }
        ],
        "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"
  }
}

Show Ansible inventory vars

get

Show an individual inventory vars.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 8ce
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: eo7
identifierstringRequired

Inventory identifier

Example: Nemo quaerat ullam velit sunt id.
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: jt
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/vars
GET /api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/vars HTTP/1.1
Host: localhost:80
Harness-Account: jt
Accept: */*
{
  "env_vars": [
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    },
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    },
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    }
  ],
  "vars": [
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    },
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    },
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    }
  ]
}

Create Ansible inventory variables

post

Create new inventory variables.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: ikq
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: r3
identifierstringRequired

The unique identifier for this inventory

Example: test_inventory
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: ejy
Body
Responses
201

Created response.

No content

post/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/vars
POST /api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/vars HTTP/1.1
Host: localhost:80
Harness-Account: ejy
Content-Type: application/json
Accept: */*
Content-Length: 971

{
  "env_vars": [
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    }
  ],
  "vars": [
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    }
  ]
}

No content

Update Ansible inventory variables

put

Update existing inventory variables.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: r
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 3ft
identifierstringRequired

The unique identifier for this inventory

Example: test_inventory
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: n
Body
Responses
200

OK response.

No content

put/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/vars
PUT /api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/vars HTTP/1.1
Host: localhost:80
Harness-Account: n
Content-Type: application/json
Accept: */*
Content-Length: 1682

{
  "env_vars": [
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    }
  ],
  "vars": [
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    }
  ]
}

No content

Create Ansible inventory group

post

Create a new inventory group.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: u
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 5
inventory_identifierstringRequired

The unique identifier for this inventory

Example: test_inventory
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: d
Body
connector_identifierstringOptional

Connector identifier is the connector identifier to use.

Example: my_aws_connector
connector_typestring · enumOptional

Connector Type is the type of connector to use.

Example: workspacePossible values:
hostsstring[]Optional

List of host addresses that belong to the group

Example: ["Est sed tenetur sit dignissimos.","Accusamus iure adipisci repellendus.","Inventore ullam et sunt.","Reiciendis quaerat."]
identifierstringRequired

The identifier of the group

Example: test_group
namestringRequired

Name is the friendly name of the group.

Example: My Group
Responses
201

Created response.

No content

post/api/orgs/{org}/projects/{project}/ansible/inventory/{inventory_identifier}/groups
POST /api/orgs/{org}/projects/{project}/ansible/inventory/{inventory_identifier}/groups HTTP/1.1
Host: localhost:80
Harness-Account: d
Content-Type: application/json
Accept: */*
Content-Length: 1868

{
  "configuration": {
    "host_address_attribute": "<+attributes.public_dns>",
    "resource_type": "aws_instance",
    "selectors": [
      {
        "attribute": "<+attributes.region>",
        "operator": "equals",
        "value": "europe"
      },
      {
        "attribute": "<+attributes.region>",
        "operator": "equals",
        "value": "europe"
      },
      {
        "attribute": "<+attributes.region>",
        "operator": "equals",
        "value": "europe"
      },
      {
        "attribute": "<+attributes.region>",
        "operator": "equals",
        "value": "europe"
      }
    ]
  },
  "connector_identifier": "my_aws_connector",
  "connector_type": "workspace",
  "dynamic_vars": [
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  ],
  "hosts": [
    "Et ad provident fugit nihil.",
    "Praesentium dolores enim voluptatem neque optio.",
    "Rerum facere.",
    "Deleniti ea aut."
  ],
  "identifier": "test_group",
  "name": "My Group",
  "vars": [
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  ]
}

No content

Update Ansible inventory group

put

Update an existing inventory group.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: t
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 85
inventory_identifierstringRequired

The unique identifier for this inventory

Example: test_inventory
identifierstringRequired

The identifier of the group

Example: test_group
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: nc
Body
connector_identifierstringOptional

Connector identifier is the connector identifier to use.

Example: my_aws_connector
connector_typestring · enumOptional

Connector Type is the type of connector to use.

Example: workspacePossible values:
hostsstring[]Optional

List of host addresses that belong to the group

Example: ["Recusandae facere nemo.","Provident earum aut.","Voluptas voluptatem commodi.","Illo dolore accusamus voluptas et."]
namestringRequired

Name is the friendly name of the group.

Example: My Group
Responses
200

OK response.

No content

put/api/orgs/{org}/projects/{project}/ansible/inventory/{inventory_identifier}/groups/{identifier}
PUT /api/orgs/{org}/projects/{project}/ansible/inventory/{inventory_identifier}/groups/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: nc
Content-Type: application/json
Accept: */*
Content-Length: 2042

{
  "configuration": {
    "host_address_attribute": "<+attributes.public_dns>",
    "resource_type": "aws_instance",
    "selectors": [
      {
        "attribute": "<+attributes.region>",
        "operator": "equals",
        "value": "europe"
      },
      {
        "attribute": "<+attributes.region>",
        "operator": "equals",
        "value": "europe"
      },
      {
        "attribute": "<+attributes.region>",
        "operator": "equals",
        "value": "europe"
      },
      {
        "attribute": "<+attributes.region>",
        "operator": "equals",
        "value": "europe"
      }
    ]
  },
  "connector_identifier": "my_aws_connector",
  "connector_type": "workspace",
  "dynamic_vars": [
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  ],
  "hosts": [
    "Ut ex sit voluptatem deserunt omnis tempore.",
    "Dolores ea quis nesciunt numquam.",
    "Dolores sit enim omnis assumenda."
  ],
  "name": "My Group",
  "vars": [
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  ]
}

No content

Delete Ansible inventory group

delete

Delete an existing inventory group.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: l
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: brz
inventory_identifierstringRequired

The unique identifier for this inventory

Example: test_inventory
identifierstringRequired

The identifier of the group

Example: test_group
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: ud
Responses
200

OK response.

No content

delete/api/orgs/{org}/projects/{project}/ansible/inventory/{inventory_identifier}/groups/{identifier}
DELETE /api/orgs/{org}/projects/{project}/ansible/inventory/{inventory_identifier}/groups/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: ud
Accept: */*

No content

Update Ansible inventory host

put

Update an existing inventory host.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 2ko
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: z
inventory_identifierstringRequired

The unique identifier for this inventory

Example: test_inventory
host_addressstringRequired

Host address is the address of the host.

Example: host1.example.com
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: acn
Body
groupsstring[]Optional

Groups is the list of groups the host belongs to.

Example: ["Eum velit vel ipsam et fugit.","Eius eos facere ut et eaque.","Est dolor modi dolores velit qui fugit."]
Responses
200

OK response.

No content

put/api/orgs/{org}/projects/{project}/ansible/inventory/{inventory_identifier}/hosts/{host_address}
PUT /api/orgs/{org}/projects/{project}/ansible/inventory/{inventory_identifier}/hosts/{host_address} HTTP/1.1
Host: localhost:80
Harness-Account: acn
Content-Type: application/json
Accept: */*
Content-Length: 945

{
  "groups": [
    "Distinctio similique vitae aut.",
    "Debitis non aspernatur aut perspiciatis quibusdam.",
    "Nihil perferendis aut vel distinctio sunt."
  ],
  "vars": [
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  ]
}

No content

Delete Ansible inventory host

delete

Delete a inventory host.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 8ka
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 18
inventory_identifierstringRequired

The unique identifier for this inventory

Example: test_inventory
host_addressstringRequired

Host address is the address of the host.

Example: host1.example.com
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 74
Responses
200

OK response.

No content

delete/api/orgs/{org}/projects/{project}/ansible/inventory/{inventory_identifier}/hosts/{host_address}
DELETE /api/orgs/{org}/projects/{project}/ansible/inventory/{inventory_identifier}/hosts/{host_address} HTTP/1.1
Host: localhost:80
Harness-Account: 74
Accept: */*

No content

Import Ansible static inventory from YAML/INI

post

Create a new static (manual) Ansible inventory by parsing YAML or INI content.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: t7
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 0n6
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: uok
Body
contentstring · min: 1 · max: 1048576Required

Raw inventory content as a string (paste or client-read file).

Example: ogb
formatstring · enumRequired

Source format of the content.

Example: iniPossible values:
identifierstring · min: 1 · max: 128Required

The identifier of the new inventory.

Example: o
namestring · min: 1 · max: 128Required

Display name of the new inventory.

Example: y
tagsstring[]Optional

Optional tags to apply to the new inventory.

Example: ["Enim enim.","Fugiat voluptas ad sint excepturi maiores et.","Est eveniet est qui ut dicta."]
Responses
201

Created response.

application/json
warningsstring[]Required

Warnings surfaced during import (lossy conversions, flattened groups, etc.).

Example: ["Hic quia excepturi aspernatur et.","Sed explicabo."]
post/api/orgs/{org}/projects/{project}/ansible/inventory/import
POST /api/orgs/{org}/projects/{project}/ansible/inventory/import HTTP/1.1
Host: localhost:80
Harness-Account: uok
Content-Type: application/json
Accept: */*
Content-Length: 180

{
  "content": "93c",
  "format": "ini",
  "identifier": "0y",
  "name": "i",
  "tags": [
    "Eos deserunt reprehenderit neque.",
    "Doloribus numquam qui sit.",
    "Facere odit beatae ullam delectus tenetur."
  ]
}
{
  "inventory": {
    "account": "zd",
    "created": 1627590400,
    "description": "Production infrastructure inventory",
    "identifier": "test_inventory",
    "name": "test inventory",
    "org": "2w0",
    "project": "u",
    "tags": [
      "Molestias autem cum sint.",
      "Eum omnis."
    ],
    "type": "remote",
    "updated": 1627686800
  },
  "warnings": [
    "Nisi ea eius sunt facilis similique.",
    "Adipisci omnis labore voluptatem autem et.",
    "Sapiente distinctio nostrum nostrum vero."
  ]
}

List Ansible playbooks

get

List all playbooks.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 2ji
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: xt
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
searchTermstringOptional

Filter results by partial name match

Default: ""Example: mysta
sortstring · enumOptional

Sort order for results

Default: name,ASCExample: updated,ASCPossible values:
tagsstring[]Optional

Filter results by tags (OR logic, exact match)

Example: ["A ratione dolorum.","Voluptatem sit rerum quis.","Repellendus vero et."]
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: l
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/ansible/playbook
GET /api/orgs/{org}/projects/{project}/ansible/playbook HTTP/1.1
Host: localhost:80
Harness-Account: l
Accept: */*
[
  {
    "account": "r",
    "ansible_galaxy": true,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Rem reprehenderit qui dolore quo qui similique.",
    "identifier": "Aspernatur repudiandae voluptate.",
    "name": "test playbook",
    "org": "7af",
    "project": "yt",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Sit dolores.",
      "Voluptas facilis in est sunt veniam repudiandae.",
      "Quas praesentium magni.",
      "Rerum cumque sunt."
    ],
    "updated": 1627686800,
    "vars": "Et iste maiores consectetur doloribus autem laboriosam."
  },
  {
    "account": "r",
    "ansible_galaxy": true,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Rem reprehenderit qui dolore quo qui similique.",
    "identifier": "Aspernatur repudiandae voluptate.",
    "name": "test playbook",
    "org": "7af",
    "project": "yt",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Sit dolores.",
      "Voluptas facilis in est sunt veniam repudiandae.",
      "Quas praesentium magni.",
      "Rerum cumque sunt."
    ],
    "updated": 1627686800,
    "vars": "Et iste maiores consectetur doloribus autem laboriosam."
  }
]

Create Ansible playbook

post

Create a new playbook.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: tfq
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: qfw
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 7
Body
ansible_galaxybooleanOptional

Install Ansible Galaxy dependencies

Default: falseExample: false
ansible_galaxy_requirements_filestringOptional

Path to Ansible Galaxy requirements file

Example: requirements.yml
descriptionstring · max: 1024Optional

Description documents the playbook purpose and usage

Example: Playbook for deploying web services to production
identifierstringRequired

The unique identifier for this playbook

Example: Deserunt exercitationem dolor labore ut.
namestring · min: 1 · max: 1024Required

Name is the human readable name

Example: test playbook
repositorystringOptional

Repository is the name of the repository to use.

Example: my-repo
repository_branchstringOptional

Repository Branch in which the playbook should be accessed.

Example: main
repository_commitstringOptional

Repository Commit/Tag in which the playbook should be accessed.

Example: abc10ed
repository_connectorstringOptional

Repository Connector is the reference to the connector to use for this playbook.

Example: my-connector
repository_pathstringRequired

Repository Path is the path in which the playbook resides.

Default: ""Example: playbooks/
tagsstring[]Optional

Tags associated with the playbook

Example: ["Voluptas mollitia maiores facere.","Molestias et optio deleniti amet delectus sit.","Nulla repellendus nemo aut."]
Responses
201

Created response.

application/json
accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 5w
ansible_galaxybooleanOptional

Install Ansible Galaxy dependencies

Default: falseExample: false
ansible_galaxy_requirements_filestringOptional

Path to Ansible Galaxy requirements file

Example: requirements.yml
createdinteger · int64Required

Timestamp when the resource was created.

Example: 1627590400
descriptionstring · max: 1024Optional

Description documents the playbook purpose and usage

Example: Playbook for deploying web services to production
env_varsstringOptional

The environment vars in the playbook

Example: Non sed.
identifierstringRequired

The unique identifier for this playbook

Example: Eaque minima.
namestring · min: 1 · max: 1024Required

Name is the human readable name

Example: test playbook
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: r
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 5b
repositorystringOptional

Repository is the name of the repository to use.

Example: my-repo
repository_branchstringOptional

Repository Branch in which the playbook should be accessed.

Example: main
repository_commitstringOptional

Repository Commit/Tag in which the playbook should be accessed.

Example: abc10ed
repository_connectorstringOptional

Repository Connector is the reference to the connector to use for this playbook.

Example: my-connector
repository_pathstringRequired

Repository Path is the path in which the playbook resides.

Default: ""Example: playbooks/
tagsstring[]Optional

Tags associated with the playbook

Example: ["Praesentium deserunt quia quos a non.","Architecto et et in voluptatum numquam animi.","Accusantium commodi cum quia.","Delectus illum rem est vel soluta."]
updatedinteger · int64Required

Timestamp when the resource was last updated.

Example: 1627686800
varsstringOptional

The vars in the playbook

Example: Iure eligendi quaerat blanditiis quaerat harum.
post/api/orgs/{org}/projects/{project}/ansible/playbook
POST /api/orgs/{org}/projects/{project}/ansible/playbook HTTP/1.1
Host: localhost:80
Harness-Account: 7
Content-Type: application/json
Accept: */*
Content-Length: 1612

{
  "ansible_galaxy": false,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "description": "Playbook for deploying web services to production",
  "env_vars": {
    "Beatae qui quam ipsam incidunt qui.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    "Doloribus quidem quibusdam perspiciatis.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  },
  "identifier": "Vitae commodi nisi maxime.",
  "name": "test playbook",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Totam debitis facere voluptas iusto.",
    "Non deserunt."
  ],
  "vars": {
    "Fugit vitae adipisci.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    "Quo distinctio consectetur unde.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    "Tempora sint sit perferendis optio.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  }
}
{
  "account": "1",
  "ansible_galaxy": false,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "created": 1627590400,
  "description": "Playbook for deploying web services to production",
  "env_vars": "Sed earum voluptas non cum.",
  "identifier": "Ut est aliquid illum harum.",
  "name": "test playbook",
  "org": "7hd",
  "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"
          }
        ],
        "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"
          }
        ],
        "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"
          }
        ],
        "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"
  },
  "project": "kr",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Perferendis quisquam quasi.",
    "Modi quis doloremque ex."
  ],
  "updated": 1627686800,
  "vars": "Esse quod consequatur eos voluptate beatae."
}

Show Ansible playbook

get

Show an individual playbook.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: m
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: o
identifierstringRequired

The unique identifier for this playbook

Example: In cum.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 7sl
Responses
200

OK response.

application/json
accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: rc
ansible_galaxybooleanOptional

Install Ansible Galaxy dependencies

Default: falseExample: false
ansible_galaxy_requirements_filestringOptional

Path to Ansible Galaxy requirements file

Example: requirements.yml
createdinteger · int64Required

Timestamp when the resource was created.

Example: 1627590400
descriptionstring · max: 1024Optional

Description documents the playbook purpose and usage

Example: Playbook for deploying web services to production
env_varsstringOptional

The environment vars in the playbook

Example: Aliquid tempora qui at in.
identifierstringRequired

The unique identifier for this playbook

Example: Iusto maxime deleniti officia.
namestring · min: 1 · max: 1024Required

Name is the human readable name

Example: test playbook
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: 4qx
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 1
repositorystringOptional

Repository is the name of the repository to use.

Example: my-repo
repository_branchstringOptional

Repository Branch in which the playbook should be accessed.

Example: main
repository_commitstringOptional

Repository Commit/Tag in which the playbook should be accessed.

Example: abc10ed
repository_connectorstringOptional

Repository Connector is the reference to the connector to use for this playbook.

Example: my-connector
repository_pathstringRequired

Repository Path is the path in which the playbook resides.

Default: ""Example: playbooks/
tagsstring[]Optional

Tags associated with the playbook

Example: ["Enim aliquid aspernatur assumenda quisquam.","Id voluptas qui.","Necessitatibus quo ipsam eius deleniti."]
updatedinteger · int64Required

Timestamp when the resource was last updated.

Example: 1627686800
varsstringOptional

The vars in the playbook

Example: Quidem aut exercitationem rerum asperiores neque.
get/api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}
GET /api/orgs/{org}/projects/{project}/ansible/playbook/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: 7sl
Accept: */*
{
  "account": "9",
  "ansible_galaxy": true,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "created": 1627590400,
  "description": "Playbook for deploying web services to production",
  "env_vars": "Ut aperiam veniam in quis sit.",
  "identifier": "Non aut.",
  "name": "test playbook",
  "org": "47l",
  "project": "8k",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Mollitia est facere inventore officiis dicta labore.",
    "Ducimus voluptas ipsum illum error."
  ],
  "updated": 1627686800,
  "vars": "Possimus sed quo cumque."
}

Update Ansible playbook

put

Update an existing playbook.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: ox
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 5b
identifierstringRequired

The unique identifier for this playbook

Example: Aut voluptas fugiat consequuntur qui rerum.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: y3
Body
ansible_galaxybooleanOptional

Install Ansible Galaxy dependencies

Default: falseExample: false
ansible_galaxy_requirements_filestringOptional

Path to Ansible Galaxy requirements file

Example: requirements.yml
descriptionstring · max: 1024Optional

Description documents the playbook purpose and usage

Example: Playbook for deploying web services to production
namestring · min: 1 · max: 1024Required

Name is the human readable name

Example: test playbook
repositorystringOptional

Repository is the name of the repository to use.

Example: my-repo
repository_branchstringOptional

Repository Branch in which the playbook should be accessed.

Example: main
repository_commitstringOptional

Repository Commit/Tag in which the playbook should be accessed.

Example: abc10ed
repository_connectorstringOptional

Repository Connector is the reference to the connector to use for this playbook.

Example: my-connector
repository_pathstringRequired

Repository Path is the path in which the playbook resides.

Default: ""Example: playbooks/
tagsstring[]Optional

Tags associated with the playbook

Example: ["Voluptatum et aut.","Dolores sunt doloribus.","Suscipit explicabo at voluptatem est expedita mollitia."]
Responses
200

OK response.

application/json
put/api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}
PUT /api/orgs/{org}/projects/{project}/ansible/playbook/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: y3
Content-Type: application/json
Accept: */*
Content-Length: 1398

{
  "ansible_galaxy": true,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "description": "Playbook for deploying web services to production",
  "env_vars": {
    "Optio assumenda exercitationem.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    "Sint assumenda eos et sed possimus enim.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  },
  "name": "test playbook",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Eligendi non accusantium doloribus omnis quasi officiis.",
    "Ducimus sit ipsa."
  ],
  "vars": {
    "Quasi possimus tempora incidunt velit.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    },
    "Quisquam fugit voluptas consequuntur temporibus laborum sit.": {
      "file_name": "Enim facilis libero rerum.",
      "key": "yv",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Optio ut dolorum dignissimos fuga nisi.",
      "value_type": "Sit qui quam soluta consequatur."
    }
  }
}
{
  "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"
          }
        ],
        "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"
          }
        ],
        "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"
          }
        ],
        "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"
  }
}

Delete Ansible playbook

delete

Delete an existing playbook.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: n
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: v
identifierstringRequired

The unique identifier for this playbook

Example: A rerum recusandae nam molestiae et corrupti.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 0y
Responses
200

OK response.

No content

delete/api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}
DELETE /api/orgs/{org}/projects/{project}/ansible/playbook/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: 0y
Accept: */*

No content

Show Ansible playbook vars

get

Show an individual playbook vars.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: q
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: up
identifierstringRequired

Playbook identifier

Example: Non vitae similique quo pariatur dolorem architecto.
Query parameters
limitinteger · int64 · min: 1 · max: 1000Optional

Limit is the number of records to return for a page.

Default: 30Example: 30
pageinteger · int64 · min: 1Optional

Page is the page number to return relative to the page 'limit'.

Default: 1Example: 1
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: o
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}/vars
GET /api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}/vars HTTP/1.1
Host: localhost:80
Harness-Account: o
Accept: */*
{
  "env_vars": [
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    },
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    },
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    }
  ],
  "vars": [
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    },
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    },
    {
      "created": "Suscipit et earum aut distinctio.",
      "file_name": "Vel blanditiis labore consectetur.",
      "key": "i",
      "updated": "Dignissimos ut nobis sunt natus.",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Magnam a ut quas ea possimus omnis.",
      "value_type": "Et enim est totam nihil.",
      "var_type": "Rerum ut numquam incidunt facere vero."
    }
  ]
}

Create dynamic Ansible playbook variable

post

Create a new dynamic playbook variable.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: cp
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: nq
identifierstringRequired

The unique identifier for this inventory

Example: test_inventory
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: ry
Body
Responses
201

Created response.

No content

post/api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}/vars
POST /api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}/vars HTTP/1.1
Host: localhost:80
Harness-Account: ry
Content-Type: application/json
Accept: */*
Content-Length: 1682

{
  "env_vars": [
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    }
  ],
  "vars": [
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    }
  ]
}

No content

Update dynamic Ansible playbook variable

put

Update an existing dynamic playbook variable.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: s
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: x6
identifierstringRequired

The unique identifier for this inventory

Example: test_inventory
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: hy
Body
Responses
200

OK response.

No content

put/api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}/vars
PUT /api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}/vars HTTP/1.1
Host: localhost:80
Harness-Account: hy
Content-Type: application/json
Accept: */*
Content-Length: 1208

{
  "env_vars": [
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    }
  ],
  "vars": [
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    },
    {
      "file_name": "Eaque quisquam quo culpa totam eligendi et.",
      "key": "hp",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Sed autem autem.",
      "value_type": "Vel dolore dolorem minima excepturi.",
      "var_type": "Et vero qui quam doloribus."
    }
  ]
}

No content

Delete dynamic Ansible playbook variable

delete

Delete a dynamic playbook variable.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: i
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 1hz
identifierstringRequired

The unique identifier for this inventory

Example: test_inventory
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: s2i
Body
varsstring[]RequiredExample: ["Quam neque ipsum est ut.","Nostrum officiis autem."]
Responses
200

OK response.

No content

delete/api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}/vars
DELETE /api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}/vars HTTP/1.1
Host: localhost:80
Harness-Account: s2i
Content-Type: application/json
Accept: */*
Content-Length: 126

{
  "vars": [
    "Qui velit.",
    "Et et in nulla aut corporis.",
    "Assumenda dolor cupiditate.",
    "Aut quidem beatae sint mollitia et est."
  ]
}

No content

Publish results

post

Store ansible run results and create an activity record in a single call.

Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: nfg
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: z6
Query parameters
pipeline_idstringOptional

The unique identifier for the associated pipeline

Example: Officia iure labore sapiente.
stage_idstringOptional

The unique identifier for a stage

Example: Fugit sequi ut sed quis illo ducimus.
pipeline_execution_idstringOptional

The unique identifier for the associated pipeline execution

Example: Eum nostrum quibusdam ex nihil culpa ullam.
pipeline_stage_idstringOptional

The unique identifier for the associated pipeline execution stage

Example: Aspernatur voluptas veniam rem dolores velit quis.
data_typestring · enumRequired

Type of data stored

Example: task_resultsPossible values:
inventoriesstringRequired

Inventories associated with this event

Example: Optio illum.
playbooksstringRequired

Playbooks associated with this event

Example: Accusantium omnis consequatur temporibus necessitatibus repudiandae et.
event_typestring · enumRequired

The type of event that occurred.

Example: activity-executionPossible values:
metadatastringOptional

JSON-encoded activity metadata (activity_status, git_branch, git_repo, etc.).

Example: Totam incidunt.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 6s
Content-Lengthinteger · int64Optional

Size in bytes of the data.

Example: 4603568117895322000
Responses
200

OK response.

application/json
idstringRequired

The unique identifier for the data

Example: dc538c61-de48-4220-958c-5f3c4f983daa
post/api/orgs/{org}/projects/{project}/ansible/results
POST /api/orgs/{org}/projects/{project}/ansible/results?data_type=task_results&inventories=Optio+illum.&playbooks=Accusantium+omnis+consequatur+temporibus+necessitatibus+repudiandae+et.&event_type=activity-execution HTTP/1.1
Host: localhost:80
Harness-Account: 6s
Accept: */*
{
  "id": "dc538c61-de48-4220-958c-5f3c4f983daa"
}

Last updated

Was this helpful?