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

# Get Ansible Hosts Summary

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

```json
{"openapi":"3.0.3","info":{"title":"Infrastructure as Code Management","version":"0.1.0"},"tags":[{"name":"ansible","description":"Ansible Service handles the API for ansible entities."}],"servers":[{"url":"http://localhost:80"}],"paths":{"/api/orgs/{org}/projects/{project}/ansible/hosts/summary":{"get":{"tags":["ansible"],"summary":"Get Ansible Hosts Summary","description":"Get aggregated host counts grouped by the latest activity status, scoped to an account/org/project.","operationId":"ansible#get-hosts-summary","parameters":[{"name":"searchTerm","in":"query","description":"Filter results by partial host address match","allowEmptyValue":true,"schema":{"type":"string","description":"Filter results by partial host address match","default":""}},{"name":"inventory","in":"query","description":"Filter results by inventory membership","allowEmptyValue":true,"schema":{"type":"string","description":"Filter results by inventory membership","default":""}},{"name":"startTime","in":"query","description":"Filter results by latest activity created time (Unix timestamp in milliseconds) - inclusive start of time range","allowEmptyValue":true,"schema":{"type":"integer","description":"Filter results by latest activity created time (Unix timestamp in milliseconds) - inclusive start of time range","format":"int64"}},{"name":"endTime","in":"query","description":"Filter results by latest activity created time (Unix timestamp in milliseconds) - inclusive end of time range","allowEmptyValue":true,"schema":{"type":"integer","description":"Filter results by latest activity created time (Unix timestamp in milliseconds) - inclusive end of time range","format":"int64"}},{"name":"org","in":"path","description":"Org is the organisation identifier.","required":true,"schema":{"type":"string","description":"Org is the organisation identifier.","minLength":1,"maxLength":128}},{"name":"project","in":"path","description":"Project is the project identifier.","required":true,"schema":{"type":"string","description":"Project is the project identifier.","minLength":1,"maxLength":128}},{"name":"Harness-Account","in":"header","description":"Account is the internal customer account ID.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Account is the internal customer account ID.","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetHostsSummaryResponse"}}}},"400":{"description":"BadRequestError: Bad Request response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"401":{"description":"UnauthorizedError: Unauthorized response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"403":{"description":"ForbiddenError: Forbidden response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"404":{"description":"NotFoundError: Not Found response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"408":{"description":"TimeoutError: Request Timeout response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"409":{"description":"ConflictError: Conflict response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"423":{"description":"LockedError: Locked response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"499":{"description":"ContextCancelledError:  response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"502":{"description":"BadGatewayError: Bad Gateway response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}}}}}},"components":{"schemas":{"GetHostsSummaryResponse":{"type":"object","properties":{"changed":{"type":"integer","description":"Number of hosts whose latest activity status is 'changed'","format":"int64"},"failures":{"type":"integer","description":"Number of hosts whose latest activity status is 'failures'","format":"int64"},"ignored":{"type":"integer","description":"Number of hosts whose latest activity status is 'ignored'","format":"int64"},"ok":{"type":"integer","description":"Number of hosts whose latest activity status is 'ok'","format":"int64"},"rescued":{"type":"integer","description":"Number of hosts whose latest activity status is 'rescued'","format":"int64"},"skipped":{"type":"integer","description":"Number of hosts whose latest activity status is 'skipped'","format":"int64"},"total":{"type":"integer","description":"Total number of hosts matching the filters","format":"int64"},"unknown":{"type":"integer","description":"Number of hosts with no activity rows (no derivable latest status)","format":"int64"},"unreachable":{"type":"integer","description":"Number of hosts whose latest activity status is 'unreachable'","format":"int64"}},"required":["total","ok","changed","failures","unreachable","skipped","ignored","rescued","unknown"]},"AnsibleError":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem."},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem."},"name":{"type":"string","description":"Name is the name of this class of errors."},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"required":["name","id","message","temporary","timeout","fault"]}}}}
```
