> 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/api-reference/iacm/activities.md).

# Activities

Activities Service handles the API for workspace activities

## List activities

> List all activities

```json
{"openapi":"3.0.3","info":{"title":"Infrastructure as Code Management","version":"0.1.0"},"tags":[{"name":"activities","description":"Activities Service handles the API for workspace activities"}],"servers":[{"url":"http://localhost:80"}],"paths":{"/api/orgs/{org}/projects/{project}/activities":{"get":{"tags":["activities"],"summary":"List activities","description":"List all activities","operationId":"activities#list-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":"workspace","in":"query","description":"Workspace identifier","allowEmptyValue":true,"schema":{"type":"string","description":"Workspace identifier"}},{"name":"pipeline","in":"query","description":"Pipeline filter","allowEmptyValue":true,"schema":{"type":"string","description":"Pipeline filter"}},{"name":"pipeline_execution_id","in":"query","description":"Pipeline execution filter","allowEmptyValue":true,"schema":{"type":"string","description":"Pipeline execution filter"}},{"name":"pipeline_stage_id","in":"query","description":"Pipeline stage filter","allowEmptyValue":true,"schema":{"type":"string","description":"Pipeline stage filter"}},{"name":"activity_type","in":"query","description":"Activity type filter","allowEmptyValue":true,"schema":{"type":"string","description":"Activity type filter"}},{"name":"activity_status","in":"query","description":"Activity status filter","allowEmptyValue":true,"schema":{"type":"string","description":"Activity status filter"}},{"name":"start_time","in":"query","description":"Start time filter (Unix timestamp)","allowEmptyValue":true,"schema":{"type":"integer","description":"Start time filter (Unix timestamp)","format":"int64"}},{"name":"end_time","in":"query","description":"End time filter (Unix timestamp)","allowEmptyValue":true,"schema":{"type":"integer","description":"End time filter (Unix timestamp)","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.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityResourceCollection"}}}},"400":{"description":"BadRequestError: Bad Request response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UnauthorizedError: Unauthorized response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"ForbiddenError: Forbidden response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NotFoundError: Not Found response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"TimeoutError: Request Timeout response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"ConflictError: Conflict response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"LockedError: Locked response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"499":{"description":"ContextCancelledError:  response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"BadGatewayError: Bad Gateway response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"ActivityResourceCollection":{"type":"array","items":{"$ref":"#/components/schemas/HarnessIacmActivity"}},"HarnessIacmActivity":{"type":"object","properties":{"account":{"type":"string","description":"Account is the internal customer account ID.","minLength":1,"maxLength":128},"created":{"type":"integer","description":"Created is the unix timestamp at which the resource was originally created in milliseconds.","format":"int64"},"id":{"type":"string","description":"The unique identifier for this activity"},"metadata":{"$ref":"#/components/schemas/ActivityMetadata"},"org":{"type":"string","description":"Org is the organisation identifier.","minLength":1,"maxLength":128},"project":{"type":"string","description":"Project is the project identifier.","minLength":1,"maxLength":128},"workspace":{"type":"string","description":"The unique identifier for the associated workspace"}},"description":"Activity defines an individual significant event in the history of aworkspace","required":["account","org","project","id","workspace","metadata","created"]},"ActivityMetadata":{"type":"object","properties":{"PlannedChangesCount":{"type":"integer","description":"Deprecated: use resource_count_xxxx fields instead","default":0,"format":"int64"},"activity_status":{"type":"string","description":"The status of this activity","enum":["success","failure","incomplete"]},"activity_type":{"type":"string","description":"The type of this activity","enum":["apply","destroy","plan","drifted","import","bootstrap","synth","deploy","diff","drift","rollback"]},"cost_breakdown_uuid":{"type":"string","description":"The ID of any associated cost breakdown data"},"cost_currency":{"type":"string","description":"The currency used in cost data for this change"},"cost_diff_total_monthly":{"type":"string","description":"The currency used in cost data for this change"},"cost_diff_uuid":{"type":"string","description":"The ID of any associated cost diff data"},"cost_past_total_monthly":{"type":"string","description":"The currency used in cost data for this change"},"cost_total_monthly":{"type":"string","description":"The currency used in cost data for this change"},"cost_total_monthly_percentage_change":{"type":"string","description":"The currency used in cost data for this change"},"data_length":{"type":"integer","description":"The length of the data","default":0,"format":"int64"},"drift_counts":{"$ref":"#/components/schemas/Counts"},"enable_solutions_factory":{"type":"boolean","description":"Indicates if Harness Solution Factory functionality is enabled"},"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"},"modules_uuid":{"type":"string","description":"The ID of any associated modules data"},"output_counts":{"$ref":"#/components/schemas/Counts"},"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"},"plan_uuid":{"type":"string","description":"The ID of any associated plan data"},"providers_uuid":{"type":"string","description":"The ID of any associated providers data"},"provisioner":{"type":"string","description":"The provisioner in use"},"provisioner_version":{"type":"string","description":"The current version of the provisioner in use"},"resource_counts":{"$ref":"#/components/schemas/Counts"},"rollback_reason":{"type":"string","description":"For rollback activities: optional human-readable reason provided by the actor"},"rollback_source_id":{"type":"string","description":"For rollback activities: the workspacedata ID that was rolled back from"},"stacks":{"type":"array","items":{"$ref":"#/components/schemas/Stacks"},"description":"Stack details for multi-stack deployments"},"state_checksum":{"type":"string","description":"The checksum of the last-seen state file"},"state_uuid":{"type":"string","description":"The ID of any associated state data"},"terragrunt_details":{"type":"array","items":{"$ref":"#/components/schemas/TerragruntDetail"},"description":"Terragrunt details for any associated execution"},"trigger":{"type":"object","description":"Trigger info for any associated pipeline execution","additionalProperties":true}}},"Counts":{"type":"object","properties":{"added":{"type":"integer","description":"Number added","format":"int64"},"changed":{"type":"integer","description":"Number changed","format":"int64"},"deleted":{"type":"integer","description":"Number deleted","format":"int64"},"imported":{"type":"integer","description":"Number imported","format":"int64"},"removed":{"type":"integer","description":"Number removed","format":"int64"},"unchanged":{"type":"integer","description":"Number unchanged","format":"int64"}},"required":["added","changed","deleted","unchanged"]},"Stacks":{"type":"object","properties":{"assets_uuid":{"type":"string","description":"UUID of the uploaded CDK assets for this stack"},"drift_counts":{"$ref":"#/components/schemas/Counts"},"drift_uuid":{"type":"string","description":"UUID of the uploaded drift detection results for this stack"},"error_message":{"type":"string","description":"Error message if status is failure"},"manifest_uuid":{"type":"string","description":"UUID of the uploaded CDK manifest for this stack"},"resource_counts":{"$ref":"#/components/schemas/Counts"},"stack_name":{"type":"string","description":"Name of the CDK stack"},"stack_outputs":{"type":"object","description":"Outputs generated for stack","additionalProperties":{"type":"string"}},"stack_path":{"type":"string","description":"Path to the stack within the CDK app"},"status":{"type":"string","description":"Status of the stack operation","enum":["success","failure","skipped"]},"template_uuid":{"type":"string","description":"UUID of the uploaded CloudFormation template for this stack"},"tree_uuid":{"type":"string","description":"UUID of the uploaded CDK tree for this stack"}},"description":"Stack details for multi-stack deployments"},"TerragruntDetail":{"type":"object","properties":{"cost_breakdown_uuid":{"type":"string","description":"The ID of any associated cost breakdown data"},"cost_currency":{"type":"string","description":"The currency used in cost data for this change"},"cost_diff_total_monthly":{"type":"string","description":"The difference in total monthly cost"},"cost_diff_uuid":{"type":"string","description":"The ID of any associated cost diff data"},"cost_past_total_monthly":{"type":"string","description":"The past total monthly cost"},"cost_total_monthly":{"type":"string","description":"The total monthly cost"},"cost_total_monthly_percentage_change":{"type":"string","description":"The percentage change in total monthly cost"},"drift_counts":{"$ref":"#/components/schemas/Counts"},"output_counts":{"$ref":"#/components/schemas/Counts"},"path_id":{"type":"string","description":"Path ID"},"resource_counts":{"$ref":"#/components/schemas/Counts"},"state_file_link":{"type":"string","description":"State file link"},"status":{"type":"string","description":"Status"}}},"Error":{"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"]}}}}
```

## List resource changes

> List resource changes associated with this activity

```json
{"openapi":"3.0.3","info":{"title":"Infrastructure as Code Management","version":"0.1.0"},"tags":[{"name":"activities","description":"Activities Service handles the API for workspace activities"}],"servers":[{"url":"http://localhost:80"}],"paths":{"/api/orgs/{org}/projects/{project}/activities/{id}/resource-changes":{"get":{"tags":["activities"],"summary":"List resource changes","description":"List resource changes associated with this activity","operationId":"activities#list-activity-resource-changes","parameters":[{"name":"workspace","in":"query","description":"The unique identifier for the associated workspace","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"The unique identifier for the associated workspace"}},{"name":"path_id","in":"query","description":"Terragrunt path identifier","allowEmptyValue":true,"schema":{"type":"string","description":"Terragrunt path identifier"}},{"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 activity","required":true,"schema":{"type":"string","description":"The unique identifier for this activity"}},{"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/ListActivityResourceChangesResponse"}}}},"400":{"description":"BadRequestError: Bad Request response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UnauthorizedError: Unauthorized response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"ForbiddenError: Forbidden response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NotFoundError: Not Found response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"TimeoutError: Request Timeout response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"ConflictError: Conflict response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"LockedError: Locked response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"499":{"description":"ContextCancelledError:  response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"BadGatewayError: Bad Gateway response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"ListActivityResourceChangesResponse":{"type":"object","properties":{"data_sources":{"$ref":"#/components/schemas/ResourceCollection"},"drift_changes":{"$ref":"#/components/schemas/ChangedResourceCollection"},"has_dependency_graph":{"type":"boolean","description":"Whether dependency graph data is available"},"outputs":{"$ref":"#/components/schemas/OutputCollection2"},"pipeline_execution":{"type":"string","description":"the identifier of the pipeline execution changes were made from."},"pipeline_stage":{"type":"string","description":"the identifier of the pipeline stage execution changes were made from."},"planned_changes":{"$ref":"#/components/schemas/ChangedResourceCollection"},"resources":{"$ref":"#/components/schemas/ResourceCollection"},"risk_assessment":{"$ref":"#/components/schemas/RiskAssessment"},"stage_id":{"type":"string","description":"The stage ID"},"workspace_id":{"type":"string","description":"identifier of the workspace associated with the data"}},"required":["pipeline_execution","drift_changes","planned_changes","resources","data_sources","outputs","workspace_id","stage_id"]},"ResourceCollection":{"type":"array","items":{"$ref":"#/components/schemas/HarnessIacmResource"}},"HarnessIacmResource":{"type":"object","properties":{"attributes":{"type":"object","description":"A map of values related to the resource","additionalProperties":true},"createdAt":{"type":"integer","description":"Timestamp when the resource was created.","format":"int64"},"drift_attributes":{"type":"object","description":"A map of values related to the resource","additionalProperties":true},"drift_status":{"type":"string","description":"Indicates if this resource is experiencing drift.","enum":["changed","deleted","unchanged"]},"lastSyncedAt":{"type":"integer","description":"Timestamp when the resource was last updated.","format":"int64"},"mode":{"type":"string","description":"Mode associated with the resource.","enum":["resource","data","output"]},"module":{"type":"string","description":"Module associated with the resource."},"monthly_cost":{"type":"number","description":"Current period cost from CCM (null if no cost data).","format":"double"},"monthly_saving":{"type":"number","description":"Monthly potential saving from CCM (null if no cost data).","format":"double"},"name":{"type":"string","description":"Name associated with the resource."},"path_id":{"type":"string","description":"Path associated with the resource. Could be namespace, environment or stack id."},"provider":{"type":"string","description":"Cloud provider associated with the resource."},"recommendation_count":{"type":"integer","description":"Number of CCM recommendations for this resource (null if no cost data).","format":"int64"},"resource_id":{"type":"string","description":"Unique identifier for the resource from the cloud provider."},"sensitive_attributes":{"type":"array","items":{},"description":"A list of the sensitive attribute keys "},"type":{"type":"string","description":"Type of the provisioned resource."}},"description":"Represents an individual provisioned resource.","required":["provider","type","name","module","mode","path_id","resource_id","attributes","drift_status","drift_attributes","sensitive_attributes"]},"ChangedResourceCollection":{"type":"array","items":{"$ref":"#/components/schemas/HarnessIacmChangedResource"}},"HarnessIacmChangedResource":{"type":"object","properties":{"change":{"type":"string","description":"Change made to this resource.","enum":["added","changed","deleted","unchanged","imported","removed"]},"change_count":{"type":"integer","description":"Count of changes made to this resource.","format":"int64"},"changes":{"type":"object","description":"New values for this resource","additionalProperties":{"$ref":"#/components/schemas/ValueChange"}},"drift":{"type":"boolean","description":"Indicates whether this resource is experiencing drift"},"module":{"type":"string","description":"Module associated with the resource."},"name":{"type":"string","description":"Name associated with the resource."},"provider":{"type":"string","description":"Cloud provider associated with the resource."},"type":{"type":"string","description":"Type of the provisioned resource."}},"description":"Represents a change to an individual provisioned resource.","required":["provider","type","name","module","drift","change","change_count","changes","mode","path_id","resource_id","attributes","drift_status","drift_attributes","sensitive_attributes"]},"ValueChange":{"type":"object","properties":{"change":{"type":"string","description":"Change made to this resource.","enum":["added","changed","deleted","unchanged"]},"drift":{"type":"boolean","description":"Indicates whether this attribute is experiencing drift"},"new":{"type":"string","description":"Updated value"},"old":{"type":"string","description":"Previous value."},"sensitive":{"type":"boolean","description":"Indicates whether this value is sensitive"}},"required":["change","drift","sensitive"]},"OutputCollection2":{"$ref":"#/components/schemas/ChangedOutputCollection"},"ChangedOutputCollection":{"type":"array","items":{"$ref":"#/components/schemas/HarnessIacmChangedOutput"}},"HarnessIacmChangedOutput":{"type":"object","properties":{"change":{"type":"string","description":"Change made to this resource.","enum":["added","changed","deleted","unchanged"]},"expression":{"type":"string","description":"JEXL expression for dynamic output resolution"},"name":{"type":"string","description":"Name associated with the output."},"new":{"type":"string","description":"Updated value"},"old":{"type":"string","description":"Previous value."},"sensitive":{"type":"boolean","description":"Indicates whether this value is sensitive"},"stack_path":{"type":"string","description":"Stack path for Terragrunt workspaces"}},"description":"Represents an individual output variable.","required":["change","name","value","sensitive"]},"RiskAssessment":{"type":"object","properties":{"overall_risk_summary":{"$ref":"#/components/schemas/OverallRiskSummary"},"resource_risks":{"type":"object","description":"Risk data keyed by resource address","additionalProperties":{"$ref":"#/components/schemas/ResourceRisk"}}},"description":"Risk assessment containing overall summary and per-resource risks","required":["overall_risk_summary","resource_risks"]},"OverallRiskSummary":{"type":"object","properties":{"overall_level":{"type":"string","description":"Risk level category","enum":["LOW","MEDIUM","HIGH"]},"overall_score":{"type":"integer","description":"Overall deployment risk score from 1 to 10","format":"int64","minimum":1,"maximum":10},"reason":{"type":"string","description":"Human-readable explanation of the score"}},"description":"Deployment-wide risk assessment.","required":["overall_score","overall_level","reason"]},"ResourceRisk":{"type":"object","properties":{"risk_factors":{"type":"array","items":{"type":"string"},"description":"List of risk factors"},"risk_level":{"type":"string","description":"Risk level category","enum":["LOW","MEDIUM","HIGH"]},"risk_mitigation":{"type":"array","items":{"type":"string"},"description":"Mitigation recommendations (absent when no risk factors)"},"risk_score":{"type":"integer","description":"Risk score from 1 to 10","format":"int64","minimum":1,"maximum":10}},"description":"Risk assessment for an individual resource","required":["risk_score","risk_level","risk_factors"]},"Error":{"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"]}}}}
```
