---
title: "POST /devops/tasks/{id}/result"
method: POST
path: "/devops/tasks/{id}/result"
tags: ["InternalTaskContexts"]
---

# POST /devops/tasks/{id}/result

`POST /devops/tasks/{id}/result`

Report a Task outcome; drives the existing ``update_background_task`` FSM.

MODULE-token only, restricted to the ``expanse`` module via
``AUTHENTICATION_ALLOWED_MODULES`` (mirrors ``AccountInstallationViewSet``). "Internal"
means service-to-service, NOT a private network path: like every module-authenticated
endpoint in Connect it is reached THROUGH Kong (mounted under ``public/v1/devops/tasks``),
which validates the ``ApiKey MODULE:<expanse-token>`` and injects the ``Connect-Auth``
context this auth class decodes. No portal user or account token can authenticate (a
non-module context fails ``validate_context``), so it is never user-reachable.

## Path parameters

- `id` string, required

## Request body

- EaasInternalTaskContext — Context an Expanse worker needs to execute an automation-route Task. Flattens the routing slice (``vendor_id``, ``automation_id``, ``environment``) off the related ``automation_route`` so the worker never has to know about the connector ``Environment`` model. Consumed by ``GET /internal/tasks/{task_id}``.
  - `task_id` string, required
  - `object_id` string, required
  - `event_type` string, required
  - `environment` string, required
  - `automation_id` string, required
  - `vendor_id` string, required
  - `retry_count` integer
  - `rescheduled_count` integer

## Response `200`

- EaasInternalTaskContext — Context an Expanse worker needs to execute an automation-route Task. Flattens the routing slice (``vendor_id``, ``automation_id``, ``environment``) off the related ``automation_route`` so the worker never has to know about the connector ``Environment`` model. Consumed by ``GET /internal/tasks/{task_id}``.
  - `task_id` string, required
  - `object_id` string, required
  - `event_type` string, required
  - `environment` string, required
  - `automation_id` string, required
  - `vendor_id` string, required
  - `retry_count` integer
  - `rescheduled_count` integer

## Other responses

- `400`

---

[API](https://skmtc.net/cloudblue/apis/cloudblue-connect-api.md) · [All operations](https://skmtc.net/cloudblue/apis/cloudblue-connect-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cloudblue/cloudblue-connect-api/revisions/0421d2a97c52/schema)
