> 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/provisioner-activities/complete-activity.md).

# Complete activity

Complete a provisioner activity with results or error.

```json
{"openapi":"3.0.3","info":{"title":"Infrastructure as Code Management","version":"0.1.0"},"tags":[{"name":"provisioner_activities","description":"Provisioner Activities Service handles the API for managing provisioner activity lifecycle.\nThis API provides explicit start and complete endpoints for provisioner operations (CDK, Terraform)."}],"servers":[{"url":"http://localhost:80"}],"paths":{"/api/orgs/{org}/projects/{project}/workspaces/{workspace}/provisioner-activities/{activity_id}/complete":{"post":{"tags":["provisioner_activities"],"summary":"Complete activity","description":"Complete a provisioner activity with results or error.","operationId":"provisioner_activities#complete-activity","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 identifier","required":true,"schema":{"type":"string","description":"Workspace identifier","minLength":1,"maxLength":128}},{"name":"activity_id","in":"path","description":"The activity identifier from start-activity","required":true,"schema":{"type":"string","description":"The activity identifier from start-activity","format":"uuid"}},{"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/CompleteActivityRequest"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteActivityResponse"}}}},"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":{"CompleteActivityRequest":{"type":"object","properties":{"cdk_result":{"$ref":"#/components/schemas/CDKResult"},"error_message":{"type":"string","description":"Error message if status is failed"},"status":{"type":"string","description":"Final status of the activity","enum":["completed","failed"]}},"required":["status"]},"CDKResult":{"type":"object","properties":{"stacks":{"type":"array","items":{"$ref":"#/components/schemas/CDKStackResult"},"description":"Results for each stack"}},"description":"Result of a CDK activity (synth, deploy, destroy)"},"CDKStackResult":{"type":"object","properties":{"assets_uuid":{"type":"string","description":"UUID of the uploaded CDK assets"},"drift_counts":{"$ref":"#/components/schemas/Counts"},"drift_uuid":{"type":"string","description":"UUID of the uploaded drift detection results"},"error_message":{"type":"string","description":"Error message if status is failure"},"manifest_uuid":{"type":"string","description":"UUID of the uploaded CDK manifest"},"resource_counts":{"$ref":"#/components/schemas/Counts"},"stack_name":{"type":"string","description":"Name of the CDK stack"},"stack_outputs":{"type":"object","description":"Stack outputs after deployment","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","in_sync","drifted"]},"template_uuid":{"type":"string","description":"UUID of the uploaded CloudFormation template"},"tree_uuid":{"type":"string","description":"UUID of the uploaded CDK tree"}},"description":"Result information for a single CDK stack in a multi-stack deployment","required":["stack_name","status"]},"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"]},"CompleteActivityResponse":{"type":"object","properties":{"activity_id":{"type":"string","description":"The activity identifier"},"completed_at":{"type":"integer","description":"Unix timestamp in milliseconds when activity completed","format":"int64"},"status":{"type":"string","description":"Final status of the activity","enum":["completed","failed"]},"workspace_status":{"type":"string","description":"Updated workspace status after activity completion","enum":["active","inactive","provisioning","destroying","failed","unknown","rollback_applied","drifted"]}},"required":["activity_id","status","completed_at"]},"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"]}}}}
```
