Harness Ansible API

Ansible Service handles the API for ansible entities.

Operations 44

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /iacm/api/orgs/{org}/projects/{project}/ansible/activities List Ansible run activities in a project · List Ansible Activities #
Ask an LLM
“Which Ansible runs have happened recently in my Harness project?”
“Can I filter Ansible activity history by playbook, inventory or run status?”
Tell an agent
List Ansible activities in project {project} of org {org}.
Show Ansible activities for playbook {playbook} with status {status} in {org}/{project}.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/activities/{id} Get one Ansible activity record · Show ansible activity #
Ask an LLM
“What happened in a specific Ansible activity I have the ID for?”
“Where can I see the details of a single Ansible run activity?”
Tell an agent
Show Ansible activity {id} in project {project} of org {org}.
Pull up the details of Ansible run activity {id} from {org}/{project}.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/data List stored Ansible data files · List data #
Ask an LLM
“What data files has Ansible stored for an inventory or playbook?”
“Can I find stored Ansible data from a particular pipeline execution?”
Tell an agent
List stored Ansible data in {org}/{project}.
List Ansible data of type {data_type} from pipeline execution {execution} in {org}/{project}.
POST /iacm/api/orgs/{org}/projects/{project}/ansible/data Store binary data produced by an Ansible run · Create data #
Ask an LLM
“How do I upload binary output generated by Ansible into Harness?”
“Can I attach stored Ansible data to specific inventories and playbooks?”
Tell an agent
Store Ansible {data_type} data for inventories {inventories} and playbooks {playbooks} in {org}/{project}.
Upload Ansible {data_type} output from pipeline execution {execution} for inventories {inventories} and playbooks {playbooks} in {org}/{project}.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/data/{id} Download one stored Ansible data file · Show data #
Ask an LLM
“Can I fetch a stored plan or state file the provisioner generated?”
“Where do I get the binary content of one stored Ansible data record?”
Tell an agent
Get stored Ansible data {id} from project {project} in org {org}.
Download the stored plan or state file {id} from {org}/{project}.
POST /iacm/api/orgs/{org}/projects/{project}/ansible/events Send an Ansible event to Harness · Send event #
Ask an LLM
“How do I report an Ansible event for a set of playbooks and inventories?”
“Can I send event metadata along with an Ansible event?”
Tell an agent
Send an Ansible {event_type} event for playbooks {playbooks} and inventories {inventories} in {org}/{project}.
Report a {event_type} event with metadata {metadata} for playbooks {playbooks} on inventories {inventories} in {org}/{project}.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/file Fetch a playbook or inventory YAML from git · Get Ansible file #
Ask an LLM
“Can I read the YAML of a playbook straight from its configured git repo?”
“Where do I get the plugin inventory file that lives in git?”
Tell an agent
Fetch the {resource_type} file for {identifier} from git in {org}/{project}.
Read the playbook YAML for {identifier} from its git repo in {org}/{project}.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/hosts List hosts across all Ansible inventories · List Ansible Hosts #
Ask an LLM
“Which hosts does Ansible manage across every inventory in my project?”
“Can I list managed hosts filtered by status and time window?”
Tell an agent
List all Ansible hosts in {org}/{project}.
List Ansible hosts in inventory {inventory} with status {status} in {org}/{project}.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/hosts/{id} Get details for one Ansible host · Show Ansible Host #
Ask an LLM
“What details does Harness keep about a single Ansible host?”
“Can I look up one managed host by its ID?”
Tell an agent
Show Ansible host {id} in project {project} of org {org}.
Look up managed host {id} in {org}/{project}.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/hosts/{id}/activities List activities for one Ansible host · List Ansible Host Activities #
Ask an LLM
“Which Ansible runs have touched a particular host?”
“Can I see the activity history of a single managed host?”
Tell an agent
List activities for Ansible host {id} in {org}/{project}.
Show the run history of host {id} in project {project} of org {org}, newest first.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/hosts/{id}/inventories List inventories a host belongs to · List Inventories For Host #
Ask an LLM
“Which Ansible inventories include a given host?”
“Is a particular host a member of more than one inventory?”
Tell an agent
List the inventories that host {id} belongs to in {org}/{project}.
Which inventories is host {id} a member of in project {project} of org {org}.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/hosts/{id}/stats Get aggregated run stats for one host · Get Ansible Host Stats #
Ask an LLM
“What are the aggregated run statistics for a specific Ansible host?”
“How often has one host succeeded or failed across its runs?”
Tell an agent
Get aggregated statistics for Ansible host {id} in {org}/{project}.
Show success and failure stats for host {id} in project {project} of org {org}.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/hosts/export Export Ansible hosts to CSV · Export Ansible Hosts to CSV #
Ask an LLM
“Can I download every matching Ansible host as a CSV file?”
“Is the host CSV export paginated or does it include all matches?”
Tell an agent
Export all Ansible hosts in {org}/{project} to CSV.
Export Ansible hosts with status {status} from inventory {inventory} in {org}/{project} as CSV.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/hosts/summary Count Ansible hosts by latest run status · Get Ansible Hosts Summary #
Ask an LLM
“How many of my Ansible hosts are currently failing versus succeeding?”
“Can I get host counts grouped by last activity status for one inventory?”
Tell an agent
Summarize Ansible host counts by latest status in {org}/{project}.
Give me the host status summary for inventory {inventory} in {org}/{project}.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/inventory List Ansible inventories · List Ansible inventory #
Ask an LLM
“What Ansible inventories exist in my Harness project?”
“Can I search Ansible inventories by name or tag?”
Tell an agent
List Ansible inventories in {org}/{project}.
Search Ansible inventories for {term} in {org}/{project}.
POST /iacm/api/orgs/{org}/projects/{project}/ansible/inventory Create an Ansible inventory · Create Ansible inventory #
Ask an LLM
“How do I set up a new Ansible inventory in Harness?”
“Can a new inventory be a plugin type with dynamic groups?”
Tell an agent
Create a {type} Ansible inventory named {name} with identifier {identifier} in {org}/{project}.
Create a {type} inventory {name} ({identifier}) with plugin options {plugin_options} in {org}/{project}.
DELETE /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier} Delete an Ansible inventory · Delete Ansible inventory #
Ask an LLM
“How do I remove an Ansible inventory I no longer need?”
“Can a whole inventory be deleted from a project?”
Tell an agent destructive · confirm first
Delete Ansible inventory {identifier} from {org}/{project}.
Remove the whole inventory {identifier} from project {project} of org {org}.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier} Get one Ansible inventory · Show Ansible inventory #
Ask an LLM
“What does a specific Ansible inventory contain?”
“Can I view one inventory's configuration by its identifier?”
Tell an agent
Show Ansible inventory {identifier} in {org}/{project}.
Show inventory {identifier} in project {project} of org {org} with list values as arrays.
PUT /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier} Update an Ansible inventory · Update Ansible inventory #
Ask an LLM
“Can I rename an existing Ansible inventory or change its tags?”
“What do I send to replace an inventory's data?”
Tell an agent
Rename Ansible inventory {identifier} to {name} in {org}/{project}.
Replace the data of inventory {identifier} in {org}/{project} with {data}, keeping name {name}.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/ansible Render an inventory as Ansible-compatible YAML · Show Ansible inventory as ansible compatible YAML #
Ask an LLM
“Can I get an inventory in YAML that ansible-playbook can consume directly?”
“Is there a way to export one inventory in native Ansible format?”
Tell an agent
Render inventory {identifier} in {org}/{project} as Ansible-compatible YAML.
Export inventory {identifier} from project {project} of org {org} in native Ansible YAML format.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/groups List groups in an Ansible inventory · Show Ansible inventory groups #
Ask an LLM
“Which host groups are defined in an Ansible inventory?”
“Can I page through the groups of a large inventory?”
Tell an agent
List the groups in inventory {identifier} in {org}/{project}.
Show the first {limit} host groups of inventory {identifier} in {org}/{project}.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/hosts List hosts in one Ansible inventory · Show Ansible inventory hosts #
Ask an LLM
“Which hosts are in one particular inventory?”
“Can I list an inventory's hosts limited to a single group?”
Tell an agent
List hosts in inventory {identifier} in {org}/{project}.
List hosts in group {group} of inventory {identifier} in {org}/{project}.
POST /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/hosts Add a host to an Ansible inventory · Create Ansible inventory host #
Ask an LLM
“How do I add a new host address to an existing inventory?”
“Can I assign groups and vars when adding a host to an inventory?”
Tell an agent
Add host {host_address} to inventory {identifier} in {org}/{project}.
Add host {host_address} to inventory {identifier} in groups {groups} in {org}/{project}.
PUT /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/import Replace static inventory data from YAML or INI · Replace Ansible static inventory data from YAML/INI #
Ask an LLM
“Can I overwrite an existing static inventory by pasting YAML or INI content?”
“Are secret references kept when I re-import a static inventory's data?”
Tell an agent
Replace the data of static inventory {identifier} in {org}/{project} with this {format} content: {content}
Re-import {format} content into existing static inventory {identifier} in project {project} of org {org}, overwriting its data: {content}
PUT /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/plugin Update a plugin inventory's configuration · Update Ansible plugin inventory #
Ask an LLM
“How do I change the plugin options on a dynamic plugin inventory?”
“Can I reconfigure a plugin-based inventory without recreating it?”
Tell an agent
Set plugin options {plugin_options} on plugin inventory {identifier} in {org}/{project}.
Reconfigure dynamic plugin inventory {identifier} in project {project} of org {org} with plugin options {plugin_options}.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/vars List variables on an Ansible inventory · Show Ansible inventory vars #
Ask an LLM
“What variables are defined at the inventory level?”
“Can I see the vars attached to one Ansible inventory?”
Tell an agent
Show the variables of inventory {identifier} in {org}/{project}.
List inventory-level vars for {identifier} in project {project} of org {org}.
POST /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/vars Add new variables to an inventory · Create Ansible inventory variables #
Ask an LLM
“Can I define new variables on an inventory that has none yet?”
“Where do I add environment variables to an Ansible inventory for the first time?”
Tell an agent
Add new variables {vars} to inventory {identifier} in {org}/{project}.
Define new inventory vars {vars} and environment variables {env_vars} on inventory {identifier} in {org}/{project}.
PUT /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/vars Update existing inventory variables · Update Ansible inventory variables #
Ask an LLM
“How do I change variables that already exist on an inventory?”
“Can I update an inventory's environment variables along with its vars?”
Tell an agent
Update existing vars on inventory {identifier} in {org}/{project} to {vars}.
Change environment variables already on inventory {identifier} in {org}/{project} to {env_vars}, with vars {vars}.
POST /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{inventory_identifier}/groups Create a group in an Ansible inventory · Create Ansible inventory group #
Ask an LLM
“How do I create a new host group inside an inventory?”
“Can an inventory group pull hosts dynamically through a connector?”
Tell an agent
Create group {name} with identifier {identifier} in inventory {inventory} in {org}/{project}.
Add a new group {name} ({identifier}) to inventory {inventory} in {org}/{project} containing hosts {hosts}.
DELETE /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{inventory_identifier}/groups/{identifier} Delete a group from an Ansible inventory · Delete Ansible inventory group #
Ask an LLM
“How do I remove a host group from an inventory?”
“Can I delete one group without deleting the whole inventory?”
Tell an agent destructive · confirm first
Delete group {identifier} from inventory {inventory} in {org}/{project}.
Remove host group {identifier} from inventory {inventory} in project {project} of org {org}.
PUT /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{inventory_identifier}/groups/{identifier} Update a group in an Ansible inventory · Update Ansible inventory group #
Ask an LLM
“Can I change the hosts or vars of an existing inventory group?”
“What do I send to rename a group inside an inventory?”
Tell an agent
Rename group {identifier} in inventory {inventory} to {name} in {org}/{project}.
Set the hosts of existing group {identifier} in inventory {inventory} to {hosts}, name {name}, in {org}/{project}.
DELETE /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{inventory_identifier}/hosts/{host_address} Remove a host from an Ansible inventory · Delete Ansible inventory host #
Ask an LLM
“What's the way to take a single host out of an inventory?”
“Can I delete a decommissioned server from my Ansible inventory?”
Tell an agent destructive · confirm first
Remove host {host_address} from inventory {inventory} in {org}/{project}.
Take decommissioned host {host_address} out of inventory {inventory} in project {project} of org {org}.
PUT /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/{inventory_identifier}/hosts/{host_address} Update a host in an Ansible inventory · Update Ansible inventory host #
Ask an LLM
“Can I move an inventory host into different groups?”
“How do I change the vars set on one host in an inventory?”
Tell an agent
Put host {host_address} in inventory {inventory} into groups {groups} in {org}/{project}.
Change the vars of host {host_address} in inventory {inventory} to {vars} in {org}/{project}.
POST /iacm/api/orgs/{org}/projects/{project}/ansible/inventory/import Create a static inventory from YAML or INI · Import Ansible static inventory from YAML/INI #
Ask an LLM
“Can I import an existing hosts file in INI format as a new inventory?”
“How do I create a static inventory from YAML content I already have?”
Tell an agent
Import a new static inventory {name} ({identifier}) from this {format} content in {org}/{project}: {content}
Create static inventory {identifier} named {name} in {org}/{project} from my {format} hosts file: {content}
GET /iacm/api/orgs/{org}/projects/{project}/ansible/playbook List Ansible playbooks · List Ansible playbooks #
Ask an LLM
“Which Ansible playbooks are registered in my project?”
“Can I search playbooks by name or filter them by tag?”
Tell an agent
List Ansible playbooks in {org}/{project}.
Search playbooks for {term} in {org}/{project}.
POST /iacm/api/orgs/{org}/projects/{project}/ansible/playbook Register an Ansible playbook from a repo · Create Ansible playbook #
Ask an LLM
“How do I register a playbook that lives in a git repository?”
“Can a new playbook include Ansible Galaxy requirements?”
Tell an agent
Create playbook {name} ({identifier}) at path {repository_path} in {org}/{project}.
Register playbook {name} ({identifier}) from {repository_path} on branch {branch} using connector {connector} in {org}/{project}.
DELETE /iacm/api/orgs/{org}/projects/{project}/ansible/playbook/{identifier} Delete an Ansible playbook · Delete Ansible playbook #
Ask an LLM
“How do I remove a playbook from my Harness project?”
“Can I unregister a playbook I no longer run?”
Tell an agent destructive · confirm first
Delete playbook {identifier} from {org}/{project}.
Unregister playbook {identifier} in project {project} of org {org}.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/playbook/{identifier} Get one Ansible playbook · Show Ansible playbook #
Ask an LLM
“What repository and branch does a specific playbook point to?”
“Can I view one playbook's configuration?”
Tell an agent
Show playbook {identifier} in {org}/{project}.
Which repo and branch does playbook {identifier} use in project {project} of org {org}.
PUT /iacm/api/orgs/{org}/projects/{project}/ansible/playbook/{identifier} Update an Ansible playbook · Update Ansible playbook #
Ask an LLM
“Can I point an existing playbook at a different repo path or branch?”
“What's required to change a playbook's name?”
Tell an agent
Update playbook {identifier} in {org}/{project} to use path {repository_path} on branch {branch}, keeping name {name}.
Rename playbook {identifier} to {name} in {org}/{project}, keeping repo path {repository_path}.
DELETE /iacm/api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}/vars Delete dynamic playbook variables · Delete dynamic Ansible playbook variable #
Ask an LLM
“How do I remove a variable from a playbook?”
“Can I delete specific dynamic vars from a playbook without touching the rest?”
Tell an agent destructive · confirm first
Delete variables {vars} from playbook {identifier} in {org}/{project}.
Drop the dynamic vars {vars} from playbook {identifier} in project {project} of org {org}.
GET /iacm/api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}/vars List variables on an Ansible playbook · Show Ansible playbook vars #
Ask an LLM
“What dynamic variables are set on a playbook?”
“Can I see a playbook's variables page by page?”
Tell an agent
Show the variables of playbook {identifier} in {org}/{project}.
List the dynamic vars on playbook {identifier} in project {project} of org {org}.
POST /iacm/api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}/vars Add a dynamic playbook variable · Create dynamic Ansible playbook variable #
Ask an LLM
“Can I add a brand new dynamic variable to a playbook?”
“Where do I define new env vars for a playbook run?”
Tell an agent
Add new variables {vars} to playbook {identifier} in {org}/{project}.
Define a new dynamic variable {vars} with env vars {env_vars} on playbook {identifier} in {org}/{project}.
PUT /iacm/api/orgs/{org}/projects/{project}/ansible/playbook/{identifier}/vars Update a dynamic playbook variable · Update dynamic Ansible playbook variable #
Ask an LLM
“How do I change the value of an existing playbook variable?”
“Can I edit environment variables already defined on a playbook?”
Tell an agent
Update existing vars on playbook {identifier} in {org}/{project} to {vars}.
Edit the existing environment variables {env_vars} and vars {vars} on playbook {identifier} in {org}/{project}.
POST /iacm/api/orgs/{org}/projects/{project}/ansible/results Publish Ansible run results as an activity · Publish results #
Ask an LLM
“Can I store Ansible run results and log an activity in one call?”
“Which event type and data type do I pass when publishing Ansible results?”
Tell an agent
Publish {data_type} results as a {event_type} activity for playbooks {playbooks} and inventories {inventories} in {org}/{project}.
Record execution {execution} results as a {event_type} activity with {data_type} data for playbooks {playbooks}, inventories {inventories}, in {org}/{project}.

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/harness:harness-ansible-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

harness-ansible-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Harness Ansible API
  version: '1.0'
  description: The Harness Software Delivery Platform uses OpenAPI Specification v3.0.
  contact:
    name: API Support
    email: contact@harness.io
    url: https://harness.io/
  x-logo:
    url: https://mma.prnewswire.com/media/779232/Harnes_logo_horizontal.jpg?p=facebook
    altText: Harness
  termsOfService: https://harness.io/terms-of-use/
servers:
- url: https://app.harness.io
  description: Harness host URL
- url: https://{vanity}
  description: Vanity URL
  variables:
    vanity:
      default: app.harness.io
security:
- x-api-key: []
tags:


# --- truncated at 32 KB (515 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/harness/refs/heads/main/openapi/harness-ansible-api-openapi.yml