---
title: "Sweep emitted events"
method: POST
path: "/v1/tasks/emitted-events-sweep"
tags: ["Tasks"]
---

# Sweep emitted events

`POST /v1/tasks/emitted-events-sweep`

## Request

- The document declares no server URL.
- Auth: none declared

During the state transition event connector puts an event in an in-memory queue (and database) which is then picked up by the background process to emit the event to SQS. If the process is interrupted there is a database record which indicates that the event has been put in an in-memory queue, but not yet emitted to the SQS. <br>This task retrieves all the records that haven't been fully processed, for each event it invokes the backfill process and marks the event as processed.<br>The default age of the non-emitted event is at least 30 minutes. This value can be controlled with NOT_EMITTED_EVENT_MAX_AGE_IN_SECONDS environment variable.

## Response `200`

OK

---

[API](https://skmtc.dev/government-digital-service/apis/connector-api.md) - [All operations](https://skmtc.dev/government-digital-service/apis/connector-api/llms.txt) - [OpenAPI document](https://skmtc.dev/government-digital-service/apis/connector-api/revisions/7f294e492d3c?raw)
