> 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/workspaces/send-event.md).

# Send event

Store binary data generated by the provisioner, such as plans and state files.

```json
{"openapi":"3.0.3","info":{"title":"Infrastructure as Code Management","version":"0.1.0"},"tags":[{"name":"workspaces","description":"Workspaces Service handles the API for managing workspaces\nand triggering workflows against them."}],"servers":[{"url":"http://localhost:80"}],"paths":{"/api/orgs/{org}/projects/{project}/workspaces/{workspace}/events":{"post":{"tags":["workspaces"],"summary":"Send event","description":"Store binary data generated by the provisioner, such as plans and state files.","operationId":"workspaces#send-event","parameters":[{"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":"workspace","in":"path","description":"Workspace associated with this event","required":true,"schema":{"type":"string","description":"Workspace associated with this event","minLength":1,"maxLength":1024}},{"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}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEventRequest"}}}},"responses":{"200":{"description":"OK response."},"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":{"SendEventRequest":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"type":"string"}},"event_type":{"type":"string","description":"The type of event that occurred","enum":["plan","drifted","provisioning","destroying","active","inactive","apply_needed","failed","stage-complete"]},"metadata":{"$ref":"#/components/schemas/ActivityMetadata"},"pipeline_execution_id":{"type":"string","description":"Deprecated: use metadata instead","default":""},"pipeline_stage_id":{"type":"string","description":"Deprecated: use metadata instead","default":""}},"required":["event_type"]},"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"]}}}}
```
