---
title: "CDC Sink: Get Task Info"
description: "How to retrieve the current state of a CDC Sink task using the RavenDB Client API (GetOngoingTaskInfoOperation) and through the Management Studio."
url: "https://docs.ravendb.net/7.2/server/ongoing-tasks/cdc-sink/manage-cdc-sink-tasks/get-task-info"
version: "7.2"
language: "csharp"
---

# CDC Sink: Get Task Info

> Client language: C#.
>
> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

> **Note**
>
> - Retrieve information about a CDC Sink task, including its configuration, task state,
>   connection status, responsible node, and last reported error.
>
> - This article shows how to get CDC Sink task info using the Client API, Studio, or REST API.
>
> - In this article:
>   - [Get CDC Sink task info via Client API](#get-cdc-sink-task-info-via-client-api)
>   - [Get CDC Sink task info via Studio](#get-cdc-sink-task-info-via-studio)
>   - [Get CDC Sink task info via REST API](#get-cdc-sink-task-info-via-rest-api)

## Get CDC Sink task info via Client API {#get-cdc-sink-task-info-via-client-api}

Use `GetOngoingTaskInfoOperation` with `OngoingTaskType.CdcSink`  
to retrieve information about a specific CDC Sink task.

### Get task info by task ID

Pass the numeric `taskId` together with `OngoingTaskType.CdcSink`.

#### Sync

```csharp
var taskInfo = (OngoingTaskCdcSink)store.Maintenance.Send(
    new GetOngoingTaskInfoOperation(taskId, OngoingTaskType.CdcSink));
```

#### Async

```csharp
var taskInfo = (OngoingTaskCdcSink)await store.Maintenance.SendAsync(
    new GetOngoingTaskInfoOperation(taskId, OngoingTaskType.CdcSink));
```

### Get task info by task name

Pass the task name together with `OngoingTaskType.CdcSink`.

#### Sync

```csharp
var taskInfo = (OngoingTaskCdcSink)store.Maintenance.Send(
    new GetOngoingTaskInfoOperation("MyCdcSinkTaskName", OngoingTaskType.CdcSink));
```

#### Async

```csharp
var taskInfo = (OngoingTaskCdcSink)await store.Maintenance.SendAsync(
    new GetOngoingTaskInfoOperation("MyCdcSinkTaskName", OngoingTaskType.CdcSink));
```

---

The returned `OngoingTaskCdcSink` object exposes the task's identity, configuration, connection details,  
and runtime status, including:

**Identity**

| Field | Description |
| - | - |
| `TaskId` / `TaskName` | Task identity |

**State & status**

| Field | Description |
| - | - |
| `TaskState` | `Enabled`, `Disabled`, or `PartiallyEnabled` |
| `TaskConnectionStatus` | `Active`, `NotActive`, `Reconnect`, or `NotOnThisNode` |
| `ResponsibleNode` | The cluster node currently running the task. |
| `Error` | The last error reported by the task, if any. |
| `HealthIssue` | `null` when healthy; a diagnostic message when the task detects a problem<br />(fallback mode, stale connection, etc.) |

**Connection & configuration**

| Field | Description |
| - | - |
| `ConnectionStringName` | Name of the connection string the task uses. |
| `FactoryName` | The source provider (PostgreSQL, SQL Server, or MySQL/MariaDB). |
| `Configuration` | The full `CdcSinkConfiguration` (tables, column mappings, and other saved settings). |

**Runtime & lag**

| Field | Description |
| - | - |
| `LastBatchTime` | UTC time of the last successfully completed batch.<br />`null` if no batch has completed yet. |
| `LastCheckpoint` | The last successfully persisted checkpoint (LSN/GTID). |
| `SecondsSinceLastBatch` | Seconds since the last successful batch. Provides a simple lag indicator.<br />`null` if no batch has completed yet. |
| `LastActivityTime` | UTC time of the last activity from the source<br />(poll iteration, replication message, or binlog event).<br />`null` before the first activity. |
| `SecondsSinceLastActivity` | Seconds since the last source activity.<br />A large value may indicate a dead connection. |

> **Info**
>
> For performance and progress metrics (per-table statistics, initial-load progress),
> see [Monitoring](https://docs.ravendb.net/7.2/server/ongoing-tasks/cdc-sink/monitoring.md).

## Get CDC Sink task info via Studio {#get-cdc-sink-task-info-via-studio}

![Get task info](https://docs.ravendb.net/assets/images/get-task-info-122e5561400a1af01e582a0943ba24a8.png)

1. Navigate to **Databases** → your database → **Tasks** → **Ongoing Tasks**.
2. On the CDC Sink task row, click the **details toggle** to expand the task and open the detail view.

## Get CDC Sink task info via REST API {#get-cdc-sink-task-info-via-rest-api}

CDC Sink uses the shared single-task info endpoint.  
Identify the task either by ID (`key`) or by name (`taskName`), together with `type=CdcSink`.

| Method | Endpoint | Auth |
| - | - | - |
| `GET` | `/databases/{databaseName}/task?key={taskId}&type=CdcSink` | `ValidUser` |
| `GET` | `/databases/{databaseName}/task?taskName={taskName}&type=CdcSink` | `ValidUser` |

## See also

- [Enable / Disable a Task](https://docs.ravendb.net/7.2/server/ongoing-tasks/cdc-sink/manage-cdc-sink-tasks/enable-disable-task.md)
- [Monitoring](https://docs.ravendb.net/7.2/server/ongoing-tasks/cdc-sink/monitoring.md)
- [Ongoing Task Operations](https://docs.ravendb.net/7.2/client-api/operations/maintenance/ongoing-tasks/ongoing-task-operations.md)
