Skip to content
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,DESCPossible 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: Ullam quidem.
statusstringOptional

Activity status filter

Example: Laboriosam autem quasi qui mollitia ad rerum.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 0x
Responses
200

OK response.

application/json
get/api/ansible/activities
GET /api/ansible/activities HTTP/1.1
Host: localhost:80
Harness-Account: 0x
Accept: */*
[
  {
    "account": "p",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Et omnis aliquid soluta.",
    "metadata": {
      "activity_status": "Asperiores corrupti eligendi molestiae necessitatibus placeat.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Dolor quasi.",
      "git_commit_message": "Incidunt ut quo eius.",
      "git_commit_sha": "Eos est.",
      "git_repo": "Architecto mollitia ullam quisquam modi.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 2207448405191504000,
        "host_changed": 2079056670978617900,
        "host_failed": 8173270070248269000,
        "host_ok": 6413547484620333000,
        "host_skipped": 287100672014734080,
        "host_unreachable": 208021522580766000,
        "output_size_bytes": 2358811687401482000,
        "payload_size_bytes": 2873522630247883300,
        "total_hosts": 576374362686072450,
        "total_tasks": 5279973062797507000
      },
      "pipeline": "Esse quae provident soluta aut nemo veniam.",
      "pipeline_execution_id": "Asperiores at alias quia nisi numquam.",
      "pipeline_execution_number": "Optio beatae qui tempora molestiae.",
      "pipeline_name": "Officiis architecto asperiores quo quisquam fugit est.",
      "pipeline_stage_id": "Ut sapiente et rerum et impedit accusamus.",
      "plugin_version": "Aut iusto adipisci autem quo eos.",
      "results_uuid": "Aut aperiam quasi itaque dolores dolores nihil.",
      "trigger": {
        "Natus earum molestiae in sunt.": "In et perspiciatis quia qui vero sed."
      }
    },
    "org": "9",
    "playbooks": "Nostrum qui similique culpa laborum inventore.",
    "project": "n"
  },
  {
    "account": "p",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Et omnis aliquid soluta.",
    "metadata": {
      "activity_status": "Asperiores corrupti eligendi molestiae necessitatibus placeat.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Dolor quasi.",
      "git_commit_message": "Incidunt ut quo eius.",
      "git_commit_sha": "Eos est.",
      "git_repo": "Architecto mollitia ullam quisquam modi.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 2207448405191504000,
        "host_changed": 2079056670978617900,
        "host_failed": 8173270070248269000,
        "host_ok": 6413547484620333000,
        "host_skipped": 287100672014734080,
        "host_unreachable": 208021522580766000,
        "output_size_bytes": 2358811687401482000,
        "payload_size_bytes": 2873522630247883300,
        "total_hosts": 576374362686072450,
        "total_tasks": 5279973062797507000
      },
      "pipeline": "Esse quae provident soluta aut nemo veniam.",
      "pipeline_execution_id": "Asperiores at alias quia nisi numquam.",
      "pipeline_execution_number": "Optio beatae qui tempora molestiae.",
      "pipeline_name": "Officiis architecto asperiores quo quisquam fugit est.",
      "pipeline_stage_id": "Ut sapiente et rerum et impedit accusamus.",
      "plugin_version": "Aut iusto adipisci autem quo eos.",
      "results_uuid": "Aut aperiam quasi itaque dolores dolores nihil.",
      "trigger": {
        "Natus earum molestiae in sunt.": "In et perspiciatis quia qui vero sed."
      }
    },
    "org": "9",
    "playbooks": "Nostrum qui similique culpa laborum inventore.",
    "project": "n"
  },
  {
    "account": "p",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Et omnis aliquid soluta.",
    "metadata": {
      "activity_status": "Asperiores corrupti eligendi molestiae necessitatibus placeat.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Dolor quasi.",
      "git_commit_message": "Incidunt ut quo eius.",
      "git_commit_sha": "Eos est.",
      "git_repo": "Architecto mollitia ullam quisquam modi.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 2207448405191504000,
        "host_changed": 2079056670978617900,
        "host_failed": 8173270070248269000,
        "host_ok": 6413547484620333000,
        "host_skipped": 287100672014734080,
        "host_unreachable": 208021522580766000,
        "output_size_bytes": 2358811687401482000,
        "payload_size_bytes": 2873522630247883300,
        "total_hosts": 576374362686072450,
        "total_tasks": 5279973062797507000
      },
      "pipeline": "Esse quae provident soluta aut nemo veniam.",
      "pipeline_execution_id": "Asperiores at alias quia nisi numquam.",
      "pipeline_execution_number": "Optio beatae qui tempora molestiae.",
      "pipeline_name": "Officiis architecto asperiores quo quisquam fugit est.",
      "pipeline_stage_id": "Ut sapiente et rerum et impedit accusamus.",
      "plugin_version": "Aut iusto adipisci autem quo eos.",
      "results_uuid": "Aut aperiam quasi itaque dolores dolores nihil.",
      "trigger": {
        "Natus earum molestiae in sunt.": "In et perspiciatis quia qui vero sed."
      }
    },
    "org": "9",
    "playbooks": "Nostrum qui similique culpa laborum inventore.",
    "project": "n"
  }
]

Show ansible activity on account level

get

Show an individual account scoped ansible activity.

Path parameters
idstringRequired

The unique ID for this activity

Example: Et et iste officiis.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: b
Responses
200

OK response.

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

Account is the internal customer account ID.

Example: l
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: Vel veniam et voluptatum.
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: ubf
playbooksstringRequired

Playbooks associated with this event

Example: Cumque est debitis odio.
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: mq
get/api/ansible/activities/{id}
GET /api/ansible/activities/{id} HTTP/1.1
Host: localhost:80
Harness-Account: b
Accept: */*
{
  "account": "pi",
  "created": 1627590400,
  "event_type": "activity-execution",
  "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
  "inventories": "Itaque quia quae omnis.",
  "metadata": {
    "activity_status": "Laudantium explicabo ab consequatur eius quo est.",
    "filters": "tags=deploy skip-tags=slow limit=web",
    "git_branch": "Sed ipsum.",
    "git_commit_message": "Sed provident molestias esse doloribus quaerat.",
    "git_commit_sha": "Quam ut.",
    "git_repo": "Sapiente dicta et.",
    "metrics": {
      "circuit_breaker_triggered": true,
      "duration_ms": 9161572224745659000,
      "host_changed": 5514210248796778000,
      "host_failed": 5342935301463969000,
      "host_ok": 789357644943662800,
      "host_skipped": 6103133485534346000,
      "host_unreachable": 5270124757667744000,
      "output_size_bytes": 8384655139211878000,
      "payload_size_bytes": 3699728170190409700,
      "total_hosts": 3416993616293762000,
      "total_tasks": 3019149475344072000
    },
    "pipeline": "Sunt hic.",
    "pipeline_execution_id": "Nesciunt aliquid dolorum.",
    "pipeline_execution_number": "Dignissimos omnis aut.",
    "pipeline_name": "Iure debitis molestias aperiam a alias fugiat.",
    "pipeline_stage_id": "Sequi sapiente sunt.",
    "plugin_version": "Harum aliquid a amet alias et.",
    "results_uuid": "Incidunt maiores accusantium et laborum ea.",
    "trigger": {
      "Molestias hic ipsum sapiente nobis et labore.": "Fuga nam dignissimos sed maxime harum.",
      "Sunt animi et optio optio.": "Et cum.",
      "Totam voluptas porro in sint excepturi ea.": "Et vel sed et."
    }
  },
  "org": "a",
  "playbooks": "Sit voluptate cum repellendus accusantium.",
  "project": "cu"
}

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: o
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: o
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: j
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: j
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: name,ASCPossible values:
tagsstring[]Optional

Filter results by tags (OR logic, exact match)

Example: ["Eaque et neque et.","Omnis totam dolores maiores qui aperiam perferendis.","Rerum earum id.","Natus minima odit cum modi."]
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: psy
Responses
200

OK response.

application/json
get/api/ansible/playbook
GET /api/ansible/playbook HTTP/1.1
Host: localhost:80
Harness-Account: psy
Accept: */*
[
  {
    "account": "00",
    "ansible_galaxy": false,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Esse eaque dolorem sit voluptatem velit fuga.",
    "identifier": "Repellendus sed ipsam eligendi est et nobis.",
    "name": "test playbook",
    "org": "m",
    "project": "2ue",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Minus hic blanditiis magnam culpa delectus.",
      "Non est aut aliquam architecto ea.",
      "Officiis veniam.",
      "Odit hic cumque enim mollitia a velit."
    ],
    "updated": 1627686800,
    "vars": "Incidunt eum voluptatum ut."
  },
  {
    "account": "00",
    "ansible_galaxy": false,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Esse eaque dolorem sit voluptatem velit fuga.",
    "identifier": "Repellendus sed ipsam eligendi est et nobis.",
    "name": "test playbook",
    "org": "m",
    "project": "2ue",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Minus hic blanditiis magnam culpa delectus.",
      "Non est aut aliquam architecto ea.",
      "Officiis veniam.",
      "Odit hic cumque enim mollitia a velit."
    ],
    "updated": 1627686800,
    "vars": "Incidunt eum voluptatum ut."
  },
  {
    "account": "00",
    "ansible_galaxy": false,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Esse eaque dolorem sit voluptatem velit fuga.",
    "identifier": "Repellendus sed ipsam eligendi est et nobis.",
    "name": "test playbook",
    "org": "m",
    "project": "2ue",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Minus hic blanditiis magnam culpa delectus.",
      "Non est aut aliquam architecto ea.",
      "Officiis veniam.",
      "Odit hic cumque enim mollitia a velit."
    ],
    "updated": 1627686800,
    "vars": "Incidunt eum voluptatum ut."
  },
  {
    "account": "00",
    "ansible_galaxy": false,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Esse eaque dolorem sit voluptatem velit fuga.",
    "identifier": "Repellendus sed ipsam eligendi est et nobis.",
    "name": "test playbook",
    "org": "m",
    "project": "2ue",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Minus hic blanditiis magnam culpa delectus.",
      "Non est aut aliquam architecto ea.",
      "Officiis veniam.",
      "Odit hic cumque enim mollitia a velit."
    ],
    "updated": 1627686800,
    "vars": "Incidunt eum voluptatum ut."
  }
]

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: t8
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: Assumenda quam sint possimus cupiditate est perspiciatis.
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: ["Numquam eos qui.","Quo non."]
Responses
201

Created response.

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

Account is the internal customer account ID.

Example: 9
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: Sit dicta est qui animi.
identifierstringRequired

The unique identifier for this playbook

Example: Cupiditate dicta hic.
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: xu
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: vnr
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: ["Possimus itaque illum dolor qui autem.","Officiis laborum a in dolorem."]
updatedinteger · int64Required

Timestamp when the resource was last updated.

Example: 1627686800
varsstringOptional

The vars in the playbook

Example: Saepe labore qui.
post/api/ansible/playbook
POST /api/ansible/playbook HTTP/1.1
Host: localhost:80
Harness-Account: t8
Content-Type: application/json
Accept: */*
Content-Length: 1405

{
  "ansible_galaxy": true,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "description": "Playbook for deploying web services to production",
  "env_vars": {
    "Mollitia consequuntur odit non at eius harum.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    "Non totam pariatur distinctio.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    "Voluptatem illo.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  },
  "identifier": "Voluptas beatae enim.",
  "name": "test playbook",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Aliquam ut ut.",
    "Itaque qui.",
    "Vero quisquam eum laudantium.",
    "Et harum."
  ],
  "vars": {
    "Voluptatem natus quaerat tempore blanditiis.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  }
}
{
  "account": "3b",
  "ansible_galaxy": false,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "created": 1627590400,
  "description": "Playbook for deploying web services to production",
  "env_vars": "Nobis suscipit nihil.",
  "identifier": "Aut et quis illum corrupti amet.",
  "name": "test playbook",
  "org": "bv",
  "policy_evaluation": {
    "account_id": "XRQAjvT37acOiXx9PRaQMF",
    "action": "onrun",
    "created": 1636370209475,
    "details": [
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      },
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "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": "a",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Consectetur sit voluptates animi modi accusamus.",
    "Dolor tempore voluptas laboriosam modi laudantium labore."
  ],
  "updated": 1627686800,
  "vars": "Quo expedita suscipit doloremque."
}

Show Ansible playbook on account level

get

Show an individual account scoped playbook.

Path parameters
identifierstringRequired

The unique identifier for this playbook

Example: Sequi non enim praesentium et.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: t
Responses
200

OK response.

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

Account is the internal customer account ID.

Example: un
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: Officia iure labore sapiente.
identifierstringRequired

The unique identifier for this playbook

Example: Odio consequatur consequatur.
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: u4h
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: mg
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: ["Sequi ut sed quis illo ducimus.","Voluptatem ut quis deserunt et deleniti.","Eum nostrum quibusdam ex nihil culpa ullam.","Quos veniam accusantium enim."]
updatedinteger · int64Required

Timestamp when the resource was last updated.

Example: 1627686800
varsstringOptional

The vars in the playbook

Example: Sequi consequatur eos voluptas.
get/api/ansible/playbook/{identifier}
GET /api/ansible/playbook/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: t
Accept: */*
{
  "account": "49",
  "ansible_galaxy": true,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "created": 1627590400,
  "description": "Playbook for deploying web services to production",
  "env_vars": "Aspernatur ex doloribus ducimus et quo.",
  "identifier": "Necessitatibus nostrum delectus.",
  "name": "test playbook",
  "org": "m5l",
  "project": "5",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Maxime quod voluptas nostrum.",
    "Nihil et eum.",
    "Veritatis eaque corporis nesciunt distinctio.",
    "Dolorum qui quisquam fugit."
  ],
  "updated": 1627686800,
  "vars": "Quos consequatur id velit."
}

Update Ansible playbook on account level

put

Update an existing account scoped playbook.

Path parameters
identifierstringRequired

The unique identifier for this playbook

Example: Nihil atque ut cupiditate laborum fuga est.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 6do
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: ["Similique maxime ut.","Culpa ut odio suscipit."]
Responses
200

OK response.

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

{
  "ansible_galaxy": true,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "description": "Playbook for deploying web services to production",
  "env_vars": {
    "Commodi iure.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    "Vel ut voluptate repellendus distinctio.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  },
  "name": "test playbook",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Odio et dolor eos in.",
    "Ut libero et.",
    "Nobis est et amet sunt est consequatur."
  ],
  "vars": {
    "Natus eum iure.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    "Repellendus aperiam quod suscipit autem commodi hic.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  }
}
{
  "policy_evaluation": {
    "account_id": "XRQAjvT37acOiXx9PRaQMF",
    "action": "onrun",
    "created": 1636370209475,
    "details": [
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      },
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "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: Quasi ut exercitationem.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 1sq
Responses
200

OK response.

No content

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

No content

Show the Configuration Variable Sets attached to an account level Ansible playbook

get

Show the Configuration Variable Sets attached to an account scoped playbook, in priority order.

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: s
Responses
200

OK response.

application/json
get/api/ansible/playbook/{identifier}/configuration-variable-sets
GET /api/ansible/playbook/{identifier}/configuration-variable-sets HTTP/1.1
Host: localhost:80
Harness-Account: s
Accept: */*
{
  "variable_sets": [
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    }
  ]
}

Replace the Configuration Variable Sets attached to an account level Ansible playbook

put

Replace the Configuration Variable Sets attached to an account scoped playbook. Array order is the priority order.

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: ug
Body
variable_setsstring[]Required

Configuration Variable Sets to attach, in priority order. Replaces whatever is currently attached.

Example: ["account.shared_vars","playbook_vars"]
Responses
200

OK response.

application/json
put/api/ansible/playbook/{identifier}/configuration-variable-sets
PUT /api/ansible/playbook/{identifier}/configuration-variable-sets HTTP/1.1
Host: localhost:80
Harness-Account: ug
Content-Type: application/json
Accept: */*
Content-Length: 57

{
  "variable_sets": [
    "account.shared_vars",
    "playbook_vars"
  ]
}
{
  "variable_sets": [
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    }
  ]
}

Show Ansible playbook vars on account level

get

Show an individual account scoped playbook vars.

Path parameters
identifierstringRequired

Playbook identifier

Example: Ut suscipit rem.
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: g
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: g
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: m
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: m
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 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: m
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: m
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

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: h
Body
env_varsstring[]Optional

UUIDs of environment variables to delete.

Example: ["Magnam numquam id delectus.","Saepe eos dolor explicabo nesciunt.","Alias inventore voluptatem deserunt est earum."]
varsstring[]Optional

UUIDs of Ansible variables to delete.

Example: ["Soluta quis et quibusdam.","Et maiores.","Voluptas quia rerum sit animi quo cum."]
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: h
Content-Type: application/json
Accept: */*
Content-Length: 268

{
  "env_vars": [
    "Qui et voluptatibus esse.",
    "Dicta voluptatem quae.",
    "Qui ea et nulla animi laborum.",
    "Nesciunt et provident placeat unde atque ea."
  ],
  "vars": [
    "Iusto dignissimos aut reiciendis dolorem veniam.",
    "Qui enim qui.",
    "Aspernatur officiis quas eum quia ducimus."
  ]
}

No content

Show the merged variables of an account level Ansible playbook

get

Show the playbook's variables followed by those of its attached Configuration Variable Sets, marking which entry wins each key.

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: w
Responses
200

OK response.

application/json
get/api/ansible/playbook/{identifier}/vars/merged
GET /api/ansible/playbook/{identifier}/vars/merged HTTP/1.1
Host: localhost:80
Harness-Account: w
Accept: */*
{
  "environment_variables": [
    {
      "associatedVariableSet": "Eos iusto.",
      "file_name": "Delectus magnam ex cum.",
      "inUse": false,
      "isLocked": false,
      "key": "Eligendi nam maxime dolores et blanditiis aut.",
      "priority": 263786966037862850,
      "source": "playbook",
      "uuid": "Iure labore non et.",
      "value": "Rem consequatur sed.",
      "value_type": "Eos tempora perspiciatis repellat in a."
    },
    {
      "associatedVariableSet": "Eos iusto.",
      "file_name": "Delectus magnam ex cum.",
      "inUse": false,
      "isLocked": false,
      "key": "Eligendi nam maxime dolores et blanditiis aut.",
      "priority": 263786966037862850,
      "source": "playbook",
      "uuid": "Iure labore non et.",
      "value": "Rem consequatur sed.",
      "value_type": "Eos tempora perspiciatis repellat in a."
    },
    {
      "associatedVariableSet": "Eos iusto.",
      "file_name": "Delectus magnam ex cum.",
      "inUse": false,
      "isLocked": false,
      "key": "Eligendi nam maxime dolores et blanditiis aut.",
      "priority": 263786966037862850,
      "source": "playbook",
      "uuid": "Iure labore non et.",
      "value": "Rem consequatur sed.",
      "value_type": "Eos tempora perspiciatis repellat in a."
    }
  ],
  "variables": [
    {
      "associatedVariableSet": "Eos iusto.",
      "file_name": "Delectus magnam ex cum.",
      "inUse": false,
      "isLocked": false,
      "key": "Eligendi nam maxime dolores et blanditiis aut.",
      "priority": 263786966037862850,
      "source": "playbook",
      "uuid": "Iure labore non et.",
      "value": "Rem consequatur sed.",
      "value_type": "Eos tempora perspiciatis repellat in a."
    },
    {
      "associatedVariableSet": "Eos iusto.",
      "file_name": "Delectus magnam ex cum.",
      "inUse": false,
      "isLocked": false,
      "key": "Eligendi nam maxime dolores et blanditiis aut.",
      "priority": 263786966037862850,
      "source": "playbook",
      "uuid": "Iure labore non et.",
      "value": "Rem consequatur sed.",
      "value_type": "Eos tempora perspiciatis repellat in a."
    }
  ]
}

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: e
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: Dignissimos fuga ut minus ducimus.
statusstringOptional

Activity status filter

Example: Officiis et.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 91e
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: 91e
Accept: */*
[
  {
    "account": "p",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Et omnis aliquid soluta.",
    "metadata": {
      "activity_status": "Asperiores corrupti eligendi molestiae necessitatibus placeat.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Dolor quasi.",
      "git_commit_message": "Incidunt ut quo eius.",
      "git_commit_sha": "Eos est.",
      "git_repo": "Architecto mollitia ullam quisquam modi.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 2207448405191504000,
        "host_changed": 2079056670978617900,
        "host_failed": 8173270070248269000,
        "host_ok": 6413547484620333000,
        "host_skipped": 287100672014734080,
        "host_unreachable": 208021522580766000,
        "output_size_bytes": 2358811687401482000,
        "payload_size_bytes": 2873522630247883300,
        "total_hosts": 576374362686072450,
        "total_tasks": 5279973062797507000
      },
      "pipeline": "Esse quae provident soluta aut nemo veniam.",
      "pipeline_execution_id": "Asperiores at alias quia nisi numquam.",
      "pipeline_execution_number": "Optio beatae qui tempora molestiae.",
      "pipeline_name": "Officiis architecto asperiores quo quisquam fugit est.",
      "pipeline_stage_id": "Ut sapiente et rerum et impedit accusamus.",
      "plugin_version": "Aut iusto adipisci autem quo eos.",
      "results_uuid": "Aut aperiam quasi itaque dolores dolores nihil.",
      "trigger": {
        "Natus earum molestiae in sunt.": "In et perspiciatis quia qui vero sed."
      }
    },
    "org": "9",
    "playbooks": "Nostrum qui similique culpa laborum inventore.",
    "project": "n"
  },
  {
    "account": "p",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Et omnis aliquid soluta.",
    "metadata": {
      "activity_status": "Asperiores corrupti eligendi molestiae necessitatibus placeat.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Dolor quasi.",
      "git_commit_message": "Incidunt ut quo eius.",
      "git_commit_sha": "Eos est.",
      "git_repo": "Architecto mollitia ullam quisquam modi.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 2207448405191504000,
        "host_changed": 2079056670978617900,
        "host_failed": 8173270070248269000,
        "host_ok": 6413547484620333000,
        "host_skipped": 287100672014734080,
        "host_unreachable": 208021522580766000,
        "output_size_bytes": 2358811687401482000,
        "payload_size_bytes": 2873522630247883300,
        "total_hosts": 576374362686072450,
        "total_tasks": 5279973062797507000
      },
      "pipeline": "Esse quae provident soluta aut nemo veniam.",
      "pipeline_execution_id": "Asperiores at alias quia nisi numquam.",
      "pipeline_execution_number": "Optio beatae qui tempora molestiae.",
      "pipeline_name": "Officiis architecto asperiores quo quisquam fugit est.",
      "pipeline_stage_id": "Ut sapiente et rerum et impedit accusamus.",
      "plugin_version": "Aut iusto adipisci autem quo eos.",
      "results_uuid": "Aut aperiam quasi itaque dolores dolores nihil.",
      "trigger": {
        "Natus earum molestiae in sunt.": "In et perspiciatis quia qui vero sed."
      }
    },
    "org": "9",
    "playbooks": "Nostrum qui similique culpa laborum inventore.",
    "project": "n"
  },
  {
    "account": "p",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Et omnis aliquid soluta.",
    "metadata": {
      "activity_status": "Asperiores corrupti eligendi molestiae necessitatibus placeat.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Dolor quasi.",
      "git_commit_message": "Incidunt ut quo eius.",
      "git_commit_sha": "Eos est.",
      "git_repo": "Architecto mollitia ullam quisquam modi.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 2207448405191504000,
        "host_changed": 2079056670978617900,
        "host_failed": 8173270070248269000,
        "host_ok": 6413547484620333000,
        "host_skipped": 287100672014734080,
        "host_unreachable": 208021522580766000,
        "output_size_bytes": 2358811687401482000,
        "payload_size_bytes": 2873522630247883300,
        "total_hosts": 576374362686072450,
        "total_tasks": 5279973062797507000
      },
      "pipeline": "Esse quae provident soluta aut nemo veniam.",
      "pipeline_execution_id": "Asperiores at alias quia nisi numquam.",
      "pipeline_execution_number": "Optio beatae qui tempora molestiae.",
      "pipeline_name": "Officiis architecto asperiores quo quisquam fugit est.",
      "pipeline_stage_id": "Ut sapiente et rerum et impedit accusamus.",
      "plugin_version": "Aut iusto adipisci autem quo eos.",
      "results_uuid": "Aut aperiam quasi itaque dolores dolores nihil.",
      "trigger": {
        "Natus earum molestiae in sunt.": "In et perspiciatis quia qui vero sed."
      }
    },
    "org": "9",
    "playbooks": "Nostrum qui similique culpa laborum inventore.",
    "project": "n"
  }
]

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: o1
idstringRequired

The unique ID for this activity

Example: Culpa consectetur quasi qui.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: as
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
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: Assumenda ad consequuntur et.
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: yz
playbooksstringRequired

Playbooks associated with this event

Example: Occaecati repudiandae maiores.
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: bj2
get/api/orgs/{org}/ansible/activities/{id}
GET /api/orgs/{org}/ansible/activities/{id} HTTP/1.1
Host: localhost:80
Harness-Account: as
Accept: */*
{
  "account": "kjk",
  "created": 1627590400,
  "event_type": "activity-execution",
  "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
  "inventories": "Provident veniam.",
  "metadata": {
    "activity_status": "Laudantium explicabo ab consequatur eius quo est.",
    "filters": "tags=deploy skip-tags=slow limit=web",
    "git_branch": "Sed ipsum.",
    "git_commit_message": "Sed provident molestias esse doloribus quaerat.",
    "git_commit_sha": "Quam ut.",
    "git_repo": "Sapiente dicta et.",
    "metrics": {
      "circuit_breaker_triggered": true,
      "duration_ms": 9161572224745659000,
      "host_changed": 5514210248796778000,
      "host_failed": 5342935301463969000,
      "host_ok": 789357644943662800,
      "host_skipped": 6103133485534346000,
      "host_unreachable": 5270124757667744000,
      "output_size_bytes": 8384655139211878000,
      "payload_size_bytes": 3699728170190409700,
      "total_hosts": 3416993616293762000,
      "total_tasks": 3019149475344072000
    },
    "pipeline": "Sunt hic.",
    "pipeline_execution_id": "Nesciunt aliquid dolorum.",
    "pipeline_execution_number": "Dignissimos omnis aut.",
    "pipeline_name": "Iure debitis molestias aperiam a alias fugiat.",
    "pipeline_stage_id": "Sequi sapiente sunt.",
    "plugin_version": "Harum aliquid a amet alias et.",
    "results_uuid": "Incidunt maiores accusantium et laborum ea.",
    "trigger": {
      "Molestias hic ipsum sapiente nobis et labore.": "Fuga nam dignissimos sed maxime harum.",
      "Sunt animi et optio optio.": "Et cum.",
      "Totam voluptas porro in sint excepturi ea.": "Et vel sed et."
    }
  },
  "org": "3e",
  "playbooks": "At quos modi eligendi.",
  "project": "63"
}

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: y
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: rl
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: rl
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: pna
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: 3
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: 3
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: u
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: ["Inventore molestias vitae.","Est non ipsam dolor."]
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: ycb
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: ycb
Accept: */*
[
  {
    "account": "00",
    "ansible_galaxy": false,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Esse eaque dolorem sit voluptatem velit fuga.",
    "identifier": "Repellendus sed ipsam eligendi est et nobis.",
    "name": "test playbook",
    "org": "m",
    "project": "2ue",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Minus hic blanditiis magnam culpa delectus.",
      "Non est aut aliquam architecto ea.",
      "Officiis veniam.",
      "Odit hic cumque enim mollitia a velit."
    ],
    "updated": 1627686800,
    "vars": "Incidunt eum voluptatum ut."
  },
  {
    "account": "00",
    "ansible_galaxy": false,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Esse eaque dolorem sit voluptatem velit fuga.",
    "identifier": "Repellendus sed ipsam eligendi est et nobis.",
    "name": "test playbook",
    "org": "m",
    "project": "2ue",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Minus hic blanditiis magnam culpa delectus.",
      "Non est aut aliquam architecto ea.",
      "Officiis veniam.",
      "Odit hic cumque enim mollitia a velit."
    ],
    "updated": 1627686800,
    "vars": "Incidunt eum voluptatum ut."
  },
  {
    "account": "00",
    "ansible_galaxy": false,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Esse eaque dolorem sit voluptatem velit fuga.",
    "identifier": "Repellendus sed ipsam eligendi est et nobis.",
    "name": "test playbook",
    "org": "m",
    "project": "2ue",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Minus hic blanditiis magnam culpa delectus.",
      "Non est aut aliquam architecto ea.",
      "Officiis veniam.",
      "Odit hic cumque enim mollitia a velit."
    ],
    "updated": 1627686800,
    "vars": "Incidunt eum voluptatum ut."
  },
  {
    "account": "00",
    "ansible_galaxy": false,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Esse eaque dolorem sit voluptatem velit fuga.",
    "identifier": "Repellendus sed ipsam eligendi est et nobis.",
    "name": "test playbook",
    "org": "m",
    "project": "2ue",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Minus hic blanditiis magnam culpa delectus.",
      "Non est aut aliquam architecto ea.",
      "Officiis veniam.",
      "Odit hic cumque enim mollitia a velit."
    ],
    "updated": 1627686800,
    "vars": "Incidunt eum voluptatum ut."
  }
]

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: qmp
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: le
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: Impedit dolorum a dolorem tempore.
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: ["Impedit assumenda sit cumque id nobis.","Laudantium vero vel explicabo consequatur veniam.","Tenetur dignissimos et.","Enim nulla eos asperiores aut eaque."]
Responses
201

Created response.

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

Account is the internal customer account ID.

Example: m
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: Autem blanditiis omnis vel.
identifierstringRequired

The unique identifier for this playbook

Example: Aspernatur modi aspernatur quisquam.
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: qw
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: qr
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: ["Repellat fugit ab.","Quisquam ullam cupiditate ea aut fugiat assumenda.","Amet optio."]
updatedinteger · int64Required

Timestamp when the resource was last updated.

Example: 1627686800
varsstringOptional

The vars in the playbook

Example: Repellendus sed eveniet distinctio voluptatem ut modi.
post/api/orgs/{org}/ansible/playbook
POST /api/orgs/{org}/ansible/playbook HTTP/1.1
Host: localhost:80
Harness-Account: le
Content-Type: application/json
Accept: */*
Content-Length: 1431

{
  "ansible_galaxy": false,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "description": "Playbook for deploying web services to production",
  "env_vars": {
    "Eius autem et quasi velit vero sint.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  },
  "identifier": "Cum porro illum ut et.",
  "name": "test playbook",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Dolorem dolores eligendi libero corrupti blanditiis.",
    "Molestias accusamus sunt aliquid et.",
    "Quos eos hic velit.",
    "Qui aut perspiciatis."
  ],
  "vars": {
    "Maxime et sequi dolores.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    "Quia inventore aut.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    "Tenetur magnam.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  }
}
{
  "account": "fl",
  "ansible_galaxy": false,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "created": 1627590400,
  "description": "Playbook for deploying web services to production",
  "env_vars": "Sint et atque.",
  "identifier": "Pariatur voluptas laborum.",
  "name": "test playbook",
  "org": "jij",
  "policy_evaluation": {
    "account_id": "XRQAjvT37acOiXx9PRaQMF",
    "action": "onrun",
    "created": 1636370209475,
    "details": [
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      },
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "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": "vb0",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Aut dolores vel cumque ut maiores sed.",
    "Deserunt nulla impedit corporis officiis.",
    "Veritatis numquam nisi minus vitae nemo."
  ],
  "updated": 1627686800,
  "vars": "Numquam cumque."
}

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: i
identifierstringRequired

The unique identifier for this playbook

Example: Aut fuga expedita laboriosam ea in.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 52
Responses
200

OK response.

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

Account is the internal customer account ID.

Example: s8
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: Ut velit consequatur ut quod dolorem.
identifierstringRequired

The unique identifier for this playbook

Example: Corrupti similique est.
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: uhk
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: nfg
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: ["In et.","Commodi officiis id dolore mollitia eum repudiandae."]
updatedinteger · int64Required

Timestamp when the resource was last updated.

Example: 1627686800
varsstringOptional

The vars in the playbook

Example: Quas placeat tempore sunt quisquam.
get/api/orgs/{org}/ansible/playbook/{identifier}
GET /api/orgs/{org}/ansible/playbook/{identifier} HTTP/1.1
Host: localhost:80
Harness-Account: 52
Accept: */*
{
  "account": "0h",
  "ansible_galaxy": false,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "created": 1627590400,
  "description": "Playbook for deploying web services to production",
  "env_vars": "Possimus enim reprehenderit.",
  "identifier": "Velit illo.",
  "name": "test playbook",
  "org": "brl",
  "project": "yv",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Non accusantium doloribus.",
    "Quasi officiis non ducimus sit ipsa aspernatur."
  ],
  "updated": 1627686800,
  "vars": "Assumenda exercitationem vitae sint assumenda eos et."
}

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: w
identifierstringRequired

The unique identifier for this playbook

Example: Laborum repudiandae aspernatur corporis.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: lj
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: ["Asperiores dolores non.","Quis et qui error necessitatibus."]
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: lj
Content-Type: application/json
Accept: */*
Content-Length: 1196

{
  "ansible_galaxy": false,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "description": "Playbook for deploying web services to production",
  "env_vars": {
    "Facilis hic.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  },
  "name": "test playbook",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Vel esse fuga officia aperiam.",
    "In blanditiis eum facilis et soluta magnam.",
    "Dolor quia alias qui qui soluta.",
    "Mollitia eaque possimus libero labore."
  ],
  "vars": {
    "Doloremque fugit beatae reiciendis.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    "In dolores aliquam enim provident est.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  }
}
{
  "policy_evaluation": {
    "account_id": "XRQAjvT37acOiXx9PRaQMF",
    "action": "onrun",
    "created": 1636370209475,
    "details": [
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      },
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "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: 5
identifierstringRequired

The unique identifier for this playbook

Example: Aperiam consequatur qui sed.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 293
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: 293
Accept: */*

No content

Show the Configuration Variable Sets attached to an org level Ansible playbook

get

Show the Configuration Variable Sets attached to an org scoped playbook, in priority order.

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

Org is the organisation identifier.

Example: f7
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: ot
Responses
200

OK response.

application/json
get/api/orgs/{org}/ansible/playbook/{identifier}/configuration-variable-sets
GET /api/orgs/{org}/ansible/playbook/{identifier}/configuration-variable-sets HTTP/1.1
Host: localhost:80
Harness-Account: ot
Accept: */*
{
  "variable_sets": [
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    }
  ]
}

Replace the Configuration Variable Sets attached to an org level Ansible playbook

put

Replace the Configuration Variable Sets attached to an org scoped playbook. Array order is the priority order.

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

Org is the organisation identifier.

Example: 2wc
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: s0a
Body
variable_setsstring[]Required

Configuration Variable Sets to attach, in priority order. Replaces whatever is currently attached.

Example: ["account.shared_vars","playbook_vars"]
Responses
200

OK response.

application/json
put/api/orgs/{org}/ansible/playbook/{identifier}/configuration-variable-sets
PUT /api/orgs/{org}/ansible/playbook/{identifier}/configuration-variable-sets HTTP/1.1
Host: localhost:80
Harness-Account: s0a
Content-Type: application/json
Accept: */*
Content-Length: 57

{
  "variable_sets": [
    "account.shared_vars",
    "playbook_vars"
  ]
}
{
  "variable_sets": [
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    }
  ]
}

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: mh2
identifierstringRequired

Playbook identifier

Example: Voluptatem placeat.
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: jgf
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: jgf
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: 5
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: vkd
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: vkd
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 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: o31
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: 6ko
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: 6ko
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."
    },
    {
      "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

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: sh
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: 6u
Body
env_varsstring[]Optional

UUIDs of environment variables to delete.

Example: ["Nostrum vitae id alias sint doloremque.","Voluptatibus facilis cumque accusamus cumque voluptatem.","Repellat esse temporibus pariatur nemo beatae iusto.","Animi id voluptate laudantium."]
varsstring[]Optional

UUIDs of Ansible variables to delete.

Example: ["Non sed asperiores expedita.","Beatae eum aliquid perspiciatis iste.","Est veniam sint in cupiditate reiciendis officia."]
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: 6u
Content-Type: application/json
Accept: */*
Content-Length: 176

{
  "env_vars": [
    "Placeat quos qui dolor et.",
    "Sit tenetur."
  ],
  "vars": [
    "Ut ipsa ut ut labore fugit.",
    "Velit impedit tempora dolorum ut itaque voluptatibus.",
    "Dolorem in deleniti."
  ]
}

No content

Show the merged variables of an org level Ansible playbook

get

Show the playbook's variables followed by those of its attached Configuration Variable Sets, marking which entry wins each key.

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

Org is the organisation identifier.

Example: t9
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: jog
Responses
200

OK response.

application/json
get/api/orgs/{org}/ansible/playbook/{identifier}/vars/merged
GET /api/orgs/{org}/ansible/playbook/{identifier}/vars/merged HTTP/1.1
Host: localhost:80
Harness-Account: jog
Accept: */*
{
  "environment_variables": [
    {
      "associatedVariableSet": "Eos iusto.",
      "file_name": "Delectus magnam ex cum.",
      "inUse": false,
      "isLocked": false,
      "key": "Eligendi nam maxime dolores et blanditiis aut.",
      "priority": 263786966037862850,
      "source": "playbook",
      "uuid": "Iure labore non et.",
      "value": "Rem consequatur sed.",
      "value_type": "Eos tempora perspiciatis repellat in a."
    },
    {
      "associatedVariableSet": "Eos iusto.",
      "file_name": "Delectus magnam ex cum.",
      "inUse": false,
      "isLocked": false,
      "key": "Eligendi nam maxime dolores et blanditiis aut.",
      "priority": 263786966037862850,
      "source": "playbook",
      "uuid": "Iure labore non et.",
      "value": "Rem consequatur sed.",
      "value_type": "Eos tempora perspiciatis repellat in a."
    },
    {
      "associatedVariableSet": "Eos iusto.",
      "file_name": "Delectus magnam ex cum.",
      "inUse": false,
      "isLocked": false,
      "key": "Eligendi nam maxime dolores et blanditiis aut.",
      "priority": 263786966037862850,
      "source": "playbook",
      "uuid": "Iure labore non et.",
      "value": "Rem consequatur sed.",
      "value_type": "Eos tempora perspiciatis repellat in a."
    }
  ],
  "variables": [
    {
      "associatedVariableSet": "Eos iusto.",
      "file_name": "Delectus magnam ex cum.",
      "inUse": false,
      "isLocked": false,
      "key": "Eligendi nam maxime dolores et blanditiis aut.",
      "priority": 263786966037862850,
      "source": "playbook",
      "uuid": "Iure labore non et.",
      "value": "Rem consequatur sed.",
      "value_type": "Eos tempora perspiciatis repellat in a."
    },
    {
      "associatedVariableSet": "Eos iusto.",
      "file_name": "Delectus magnam ex cum.",
      "inUse": false,
      "isLocked": false,
      "key": "Eligendi nam maxime dolores et blanditiis aut.",
      "priority": 263786966037862850,
      "source": "playbook",
      "uuid": "Iure labore non et.",
      "value": "Rem consequatur sed.",
      "value_type": "Eos tempora perspiciatis repellat in a."
    },
    {
      "associatedVariableSet": "Eos iusto.",
      "file_name": "Delectus magnam ex cum.",
      "inUse": false,
      "isLocked": false,
      "key": "Eligendi nam maxime dolores et blanditiis aut.",
      "priority": 263786966037862850,
      "source": "playbook",
      "uuid": "Iure labore non et.",
      "value": "Rem consequatur sed.",
      "value_type": "Eos tempora perspiciatis repellat in a."
    },
    {
      "associatedVariableSet": "Eos iusto.",
      "file_name": "Delectus magnam ex cum.",
      "inUse": false,
      "isLocked": false,
      "key": "Eligendi nam maxime dolores et blanditiis aut.",
      "priority": 263786966037862850,
      "source": "playbook",
      "uuid": "Iure labore non et.",
      "value": "Rem consequatur sed.",
      "value_type": "Eos tempora perspiciatis repellat in a."
    }
  ]
}

List Ansible Activities

get

List all activities.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: 6
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:
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: Quam aliquid incidunt et a ut voluptate.
statusstringOptional

Activity status filter

Example: Praesentium amet.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: qk
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: qk
Accept: */*
[
  {
    "account": "p",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Et omnis aliquid soluta.",
    "metadata": {
      "activity_status": "Asperiores corrupti eligendi molestiae necessitatibus placeat.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Dolor quasi.",
      "git_commit_message": "Incidunt ut quo eius.",
      "git_commit_sha": "Eos est.",
      "git_repo": "Architecto mollitia ullam quisquam modi.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 2207448405191504000,
        "host_changed": 2079056670978617900,
        "host_failed": 8173270070248269000,
        "host_ok": 6413547484620333000,
        "host_skipped": 287100672014734080,
        "host_unreachable": 208021522580766000,
        "output_size_bytes": 2358811687401482000,
        "payload_size_bytes": 2873522630247883300,
        "total_hosts": 576374362686072450,
        "total_tasks": 5279973062797507000
      },
      "pipeline": "Esse quae provident soluta aut nemo veniam.",
      "pipeline_execution_id": "Asperiores at alias quia nisi numquam.",
      "pipeline_execution_number": "Optio beatae qui tempora molestiae.",
      "pipeline_name": "Officiis architecto asperiores quo quisquam fugit est.",
      "pipeline_stage_id": "Ut sapiente et rerum et impedit accusamus.",
      "plugin_version": "Aut iusto adipisci autem quo eos.",
      "results_uuid": "Aut aperiam quasi itaque dolores dolores nihil.",
      "trigger": {
        "Natus earum molestiae in sunt.": "In et perspiciatis quia qui vero sed."
      }
    },
    "org": "9",
    "playbooks": "Nostrum qui similique culpa laborum inventore.",
    "project": "n"
  },
  {
    "account": "p",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Et omnis aliquid soluta.",
    "metadata": {
      "activity_status": "Asperiores corrupti eligendi molestiae necessitatibus placeat.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Dolor quasi.",
      "git_commit_message": "Incidunt ut quo eius.",
      "git_commit_sha": "Eos est.",
      "git_repo": "Architecto mollitia ullam quisquam modi.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 2207448405191504000,
        "host_changed": 2079056670978617900,
        "host_failed": 8173270070248269000,
        "host_ok": 6413547484620333000,
        "host_skipped": 287100672014734080,
        "host_unreachable": 208021522580766000,
        "output_size_bytes": 2358811687401482000,
        "payload_size_bytes": 2873522630247883300,
        "total_hosts": 576374362686072450,
        "total_tasks": 5279973062797507000
      },
      "pipeline": "Esse quae provident soluta aut nemo veniam.",
      "pipeline_execution_id": "Asperiores at alias quia nisi numquam.",
      "pipeline_execution_number": "Optio beatae qui tempora molestiae.",
      "pipeline_name": "Officiis architecto asperiores quo quisquam fugit est.",
      "pipeline_stage_id": "Ut sapiente et rerum et impedit accusamus.",
      "plugin_version": "Aut iusto adipisci autem quo eos.",
      "results_uuid": "Aut aperiam quasi itaque dolores dolores nihil.",
      "trigger": {
        "Natus earum molestiae in sunt.": "In et perspiciatis quia qui vero sed."
      }
    },
    "org": "9",
    "playbooks": "Nostrum qui similique culpa laborum inventore.",
    "project": "n"
  },
  {
    "account": "p",
    "created": 1627590400,
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Et omnis aliquid soluta.",
    "metadata": {
      "activity_status": "Asperiores corrupti eligendi molestiae necessitatibus placeat.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Dolor quasi.",
      "git_commit_message": "Incidunt ut quo eius.",
      "git_commit_sha": "Eos est.",
      "git_repo": "Architecto mollitia ullam quisquam modi.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 2207448405191504000,
        "host_changed": 2079056670978617900,
        "host_failed": 8173270070248269000,
        "host_ok": 6413547484620333000,
        "host_skipped": 287100672014734080,
        "host_unreachable": 208021522580766000,
        "output_size_bytes": 2358811687401482000,
        "payload_size_bytes": 2873522630247883300,
        "total_hosts": 576374362686072450,
        "total_tasks": 5279973062797507000
      },
      "pipeline": "Esse quae provident soluta aut nemo veniam.",
      "pipeline_execution_id": "Asperiores at alias quia nisi numquam.",
      "pipeline_execution_number": "Optio beatae qui tempora molestiae.",
      "pipeline_name": "Officiis architecto asperiores quo quisquam fugit est.",
      "pipeline_stage_id": "Ut sapiente et rerum et impedit accusamus.",
      "plugin_version": "Aut iusto adipisci autem quo eos.",
      "results_uuid": "Aut aperiam quasi itaque dolores dolores nihil.",
      "trigger": {
        "Natus earum molestiae in sunt.": "In et perspiciatis quia qui vero sed."
      }
    },
    "org": "9",
    "playbooks": "Nostrum qui similique culpa laborum inventore.",
    "project": "n"
  }
]

Show ansible activity

get

Show an individual ansible activity.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: 1eu
idstringRequired

The unique ID for this activity

Example: Doloribus minus.
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: tvl
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: Vel quos.
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: rq
playbooksstringRequired

Playbooks associated with this event

Example: Quia officiis corporis impedit.
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: h9a
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: l
Accept: */*
{
  "account": "f6",
  "created": 1627590400,
  "event_type": "activity-execution",
  "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
  "inventories": "Cumque dolor nulla minima.",
  "metadata": {
    "activity_status": "Laudantium explicabo ab consequatur eius quo est.",
    "filters": "tags=deploy skip-tags=slow limit=web",
    "git_branch": "Sed ipsum.",
    "git_commit_message": "Sed provident molestias esse doloribus quaerat.",
    "git_commit_sha": "Quam ut.",
    "git_repo": "Sapiente dicta et.",
    "metrics": {
      "circuit_breaker_triggered": true,
      "duration_ms": 9161572224745659000,
      "host_changed": 5514210248796778000,
      "host_failed": 5342935301463969000,
      "host_ok": 789357644943662800,
      "host_skipped": 6103133485534346000,
      "host_unreachable": 5270124757667744000,
      "output_size_bytes": 8384655139211878000,
      "payload_size_bytes": 3699728170190409700,
      "total_hosts": 3416993616293762000,
      "total_tasks": 3019149475344072000
    },
    "pipeline": "Sunt hic.",
    "pipeline_execution_id": "Nesciunt aliquid dolorum.",
    "pipeline_execution_number": "Dignissimos omnis aut.",
    "pipeline_name": "Iure debitis molestias aperiam a alias fugiat.",
    "pipeline_stage_id": "Sequi sapiente sunt.",
    "plugin_version": "Harum aliquid a amet alias et.",
    "results_uuid": "Incidunt maiores accusantium et laborum ea.",
    "trigger": {
      "Molestias hic ipsum sapiente nobis et labore.": "Fuga nam dignissimos sed maxime harum.",
      "Sunt animi et optio optio.": "Et cum.",
      "Totam voluptas porro in sint excepturi ea.": "Et vel sed et."
    }
  },
  "org": "2w",
  "playbooks": "Quo eum minima non et blanditiis nobis.",
  "project": "323"
}

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: m
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: qer
Query parameters
inventory_search_termstringOptional

Inventory search term

Example: Et natus omnis culpa saepe impedit officiis.
playbook_search_termstringOptional

Playbook search term

Example: Molestias qui at vel.
pipeline_execution_idstringOptional

Filter by pipeline execution ID

Example: Tenetur repudiandae hic inventore dolores.
pipeline_stage_idstringOptional

Filter by pipeline execution stage ID

Example: Nemo molestias quia similique nihil.
data_typestringOptional

Filter by data type

Example: Repellat quia consequatur ullam et aut vitae.
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: 9k
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: 9k
Accept: */*
[
  {
    "account": "0e",
    "created": 2350256041668392400,
    "data_type": "task_results",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Et enim.",
    "org": "rc",
    "pipeline_execution_id": "Aliquid est.",
    "pipeline_id": "Enim vero.",
    "pipeline_stage_id": "Incidunt nihil.",
    "playbooks": "Ea perspiciatis.",
    "project": "f",
    "stage_id": "Perspiciatis deleniti."
  },
  {
    "account": "0e",
    "created": 2350256041668392400,
    "data_type": "task_results",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Et enim.",
    "org": "rc",
    "pipeline_execution_id": "Aliquid est.",
    "pipeline_id": "Enim vero.",
    "pipeline_stage_id": "Incidunt nihil.",
    "playbooks": "Ea perspiciatis.",
    "project": "f",
    "stage_id": "Perspiciatis deleniti."
  },
  {
    "account": "0e",
    "created": 2350256041668392400,
    "data_type": "task_results",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Et enim.",
    "org": "rc",
    "pipeline_execution_id": "Aliquid est.",
    "pipeline_id": "Enim vero.",
    "pipeline_stage_id": "Incidunt nihil.",
    "playbooks": "Ea perspiciatis.",
    "project": "f",
    "stage_id": "Perspiciatis deleniti."
  },
  {
    "account": "0e",
    "created": 2350256041668392400,
    "data_type": "task_results",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Et enim.",
    "org": "rc",
    "pipeline_execution_id": "Aliquid est.",
    "pipeline_id": "Enim vero.",
    "pipeline_stage_id": "Incidunt nihil.",
    "playbooks": "Ea perspiciatis.",
    "project": "f",
    "stage_id": "Perspiciatis deleniti."
  }
]

Create data

post

Store binary data generated by ansible.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: b
Query parameters
pipeline_idstringOptional

The unique identifier for the associated pipeline

Example: Sint officiis.
stage_idstringOptional

The unique identifier for a stage

Example: Voluptatibus consectetur ab voluptatem et.
pipeline_execution_idstringOptional

The unique identifier for the associated pipeline execution

Example: Qui blanditiis iure et numquam aspernatur.
pipeline_stage_idstringOptional

The unique identifier for the associated pipeline execution stage

Example: Alias eos quasi vero eum.
data_typestring · enumRequired

Type of data stored

Example: task_resultsPossible values:
inventoriesstringRequired

Inventories associated with this event

Example: Maiores voluptas ut exercitationem quas.
playbooksstringRequired

Playbooks associated with this event

Example: Reiciendis voluptate reprehenderit.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: hz
Content-Lengthinteger · int64Optional

Size in bytes of the data.

Example: 8780057064829280000
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=Maiores+voluptas+ut+exercitationem+quas.&playbooks=Reiciendis+voluptate+reprehenderit. HTTP/1.1
Host: localhost:80
Harness-Account: hz
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: t6a
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: d0l
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: fo
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: fo
Accept: */*
binary

Send event

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

Org is the organisation identifier.

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

Project is the project identifier.

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

Account is the internal customer account ID.

Example: ml
Body
event_typestring · enumRequired

The type of event that occurred

Example: activity-executionPossible values:
inventoriesstringRequired

Inventories associated with this event

Example: Officiis et.
playbooksstringRequired

Playbooks associated with this event

Example: Aliquid esse optio quis.
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: ml
Content-Type: application/json
Accept: */*
Content-Length: 1470

{
  "event_type": "activity-execution",
  "inventories": "Ab labore pariatur excepturi maiores temporibus qui.",
  "metadata": {
    "activity_status": "Veritatis dolor neque est debitis voluptatibus.",
    "filters": "tags=deploy skip-tags=slow limit=web",
    "git_branch": "Odit harum quae libero.",
    "git_commit_message": "Qui qui.",
    "git_commit_sha": "Aperiam qui.",
    "git_repo": "Quia facilis et dolorem.",
    "metrics": {
      "circuit_breaker_triggered": true,
      "duration_ms": 2043801709080825000,
      "host_changed": 4057267570942028000,
      "host_failed": 3707266954518219000,
      "host_ok": 4810081728302588000,
      "host_skipped": 5346632941462350000,
      "host_unreachable": 7779238609871096000,
      "output_size_bytes": 1669411483146353000,
      "payload_size_bytes": 6855264911990905000,
      "total_hosts": 1389352106354418400,
      "total_tasks": 5248801648614673000
    },
    "pipeline": "Ut accusantium fugit aut maiores.",
    "pipeline_execution_id": "Fugiat accusantium.",
    "pipeline_execution_number": "Nulla fugiat repellat.",
    "pipeline_name": "Illo nesciunt odit delectus ut blanditiis.",
    "pipeline_stage_id": "Sint perspiciatis debitis labore voluptatem perspiciatis qui.",
    "plugin_version": "Ut ut architecto recusandae odio.",
    "results_uuid": "Cumque consectetur occaecati.",
    "trigger": {
      "Et praesentium aspernatur doloremque.": "Fugiat autem voluptate necessitatibus ipsum unde.",
      "Sed amet reiciendis quod sed perspiciatis non.": "Et quos.",
      "Veritatis perferendis similique quibusdam consequatur.": "Rerum molestias numquam cupiditate est quo."
    }
  },
  "playbooks": "Repellendus nesciunt."
}

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: d
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: jt
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: 9
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: 9
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: p
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: d3
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: 7w
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: 7w
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: g45
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: l
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: vl
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: vl
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: a1
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: k
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: m
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: m
Accept: */*
[
  {
    "account": "1",
    "created": 1627590400,
    "data": "Tempore voluptatem impedit fugit.",
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Numquam aut quae et nisi.",
    "metadata": {
      "activity_status": "Asperiores corrupti eligendi molestiae necessitatibus placeat.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Dolor quasi.",
      "git_commit_message": "Incidunt ut quo eius.",
      "git_commit_sha": "Eos est.",
      "git_repo": "Architecto mollitia ullam quisquam modi.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 2207448405191504000,
        "host_changed": 2079056670978617900,
        "host_failed": 8173270070248269000,
        "host_ok": 6413547484620333000,
        "host_skipped": 287100672014734080,
        "host_unreachable": 208021522580766000,
        "output_size_bytes": 2358811687401482000,
        "payload_size_bytes": 2873522630247883300,
        "total_hosts": 576374362686072450,
        "total_tasks": 5279973062797507000
      },
      "pipeline": "Esse quae provident soluta aut nemo veniam.",
      "pipeline_execution_id": "Asperiores at alias quia nisi numquam.",
      "pipeline_execution_number": "Optio beatae qui tempora molestiae.",
      "pipeline_name": "Officiis architecto asperiores quo quisquam fugit est.",
      "pipeline_stage_id": "Ut sapiente et rerum et impedit accusamus.",
      "plugin_version": "Aut iusto adipisci autem quo eos.",
      "results_uuid": "Aut aperiam quasi itaque dolores dolores nihil.",
      "trigger": {
        "Natus earum molestiae in sunt.": "In et perspiciatis quia qui vero sed."
      }
    },
    "org": "vy",
    "playbooks": "Voluptates quae.",
    "project": "z0p",
    "status": "ok"
  },
  {
    "account": "1",
    "created": 1627590400,
    "data": "Tempore voluptatem impedit fugit.",
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Numquam aut quae et nisi.",
    "metadata": {
      "activity_status": "Asperiores corrupti eligendi molestiae necessitatibus placeat.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Dolor quasi.",
      "git_commit_message": "Incidunt ut quo eius.",
      "git_commit_sha": "Eos est.",
      "git_repo": "Architecto mollitia ullam quisquam modi.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 2207448405191504000,
        "host_changed": 2079056670978617900,
        "host_failed": 8173270070248269000,
        "host_ok": 6413547484620333000,
        "host_skipped": 287100672014734080,
        "host_unreachable": 208021522580766000,
        "output_size_bytes": 2358811687401482000,
        "payload_size_bytes": 2873522630247883300,
        "total_hosts": 576374362686072450,
        "total_tasks": 5279973062797507000
      },
      "pipeline": "Esse quae provident soluta aut nemo veniam.",
      "pipeline_execution_id": "Asperiores at alias quia nisi numquam.",
      "pipeline_execution_number": "Optio beatae qui tempora molestiae.",
      "pipeline_name": "Officiis architecto asperiores quo quisquam fugit est.",
      "pipeline_stage_id": "Ut sapiente et rerum et impedit accusamus.",
      "plugin_version": "Aut iusto adipisci autem quo eos.",
      "results_uuid": "Aut aperiam quasi itaque dolores dolores nihil.",
      "trigger": {
        "Natus earum molestiae in sunt.": "In et perspiciatis quia qui vero sed."
      }
    },
    "org": "vy",
    "playbooks": "Voluptates quae.",
    "project": "z0p",
    "status": "ok"
  },
  {
    "account": "1",
    "created": 1627590400,
    "data": "Tempore voluptatem impedit fugit.",
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Numquam aut quae et nisi.",
    "metadata": {
      "activity_status": "Asperiores corrupti eligendi molestiae necessitatibus placeat.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Dolor quasi.",
      "git_commit_message": "Incidunt ut quo eius.",
      "git_commit_sha": "Eos est.",
      "git_repo": "Architecto mollitia ullam quisquam modi.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 2207448405191504000,
        "host_changed": 2079056670978617900,
        "host_failed": 8173270070248269000,
        "host_ok": 6413547484620333000,
        "host_skipped": 287100672014734080,
        "host_unreachable": 208021522580766000,
        "output_size_bytes": 2358811687401482000,
        "payload_size_bytes": 2873522630247883300,
        "total_hosts": 576374362686072450,
        "total_tasks": 5279973062797507000
      },
      "pipeline": "Esse quae provident soluta aut nemo veniam.",
      "pipeline_execution_id": "Asperiores at alias quia nisi numquam.",
      "pipeline_execution_number": "Optio beatae qui tempora molestiae.",
      "pipeline_name": "Officiis architecto asperiores quo quisquam fugit est.",
      "pipeline_stage_id": "Ut sapiente et rerum et impedit accusamus.",
      "plugin_version": "Aut iusto adipisci autem quo eos.",
      "results_uuid": "Aut aperiam quasi itaque dolores dolores nihil.",
      "trigger": {
        "Natus earum molestiae in sunt.": "In et perspiciatis quia qui vero sed."
      }
    },
    "org": "vy",
    "playbooks": "Voluptates quae.",
    "project": "z0p",
    "status": "ok"
  },
  {
    "account": "1",
    "created": 1627590400,
    "data": "Tempore voluptatem impedit fugit.",
    "event_type": "activity-execution",
    "id": "dc538c61-de48-4220-958c-5f3c4f983daa",
    "inventories": "Numquam aut quae et nisi.",
    "metadata": {
      "activity_status": "Asperiores corrupti eligendi molestiae necessitatibus placeat.",
      "filters": "tags=deploy skip-tags=slow limit=web",
      "git_branch": "Dolor quasi.",
      "git_commit_message": "Incidunt ut quo eius.",
      "git_commit_sha": "Eos est.",
      "git_repo": "Architecto mollitia ullam quisquam modi.",
      "metrics": {
        "circuit_breaker_triggered": false,
        "duration_ms": 2207448405191504000,
        "host_changed": 2079056670978617900,
        "host_failed": 8173270070248269000,
        "host_ok": 6413547484620333000,
        "host_skipped": 287100672014734080,
        "host_unreachable": 208021522580766000,
        "output_size_bytes": 2358811687401482000,
        "payload_size_bytes": 2873522630247883300,
        "total_hosts": 576374362686072450,
        "total_tasks": 5279973062797507000
      },
      "pipeline": "Esse quae provident soluta aut nemo veniam.",
      "pipeline_execution_id": "Asperiores at alias quia nisi numquam.",
      "pipeline_execution_number": "Optio beatae qui tempora molestiae.",
      "pipeline_name": "Officiis architecto asperiores quo quisquam fugit est.",
      "pipeline_stage_id": "Ut sapiente et rerum et impedit accusamus.",
      "plugin_version": "Aut iusto adipisci autem quo eos.",
      "results_uuid": "Aut aperiam quasi itaque dolores dolores nihil.",
      "trigger": {
        "Natus earum molestiae in sunt.": "In et perspiciatis quia qui vero sed."
      }
    },
    "org": "vy",
    "playbooks": "Voluptates quae.",
    "project": "z0p",
    "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: o
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 1j
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: oyr
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: oyr
Accept: */*
[
  {
    "account": "sf",
    "created": 1627590400,
    "description": "Production infrastructure inventory",
    "identifier": "test_inventory",
    "name": "test inventory",
    "org": "mw",
    "project": "h",
    "tags": [
      "Ullam sit aut cupiditate quas.",
      "Aliquam amet provident inventore cumque eligendi.",
      "Atque qui aspernatur repudiandae voluptate consequuntur non."
    ],
    "type": "plugin",
    "updated": 1627686800
  },
  {
    "account": "sf",
    "created": 1627590400,
    "description": "Production infrastructure inventory",
    "identifier": "test_inventory",
    "name": "test inventory",
    "org": "mw",
    "project": "h",
    "tags": [
      "Ullam sit aut cupiditate quas.",
      "Aliquam amet provident inventore cumque eligendi.",
      "Atque qui aspernatur repudiandae voluptate consequuntur non."
    ],
    "type": "plugin",
    "updated": 1627686800
  },
  {
    "account": "sf",
    "created": 1627590400,
    "description": "Production infrastructure inventory",
    "identifier": "test_inventory",
    "name": "test inventory",
    "org": "mw",
    "project": "h",
    "tags": [
      "Ullam sit aut cupiditate quas.",
      "Aliquam amet provident inventore cumque eligendi.",
      "Atque qui aspernatur repudiandae voluptate consequuntur non."
    ],
    "type": "plugin",
    "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: t
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 3
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: bne
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: bne
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: t
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: ckj
Query parameters
searchTermstringOptional

Search term to filter hosts by name

Example: Sit voluptatem qui voluptas at expedita molestiae.
inventorystringOptional

Filter results by inventory identifier

Example: Vel dolorum nihil in illum et quo.
statusstring · enumOptional

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

Example: okPossible 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: om1
Responses
200

OK response.

text/csv
string · binaryOptionalExample: [68,101,98,105,116,105,115,32,98,108,97,110,100,105,116,105,105,115,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: om1
Accept: */*
[
  86,
  101,
  108,
  32,
  118,
  111,
  108,
  117,
  112,
  116,
  97,
  116,
  117,
  109,
  32,
  109,
  105,
  110,
  117,
  115,
  32,
  97,
  117,
  116,
  101,
  109,
  32,
  118,
  105,
  116,
  97,
  101,
  32,
  97,
  98,
  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: a23
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 66
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: 1
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: 1
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: 4
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 7
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,ASCPossible values:
includeDetailsbooleanOptional

Include inventory details

Default: falseExample: false
tagsstring[]Optional

Filter results by tags (OR logic, exact match)

Example: ["Culpa enim qui nesciunt non reiciendis perspiciatis.","Ut fugiat iste eaque accusantium autem.","Doloribus incidunt ut.","Labore et quia voluptatem non."]
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: v36
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: v36
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: zjo
projectstring · min: 1 · max: 128Required

Project is the project identifier.

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

Account is the internal customer account ID.

Example: h
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: ["Rerum illum debitis quia.","Consectetur quia.","Est similique aut rerum et."]
typestring · enumRequired

Type indicates what kind of inventory this is

Example: pluginPossible values:
Responses
201

Created response.

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

Account is the internal customer account ID.

Example: x
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: 7
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: y8h
tagsstring[]Optional

Tags associated with the inventory

Example: ["Pariatur eum esse cum explicabo.","Quasi possimus veritatis animi excepturi."]
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: h
Content-Type: application/json
Accept: */*
Content-Length: 1169

{
  "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": [
    "Corrupti laboriosam quia sit ab non reprehenderit.",
    "Iste modi sapiente vitae nemo."
  ],
  "type": "remote",
  "vars": [
    {
      "name": "my-var",
      "value": "my-value"
    }
  ]
}
{
  "account": "t",
  "created": 1627590400,
  "description": "Production infrastructure inventory",
  "identifier": "test_inventory",
  "name": "test inventory",
  "org": "04w",
  "policy_evaluation": {
    "account_id": "XRQAjvT37acOiXx9PRaQMF",
    "action": "onrun",
    "created": 1636370209475,
    "details": [
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      },
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "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": "txf",
  "tags": [
    "Iusto dolorem.",
    "Et voluptatem nemo velit rerum.",
    "Vel esse cumque iste accusantium ut quisquam.",
    "Ullam facere dolorem sequi."
  ],
  "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: ch4
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: sm
identifierstringRequired

Inventory identifier

Example: Eveniet commodi aperiam.
Query parameters
useArraysbooleanOptional

Use arrays when displaying inventory data

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

Account is the internal customer account ID.

Example: i9
Responses
200

OK response.

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

Account is the internal customer account ID.

Example: gn
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: q08
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: jt
tagsstring[]Optional

Tags associated with the inventory

Example: ["Voluptate non vitae.","Quo pariatur."]
typestring · enumRequired

Type indicates what kind of inventory this is

Example: manualPossible 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: i9
Accept: */*
{
  "account": "vs",
  "created": 1627590400,
  "data": "{ \"hosts\": { \"host1.example.com\": null, \"host2.example.com\": null }}",
  "description": "Production infrastructure inventory",
  "identifier": "test_inventory",
  "name": "test inventory",
  "org": "gi",
  "project": "lb",
  "tags": [
    "Amet nostrum nisi officia nesciunt placeat minus.",
    "Repudiandae et ratione beatae.",
    "Eum dolorum ad."
  ],
  "type": "plugin",
  "updated": 1627686800
}

Update Ansible inventory

put

Update an existing inventory.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: 49c
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: v
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: ["Modi atque.","Quam omnis excepturi in quo.","Consequatur error."]
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: v
Content-Type: application/json
Accept: */*
Content-Length: 266

{
  "data": "{ \"hosts\": { \"host1.example.com\": null, \"host2.example.com\": null }}",
  "description": "Production infrastructure inventory",
  "name": "test inventory",
  "tags": [
    "Provident rem sit debitis.",
    "Nostrum quo modi minus iure possimus.",
    "Ipsum praesentium ipsam."
  ]
}
{
  "policy_evaluation": {
    "account_id": "XRQAjvT37acOiXx9PRaQMF",
    "action": "onrun",
    "created": 1636370209475,
    "details": [
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      },
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "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: u6r
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: s
identifierstringRequired

The unique identifier for this inventory

Example: Adipisci ipsam repellendus.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 0t
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: 0t
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: j
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 7
identifierstringRequired

The unique identifier for this inventory

Example: Architecto deleniti at omnis dolor et ad.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 8o
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: 8o
Accept: */*
Et totam quam odit.: Iure fugiat vel fugit magni odit.

Show the Configuration Variable Sets attached to an Ansible inventory

get

Show the Configuration Variable Sets attached to an inventory, in priority order.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: 6
identifierstringRequired

The unique identifier for this inventory

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

Account is the internal customer account ID.

Example: m
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/configuration-variable-sets
GET /api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/configuration-variable-sets HTTP/1.1
Host: localhost:80
Harness-Account: m
Accept: */*
{
  "variable_sets": [
    {
      "account": "Aliquid et tempore qui fuga.",
      "identifier": "Consectetur vitae voluptatibus facere at.",
      "name": "Illum ea qui qui in debitis est.",
      "org": "Ipsum magni.",
      "priority": 7430631998693841000,
      "project": "Possimus voluptas sed amet repellendus.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Aliquid et tempore qui fuga.",
      "identifier": "Consectetur vitae voluptatibus facere at.",
      "name": "Illum ea qui qui in debitis est.",
      "org": "Ipsum magni.",
      "priority": 7430631998693841000,
      "project": "Possimus voluptas sed amet repellendus.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Aliquid et tempore qui fuga.",
      "identifier": "Consectetur vitae voluptatibus facere at.",
      "name": "Illum ea qui qui in debitis est.",
      "org": "Ipsum magni.",
      "priority": 7430631998693841000,
      "project": "Possimus voluptas sed amet repellendus.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Aliquid et tempore qui fuga.",
      "identifier": "Consectetur vitae voluptatibus facere at.",
      "name": "Illum ea qui qui in debitis est.",
      "org": "Ipsum magni.",
      "priority": 7430631998693841000,
      "project": "Possimus voluptas sed amet repellendus.",
      "variable_set": "account.shared_vars"
    }
  ]
}

Replace the Configuration Variable Sets attached to an Ansible inventory

put

Replace the Configuration Variable Sets attached to an inventory. Array order is the priority order.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: n
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: 0a4
Body
variable_setsstring[]Required

Configuration Variable Sets to attach, in priority order. Replaces whatever is currently attached.

Example: ["account.shared_vars","inventory_vars"]
Responses
200

OK response.

application/json
put/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/configuration-variable-sets
PUT /api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/configuration-variable-sets HTTP/1.1
Host: localhost:80
Harness-Account: 0a4
Content-Type: application/json
Accept: */*
Content-Length: 58

{
  "variable_sets": [
    "account.shared_vars",
    "inventory_vars"
  ]
}
{
  "variable_sets": [
    {
      "account": "Aliquid et tempore qui fuga.",
      "identifier": "Consectetur vitae voluptatibus facere at.",
      "name": "Illum ea qui qui in debitis est.",
      "org": "Ipsum magni.",
      "priority": 7430631998693841000,
      "project": "Possimus voluptas sed amet repellendus.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Aliquid et tempore qui fuga.",
      "identifier": "Consectetur vitae voluptatibus facere at.",
      "name": "Illum ea qui qui in debitis est.",
      "org": "Ipsum magni.",
      "priority": 7430631998693841000,
      "project": "Possimus voluptas sed amet repellendus.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Aliquid et tempore qui fuga.",
      "identifier": "Consectetur vitae voluptatibus facere at.",
      "name": "Illum ea qui qui in debitis est.",
      "org": "Ipsum magni.",
      "priority": 7430631998693841000,
      "project": "Possimus voluptas sed amet repellendus.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Aliquid et tempore qui fuga.",
      "identifier": "Consectetur vitae voluptatibus facere at.",
      "name": "Illum ea qui qui in debitis est.",
      "org": "Ipsum magni.",
      "priority": 7430631998693841000,
      "project": "Possimus voluptas sed amet repellendus.",
      "variable_set": "account.shared_vars"
    }
  ]
}

Show Ansible inventory groups

get

Show an individual inventory's groups.

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: hph
identifierstringRequired

Inventory identifier

Example: Ex nostrum corrupti quasi voluptatibus et.
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: 58
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: 58
Accept: */*
{
  "groups": [
    "Corrupti ut ut qui harum.",
    "Dolor sed iste blanditiis qui eaque.",
    "Et voluptate non ut eius veritatis nemo.",
    "Molestiae libero placeat est."
  ]
}

Show Ansible inventory hosts

get

Show an individual inventory hosts.

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

Org is the organisation identifier.

Example: 6y
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 90t
identifierstringRequired

Inventory identifier

Example: Saepe explicabo incidunt autem 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
groupstringOptional

Filter results by group

Default: ""Example: Corrupti sit dolore tenetur nobis.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: yu
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: yu
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: c
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 7wa
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: 41
Body
groupsstring[]Optional

Groups is the list of groups the host belongs to.

Example: ["Et aut voluptatem eum voluptatibus in temporibus.","Ipsa impedit possimus modi esse sit autem."]
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: 41
Content-Type: application/json
Accept: */*
Content-Length: 1102

{
  "env_vars": [
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  ],
  "groups": [
    "Eligendi in et.",
    "Nemo maxime."
  ],
  "host_address": "host1.example.com",
  "vars": [
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  ]
}

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: f
projectstring · min: 1 · max: 128Required

Project is the project identifier.

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

The identifier of the inventory to replace.

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

Account is the internal customer account ID.

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

Raw inventory content.

Example: o
formatstring · enumRequired

Source format of the content.

Example: iniPossible values:
Responses
200

OK response.

application/json
warningsstring[]Required

Warnings surfaced during replace.

Example: ["Sequi impedit ex perferendis pariatur quia.","Quasi voluptatem alias labore eum ratione."]
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: wuh
Content-Type: application/json
Accept: */*
Content-Length: 32

{
  "content": "npr",
  "format": "ini"
}
{
  "warnings": [
    "Reprehenderit cupiditate qui aliquid qui est tempore.",
    "Vero est ipsa provident soluta."
  ]
}

Update Ansible plugin inventory

put

Update an existing plugin inventory configuration.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: 0p2
identifierstringRequired

Inventory identifier

Example: Et ut culpa.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: lw4
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: lw4
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"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      },
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "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: ueo
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: x
identifierstringRequired

Inventory identifier

Example: Consequatur qui qui optio.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: rv
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: rv
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"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      },
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "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: kq
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: i1
identifierstringRequired

Inventory identifier

Example: Nobis nulla voluptatem vitae tempore eos.
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/inventory/{identifier}/vars
GET /api/orgs/{org}/projects/{project}/ansible/inventory/{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 Ansible inventory variables

post

Create new inventory variables.

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: q2
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: bq
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: bq
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 Ansible inventory variables

put

Update existing inventory variables.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: xd9
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: o
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: o
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

Show the merged variables of an Ansible inventory

get

Show the inventory's variables followed by those of its attached Configuration Variable Sets, marking which entry wins each key.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: m
identifierstringRequired

The unique identifier for this inventory

Example: Expedita pariatur occaecati.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: y7
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/vars/merged
GET /api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/vars/merged HTTP/1.1
Host: localhost:80
Harness-Account: y7
Accept: */*
{
  "environment_variables": [
    {
      "associatedVariableSet": "Culpa corporis soluta.",
      "file_name": "Aut reprehenderit dolor aliquam beatae magnam.",
      "inUse": true,
      "isLocked": false,
      "key": "Cum sint error sunt.",
      "priority": 8347368980599866000,
      "source": "variableSet",
      "uuid": "Cum aut id rerum atque qui.",
      "value": "Dolorem similique deserunt doloremque veritatis.",
      "value_type": "Esse omnis."
    },
    {
      "associatedVariableSet": "Culpa corporis soluta.",
      "file_name": "Aut reprehenderit dolor aliquam beatae magnam.",
      "inUse": true,
      "isLocked": false,
      "key": "Cum sint error sunt.",
      "priority": 8347368980599866000,
      "source": "variableSet",
      "uuid": "Cum aut id rerum atque qui.",
      "value": "Dolorem similique deserunt doloremque veritatis.",
      "value_type": "Esse omnis."
    },
    {
      "associatedVariableSet": "Culpa corporis soluta.",
      "file_name": "Aut reprehenderit dolor aliquam beatae magnam.",
      "inUse": true,
      "isLocked": false,
      "key": "Cum sint error sunt.",
      "priority": 8347368980599866000,
      "source": "variableSet",
      "uuid": "Cum aut id rerum atque qui.",
      "value": "Dolorem similique deserunt doloremque veritatis.",
      "value_type": "Esse omnis."
    },
    {
      "associatedVariableSet": "Culpa corporis soluta.",
      "file_name": "Aut reprehenderit dolor aliquam beatae magnam.",
      "inUse": true,
      "isLocked": false,
      "key": "Cum sint error sunt.",
      "priority": 8347368980599866000,
      "source": "variableSet",
      "uuid": "Cum aut id rerum atque qui.",
      "value": "Dolorem similique deserunt doloremque veritatis.",
      "value_type": "Esse omnis."
    }
  ],
  "variables": [
    {
      "associatedVariableSet": "Culpa corporis soluta.",
      "file_name": "Aut reprehenderit dolor aliquam beatae magnam.",
      "inUse": true,
      "isLocked": false,
      "key": "Cum sint error sunt.",
      "priority": 8347368980599866000,
      "source": "variableSet",
      "uuid": "Cum aut id rerum atque qui.",
      "value": "Dolorem similique deserunt doloremque veritatis.",
      "value_type": "Esse omnis."
    },
    {
      "associatedVariableSet": "Culpa corporis soluta.",
      "file_name": "Aut reprehenderit dolor aliquam beatae magnam.",
      "inUse": true,
      "isLocked": false,
      "key": "Cum sint error sunt.",
      "priority": 8347368980599866000,
      "source": "variableSet",
      "uuid": "Cum aut id rerum atque qui.",
      "value": "Dolorem similique deserunt doloremque veritatis.",
      "value_type": "Esse omnis."
    },
    {
      "associatedVariableSet": "Culpa corporis soluta.",
      "file_name": "Aut reprehenderit dolor aliquam beatae magnam.",
      "inUse": true,
      "isLocked": false,
      "key": "Cum sint error sunt.",
      "priority": 8347368980599866000,
      "source": "variableSet",
      "uuid": "Cum aut id rerum atque qui.",
      "value": "Dolorem similique deserunt doloremque veritatis.",
      "value_type": "Esse omnis."
    },
    {
      "associatedVariableSet": "Culpa corporis soluta.",
      "file_name": "Aut reprehenderit dolor aliquam beatae magnam.",
      "inUse": true,
      "isLocked": false,
      "key": "Cum sint error sunt.",
      "priority": 8347368980599866000,
      "source": "variableSet",
      "uuid": "Cum aut id rerum atque qui.",
      "value": "Dolorem similique deserunt doloremque veritatis.",
      "value_type": "Esse omnis."
    }
  ]
}

Create Ansible inventory group

post

Create a new inventory group.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: g
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: v
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: ["Voluptas qui vero est.","Ea non voluptatem vel neque qui praesentium."]
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: v
Content-Type: application/json
Accept: */*
Content-Length: 2445

{
  "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": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  ],
  "env_vars": [
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  ],
  "hosts": [
    "Sint nam.",
    "Deserunt sed.",
    "Numquam molestiae explicabo quos quis."
  ],
  "identifier": "test_group",
  "name": "My Group",
  "vars": [
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  ]
}

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: mz
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: xe
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: 0
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: ["Rem odio aspernatur quidem.","Et et qui libero a consequatur quia."]
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: 0
Content-Type: application/json
Accept: */*
Content-Length: 2833

{
  "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": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  ],
  "env_vars": [
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  ],
  "hosts": [
    "In quis sit molestiae itaque mollitia.",
    "Facere inventore officiis dicta labore."
  ],
  "name": "My Group",
  "vars": [
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  ]
}

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: 5b
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: mfo
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: w5a
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: w5a
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: 0p
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 3
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: oj
Body
groupsstring[]Optional

Groups is the list of groups the host belongs to.

Example: ["Voluptatem enim aspernatur vel eum.","Voluptatem consequatur maiores nemo.","Rem iste maiores est at."]
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: oj
Content-Type: application/json
Accept: */*
Content-Length: 1405

{
  "env_vars": [
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  ],
  "groups": [
    "Eos non placeat incidunt error.",
    "Enim molestiae molestiae et quidem deleniti ut.",
    "Vitae omnis qui eum dolores.",
    "Fugit qui hic officia consequuntur excepturi commodi."
  ],
  "vars": [
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  ]
}

No content

Delete Ansible inventory host

delete

Delete a inventory host.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: 0zm
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: op1
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: op1
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: ub
projectstring · min: 1 · max: 128Required

Project is the project identifier.

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

Account is the internal customer account ID.

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

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

Example: 0
formatstring · enumRequired

Source format of the content.

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

The identifier of the new inventory.

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

Display name of the new inventory.

Example: 5w0
tagsstring[]Optional

Optional tags to apply to the new inventory.

Example: ["Et et facere laboriosam aut est et.","Numquam atque.","Sit et.","Placeat dolor necessitatibus fuga et aut qui."]
Responses
201

Created response.

application/json
warningsstring[]Required

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

Example: ["Voluptas officiis facilis est.","Labore sequi.","Ut libero.","Reiciendis voluptatem reiciendis laboriosam eos accusamus."]
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: b
Content-Type: application/json
Accept: */*
Content-Length: 206

{
  "content": "h",
  "format": "ini",
  "identifier": "o",
  "name": "e",
  "tags": [
    "Vitae aut voluptatem corporis.",
    "Quibusdam et sapiente accusantium sed.",
    "Et libero quae laboriosam ut.",
    "Est commodi sed natus tempora."
  ]
}
{
  "inventory": {
    "account": "sf",
    "created": 1627590400,
    "description": "Production infrastructure inventory",
    "identifier": "test_inventory",
    "name": "test inventory",
    "org": "mw",
    "project": "h",
    "tags": [
      "Ullam sit aut cupiditate quas.",
      "Aliquam amet provident inventore cumque eligendi.",
      "Atque qui aspernatur repudiandae voluptate consequuntur non."
    ],
    "type": "plugin",
    "updated": 1627686800
  },
  "warnings": [
    "Sint ut.",
    "Libero impedit.",
    "Occaecati sequi.",
    "Pariatur veniam dolore quod."
  ]
}

List Ansible playbooks

get

List all playbooks.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: rzw
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,ASCPossible values:
tagsstring[]Optional

Filter results by tags (OR logic, exact match)

Example: ["Id aperiam dolor illo eos deserunt deleniti.","Quam minus consequatur et iure."]
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: iz5
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: iz5
Accept: */*
[
  {
    "account": "00",
    "ansible_galaxy": false,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Esse eaque dolorem sit voluptatem velit fuga.",
    "identifier": "Repellendus sed ipsam eligendi est et nobis.",
    "name": "test playbook",
    "org": "m",
    "project": "2ue",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Minus hic blanditiis magnam culpa delectus.",
      "Non est aut aliquam architecto ea.",
      "Officiis veniam.",
      "Odit hic cumque enim mollitia a velit."
    ],
    "updated": 1627686800,
    "vars": "Incidunt eum voluptatum ut."
  },
  {
    "account": "00",
    "ansible_galaxy": false,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Esse eaque dolorem sit voluptatem velit fuga.",
    "identifier": "Repellendus sed ipsam eligendi est et nobis.",
    "name": "test playbook",
    "org": "m",
    "project": "2ue",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Minus hic blanditiis magnam culpa delectus.",
      "Non est aut aliquam architecto ea.",
      "Officiis veniam.",
      "Odit hic cumque enim mollitia a velit."
    ],
    "updated": 1627686800,
    "vars": "Incidunt eum voluptatum ut."
  },
  {
    "account": "00",
    "ansible_galaxy": false,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Esse eaque dolorem sit voluptatem velit fuga.",
    "identifier": "Repellendus sed ipsam eligendi est et nobis.",
    "name": "test playbook",
    "org": "m",
    "project": "2ue",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Minus hic blanditiis magnam culpa delectus.",
      "Non est aut aliquam architecto ea.",
      "Officiis veniam.",
      "Odit hic cumque enim mollitia a velit."
    ],
    "updated": 1627686800,
    "vars": "Incidunt eum voluptatum ut."
  },
  {
    "account": "00",
    "ansible_galaxy": false,
    "ansible_galaxy_requirements_file": "requirements.yml",
    "created": 1627590400,
    "description": "Playbook for deploying web services to production",
    "env_vars": "Esse eaque dolorem sit voluptatem velit fuga.",
    "identifier": "Repellendus sed ipsam eligendi est et nobis.",
    "name": "test playbook",
    "org": "m",
    "project": "2ue",
    "repository": "my-repo",
    "repository_branch": "main",
    "repository_commit": "abc10ed",
    "repository_connector": "my-connector",
    "repository_path": "playbooks/",
    "tags": [
      "Minus hic blanditiis magnam culpa delectus.",
      "Non est aut aliquam architecto ea.",
      "Officiis veniam.",
      "Odit hic cumque enim mollitia a velit."
    ],
    "updated": 1627686800,
    "vars": "Incidunt eum voluptatum ut."
  }
]

Create Ansible playbook

post

Create a new playbook.

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

Org is the organisation identifier.

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

Project is the project identifier.

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

Account is the internal customer account ID.

Example: 5h
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: Hic incidunt consectetur et.
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: ["Quia qui vero omnis qui.","Quis sed."]
Responses
201

Created response.

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

Account is the internal customer account ID.

Example: xka
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: Doloribus odio alias fuga error et aspernatur.
identifierstringRequired

The unique identifier for this playbook

Example: Vel sunt quis repellendus voluptatem et dolor.
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: d
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 41
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: ["Tempore sit quod ut.","Est voluptatem ea deserunt.","Natus voluptatum doloremque voluptas minima et.","Autem voluptatum cumque cum porro voluptate at."]
updatedinteger · int64Required

Timestamp when the resource was last updated.

Example: 1627686800
varsstringOptional

The vars in the playbook

Example: Repellendus dolore sapiente consectetur laudantium.
post/api/orgs/{org}/projects/{project}/ansible/playbook
POST /api/orgs/{org}/projects/{project}/ansible/playbook HTTP/1.1
Host: localhost:80
Harness-Account: 5h
Content-Type: application/json
Accept: */*
Content-Length: 1399

{
  "ansible_galaxy": false,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "description": "Playbook for deploying web services to production",
  "env_vars": {
    "Expedita eos.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  },
  "identifier": "Voluptates explicabo ea et.",
  "name": "test playbook",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Labore aut asperiores ducimus reiciendis ut.",
    "Similique dolorum ullam id excepturi soluta beatae."
  ],
  "vars": {
    "Atque vel illo dignissimos.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    "Doloremque et animi laboriosam tempora nesciunt.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    },
    "Id quis.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  }
}
{
  "account": "7tp",
  "ansible_galaxy": true,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "created": 1627590400,
  "description": "Playbook for deploying web services to production",
  "env_vars": "Vel sint occaecati repudiandae et sit.",
  "identifier": "Quis reprehenderit minima commodi.",
  "name": "test playbook",
  "org": "d0",
  "policy_evaluation": {
    "account_id": "XRQAjvT37acOiXx9PRaQMF",
    "action": "onrun",
    "created": 1636370209475,
    "details": [
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      },
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "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": "j",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Non fugiat pariatur at.",
    "Ratione odio cum."
  ],
  "updated": 1627686800,
  "vars": "Quaerat rerum delectus corporis molestiae temporibus."
}

Show Ansible playbook

get

Show an individual playbook.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: yj
identifierstringRequired

The unique identifier for this playbook

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

Account is the internal customer account ID.

Example: gd
Responses
200

OK response.

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

Account is the internal customer account ID.

Example: a
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: Quo tempore consequuntur accusamus.
identifierstringRequired

The unique identifier for this playbook

Example: Beatae eum cumque corporis est amet 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: iw3
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 1z
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: ["Consequatur sunt.","Laudantium beatae nesciunt praesentium.","Repudiandae rerum vero earum incidunt rerum."]
updatedinteger · int64Required

Timestamp when the resource was last updated.

Example: 1627686800
varsstringOptional

The vars in the playbook

Example: Debitis molestiae dolorem.
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: gd
Accept: */*
{
  "account": "xo",
  "ansible_galaxy": true,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "created": 1627590400,
  "description": "Playbook for deploying web services to production",
  "env_vars": "Et et alias aut odio alias accusantium.",
  "identifier": "Quia quo aut minima.",
  "name": "test playbook",
  "org": "vh",
  "project": "gnb",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Dignissimos sapiente ipsam necessitatibus laudantium libero.",
    "Quod provident distinctio ea quos vero laboriosam."
  ],
  "updated": 1627686800,
  "vars": "In rerum eius."
}

Update Ansible playbook

put

Update an existing playbook.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: asw
identifierstringRequired

The unique identifier for this playbook

Example: Ipsam cupiditate.
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: 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: ["Ab debitis impedit voluptatem nulla et molestias.","Velit omnis quae.","Vitae neque vel nostrum officiis aspernatur."]
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: 7
Content-Type: application/json
Accept: */*
Content-Length: 929

{
  "ansible_galaxy": true,
  "ansible_galaxy_requirements_file": "requirements.yml",
  "description": "Playbook for deploying web services to production",
  "env_vars": {
    "Ex impedit consequuntur eligendi voluptatibus.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  },
  "name": "test playbook",
  "repository": "my-repo",
  "repository_branch": "main",
  "repository_commit": "abc10ed",
  "repository_connector": "my-connector",
  "repository_path": "playbooks/",
  "tags": [
    "Alias quidem deserunt inventore molestiae.",
    "Delectus mollitia.",
    "Fugit provident necessitatibus rerum."
  ],
  "vars": {
    "Non ullam rerum aut quia.": {
      "file_name": "Nihil accusantium odio itaque fugiat maiores.",
      "key": "2",
      "uuid": "123e4567-e89b-12d3-a456-426655440000",
      "value": "Nam veniam nihil provident ut.",
      "value_type": "Sequi aut omnis nemo aut."
    }
  }
}
{
  "policy_evaluation": {
    "account_id": "XRQAjvT37acOiXx9PRaQMF",
    "action": "onrun",
    "created": 1636370209475,
    "details": [
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          }
        ],
        "enabled": true,
        "identifier": "policyset-1",
        "name": "Production Policies",
        "org_id": "test-org",
        "project_id": "test-project",
        "status": "error",
        "type": "pipeline",
        "updated": 1636669297674
      },
      {
        "account_id": "eBqAoNchMLKigC_qZ5EdC",
        "action": "onrun",
        "created": 1636669297674,
        "description": "Captures critical production policies",
        "details": [
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "deny_messages": [
              "deployment stage 'example-stage' does not have a HarnessApproval step",
              "deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
            ],
            "output": "{\n    \"deny\": [\n        \"deployment stage 'deploy' does not have a HarnessApproval step\"\n    ],\n    \"stages_with_approval\": []\n}",
            "policy": {
              "account_id": "eBqAoNchMLKigC_qZ5EdC",
              "created": 1636669297674,
              "identifier": "policy-1",
              "name": "Pipeline Approval",
              "org_id": "test-org",
              "project_id": "test-project",
              "rego": "",
              "updated": 1636669297674
            },
            "rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
            "status": "error"
          },
          {
            "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: z1z
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 3l
identifierstringRequired

The unique identifier for this playbook

Example: Ut sapiente et et voluptatibus non.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: yte
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: yte
Accept: */*

No content

Show the Configuration Variable Sets attached to an Ansible playbook

get

Show the Configuration Variable Sets attached to a playbook, in priority order.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: df
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: hz4
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}/configuration-variable-sets
GET /api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}/configuration-variable-sets HTTP/1.1
Host: localhost:80
Harness-Account: hz4
Accept: */*
{
  "variable_sets": [
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    }
  ]
}

Replace the Configuration Variable Sets attached to an Ansible playbook

put

Replace the Configuration Variable Sets attached to a playbook. Array order is the priority order.

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: 9
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: q2w
Body
variable_setsstring[]Required

Configuration Variable Sets to attach, in priority order. Replaces whatever is currently attached.

Example: ["account.shared_vars","playbook_vars"]
Responses
200

OK response.

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

{
  "variable_sets": [
    "account.shared_vars",
    "playbook_vars"
  ]
}
{
  "variable_sets": [
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    },
    {
      "account": "Eaque odio.",
      "identifier": "Harum facere et.",
      "name": "Perspiciatis quod est sed architecto.",
      "org": "Est iure at voluptas recusandae ut hic.",
      "priority": 6654801999267750000,
      "project": "Ullam nobis qui.",
      "variable_set": "account.shared_vars"
    }
  ]
}

Show Ansible playbook vars

get

Show an individual playbook vars.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: i
identifierstringRequired

Playbook identifier

Example: Quos voluptas dolorem natus omnis eveniet.
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: qw5
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: qw5
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: rvk
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: 8et
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: 54d
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: 54d
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."
    },
    {
      "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 dynamic Ansible playbook variable

put

Update an existing dynamic playbook variable.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: i
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: b
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: b
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."
    },
    {
      "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

Delete dynamic Ansible playbook variable

delete

Delete a dynamic playbook variable.

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

Org is the organisation identifier.

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

Project is the project identifier.

Example: i
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: h95
Body
env_varsstring[]Optional

UUIDs of environment variables to delete.

Example: ["Sit modi aspernatur.","Ut facere consectetur labore quae eum dolorum."]
varsstring[]Optional

UUIDs of Ansible variables to delete.

Example: ["Natus velit sint a.","Porro dicta voluptas officiis voluptas eum.","Assumenda et quasi.","Ut repellat voluptas."]
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: h95
Content-Type: application/json
Accept: */*
Content-Length: 279

{
  "env_vars": [
    "Et tenetur et voluptate.",
    "Magni dolorem.",
    "Sit sequi odio voluptas quia.",
    "Quam similique beatae ex quos doloribus qui."
  ],
  "vars": [
    "Consequatur incidunt consectetur distinctio et consequatur.",
    "Consequatur dolorum voluptas nihil.",
    "Optio porro.",
    "Dolor id illum."
  ]
}

No content

Show the merged variables of an Ansible playbook

get

Show the playbook's variables followed by those of its attached Configuration Variable Sets, marking which entry wins each key.

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: 236
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: ah8
Responses
200

OK response.

application/json
get/api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}/vars/merged
GET /api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}/vars/merged HTTP/1.1
Host: localhost:80
Harness-Account: ah8
Accept: */*
{
  "environment_variables": [
    {
      "associatedVariableSet": "Eos iusto.",
      "file_name": "Delectus magnam ex cum.",
      "inUse": false,
      "isLocked": false,
      "key": "Eligendi nam maxime dolores et blanditiis aut.",
      "priority": 263786966037862850,
      "source": "playbook",
      "uuid": "Iure labore non et.",
      "value": "Rem consequatur sed.",
      "value_type": "Eos tempora perspiciatis repellat in a."
    },
    {
      "associatedVariableSet": "Eos iusto.",
      "file_name": "Delectus magnam ex cum.",
      "inUse": false,
      "isLocked": false,
      "key": "Eligendi nam maxime dolores et blanditiis aut.",
      "priority": 263786966037862850,
      "source": "playbook",
      "uuid": "Iure labore non et.",
      "value": "Rem consequatur sed.",
      "value_type": "Eos tempora perspiciatis repellat in a."
    }
  ],
  "variables": [
    {
      "associatedVariableSet": "Eos iusto.",
      "file_name": "Delectus magnam ex cum.",
      "inUse": false,
      "isLocked": false,
      "key": "Eligendi nam maxime dolores et blanditiis aut.",
      "priority": 263786966037862850,
      "source": "playbook",
      "uuid": "Iure labore non et.",
      "value": "Rem consequatur sed.",
      "value_type": "Eos tempora perspiciatis repellat in a."
    },
    {
      "associatedVariableSet": "Eos iusto.",
      "file_name": "Delectus magnam ex cum.",
      "inUse": false,
      "isLocked": false,
      "key": "Eligendi nam maxime dolores et blanditiis aut.",
      "priority": 263786966037862850,
      "source": "playbook",
      "uuid": "Iure labore non et.",
      "value": "Rem consequatur sed.",
      "value_type": "Eos tempora perspiciatis repellat in a."
    }
  ]
}

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: w
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: bs
Query parameters
pipeline_idstringOptional

The unique identifier for the associated pipeline

Example: Necessitatibus molestias eligendi dolorem inventore ut.
stage_idstringOptional

The unique identifier for a stage

Example: Aut nihil porro animi eaque dolores veniam.
pipeline_execution_idstringOptional

The unique identifier for the associated pipeline execution

Example: Ratione blanditiis a rerum.
pipeline_stage_idstringOptional

The unique identifier for the associated pipeline execution stage

Example: Dolore ex perferendis voluptate accusamus.
data_typestring · enumRequired

Type of data stored

Example: task_resultsPossible values:
inventoriesstringRequired

Inventories associated with this event

Example: Pariatur ea expedita nisi deleniti.
playbooksstringRequired

Playbooks associated with this event

Example: Quibusdam est est et.
event_typestring · enumRequired

The type of event that occurred.

Example: activity-dry-run-executionPossible values:
metadatastringOptional

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

Example: Exercitationem sed id modi eum consequatur id.
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: z
Content-Lengthinteger · int64Optional

Size in bytes of the data.

Example: 1597587030943599600
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=Pariatur+ea+expedita+nisi+deleniti.&playbooks=Quibusdam+est+est+et.&event_type=activity-dry-run-execution HTTP/1.1
Host: localhost:80
Harness-Account: z
Accept: */*
{
  "id": "dc538c61-de48-4220-958c-5f3c4f983daa"
}

Last updated

Was this helpful?