## Get Pipeline Document Status Counts

`DocumentGetStatusCountsResponse Pipelines.Documents.GetStatusCounts(DocumentGetStatusCountsParamsparameters, CancellationTokencancellationToken = default)`

**get** `/api/v1/pipelines/{pipeline_id}/documents/status-counts`

Count the documents in a pipeline, grouped by ingestion status.

Counts reflect each document's last recorded status rather than a freshly computed one, so a document that changed status in the last few moments may still be counted under its previous one. Use `GET /pipelines/{pipeline_id}/documents/{document_id}/status` when a single document's status has to be up to the moment.

### Parameters

- `DocumentGetStatusCountsParams parameters`

  - `required string pipelineID`

  - `string? dataSourceID`

  - `string? fileID`

  - `Boolean onlyDirectUpload`

  - `string? projectID`

### Returns

- `class DocumentGetStatusCountsResponse:`

  Counts of the documents in a pipeline, grouped by ingestion status.

  - `required IReadOnlyDictionary<string, Long> Counts`

    Number of documents per ingestion status; every status is present.

  - `required string PipelineID`

    ID of the pipeline the documents belong to.

  - `required Long TotalCount`

    Total number of documents counted.

  - `string? DataSourceID`

    Data source the counts were restricted to.

  - `string? FileID`

    File the counts were restricted to.

  - `Boolean OnlyDirectUpload`

    Whether only directly uploaded documents were counted.

### Example

```csharp
DocumentGetStatusCountsParams parameters = new()
{
    PipelineID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
};

var response = await client.Pipelines.Documents.GetStatusCounts(parameters);

Console.WriteLine(response);
```

#### Response

```json
{
  "counts": {
    "foo": 0
  },
  "pipeline_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "total_count": 0,
  "data_source_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "only_direct_upload": true
}
```
