> 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/list-ansible-host-activities.md).

# List Ansible Host Activities

List all activities for a specific host.

```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/{id}/activities":{"get":{"tags":["ansible"],"summary":"List Ansible Host Activities","description":"List all activities for a specific host.","operationId":"ansible#list-host-activities","parameters":[{"name":"limit","in":"query","description":"Limit is the number of records to return for a page.","allowEmptyValue":true,"schema":{"type":"integer","description":"Limit is the number of records to return for a page.","default":30,"format":"int64","minimum":1,"maximum":1000}},{"name":"page","in":"query","description":"Page is the page number to return relative to the page 'limit'.","allowEmptyValue":true,"schema":{"type":"integer","description":"Page is the page number to return relative to the page 'limit'.","default":1,"format":"int64","minimum":1}},{"name":"sort","in":"query","description":"Sort order for results","allowEmptyValue":true,"schema":{"type":"string","description":"Sort order for results","default":"created,DESC","enum":["created,ASC","created,DESC"]}},{"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":"id","in":"path","description":"The unique identifier for this host","required":true,"schema":{"type":"string","description":"The unique identifier for this host"}},{"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.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostActivityResourceCollection"}}}},"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":{"HostActivityResourceCollection":{"type":"array","items":{"$ref":"#/components/schemas/HarnessIacmHostactivity"}},"HarnessIacmHostactivity":{"type":"object","properties":{"account":{"type":"string","description":"Account is the internal customer account ID.","minLength":1,"maxLength":128},"created":{"type":"integer","description":"Timestamp when the resource was created","format":"int64"},"data":{"type":"string","description":"Host-specific execution data (stats and task results)"},"event_type":{"type":"string","description":"The type of event that occurred","enum":["activity-execution","activity-dry-run-execution"]},"id":{"type":"string","description":"The unique identifier for this activity"},"inventories":{"type":"string","description":"Inventories associated with this event"},"metadata":{"$ref":"#/components/schemas/AnsibleActivityMetadata"},"org":{"type":"string","description":"Org is the organisation identifier.","minLength":1,"maxLength":128},"playbooks":{"type":"string","description":"Playbooks associated with this event"},"project":{"type":"string","description":"Project is the project identifier.","minLength":1,"maxLength":128},"status":{"type":"string","description":"Host-specific status for this activity"}},"required":["account","org","project","inventories","playbooks","id","metadata","created","event_type"]},"AnsibleActivityMetadata":{"type":"object","properties":{"activity_status":{"type":"string","description":"The status of this activity"},"filters":{"type":"string","description":"Tags/skip-tags/limit applied to the run"},"git_branch":{"type":"string","description":"Git branch associated with this execution"},"git_commit_message":{"type":"string","description":"Git commit message associated with this execution"},"git_commit_sha":{"type":"string","description":"Git commit SHA associated with this execution"},"git_repo":{"type":"string","description":"Git repo associated with this execution"},"metrics":{"$ref":"#/components/schemas/AnsibleMetrics"},"pipeline":{"type":"string","description":"The unique identifier of any associated pipeline"},"pipeline_execution_id":{"type":"string","description":"The unique identifier for any associated pipeline execution"},"pipeline_execution_number":{"type":"string","description":"The unique number for any associated pipeline execution"},"pipeline_name":{"type":"string","description":"The name of any associated pipeline"},"pipeline_stage_id":{"type":"string","description":"The unique identifier for the associated pipeline stage"},"plugin_version":{"type":"string","description":"The version of the Ansible plugin that produced this activity"},"results_uuid":{"type":"string","description":"The ID of any associated results"},"trigger":{"type":"object","description":"Trigger info for any associated pipeline execution","additionalProperties":true}}},"AnsibleMetrics":{"type":"object","properties":{"circuit_breaker_triggered":{"type":"boolean","description":"Whether circuit breaker was triggered"},"duration_ms":{"type":"integer","description":"Duration of ansible run in milliseconds","format":"int64"},"host_changed":{"type":"integer","description":"Number of hosts with changed status","format":"int64"},"host_failed":{"type":"integer","description":"Number of hosts with failed status","format":"int64"},"host_ok":{"type":"integer","description":"Number of hosts with ok status","format":"int64"},"host_skipped":{"type":"integer","description":"Number of hosts with skipped status","format":"int64"},"host_unreachable":{"type":"integer","description":"Number of hosts with unreachable status","format":"int64"},"output_size_bytes":{"type":"integer","description":"Size of structured ansible output in bytes","format":"int64"},"payload_size_bytes":{"type":"integer","description":"Size of payload sent to server in bytes","format":"int64"},"total_hosts":{"type":"integer","description":"Total number of hosts in the ansible run","format":"int64"},"total_tasks":{"type":"integer","description":"Total number of tasks across all hosts","format":"int64"}},"description":"Observability metrics for ansible playbook runs"},"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"]}}}}
```
