---
title: "Get DCI history export state"
method: GET
path: "/v1/data-export/{task-id}"
tags: ["Data Export"]
---

# Get DCI history export state

`GET /v1/data-export/{task-id}`

## Request

- Base URL: `http://127.0.0.1:8000`
- URL: `http://127.0.0.1:8000/v1/data-export/{task-id}`
- Auth: HTTP bearer

Retrieve state and progress of an export task started by POST /v1/data-export. Export statistics and archive size are included once the task is completed. Only the user who started the export can query it.

## Path parameters

- `task-id` integer, required

## Response `200`

Export state

- DataExportState
  - `taskId` integer: Background task ID
  - `state` 'pending' | 'running' | 'completed' | 'failed': Current task state
  - `progress` integer: Completion percentage
  - `failureReason` string, nullable: Failure description for failed tasks
  - `metricCount` integer: Number of exported metrics (completed tasks only)
  - `skippedCount` integer: Number of selected DCIs skipped as non-numeric or inaccessible (completed tasks only)
  - `sampleCount` integer: Number of sample rows in data.csv (completed tasks only)
  - `archiveSize` integer: Archive size in bytes (completed tasks only)
  - `mappingAvailable` boolean: True if a pseudonym mapping file was produced (completed tasks only)

## Other responses

- `401`: Unauthorized
- `403`: Export was started by another user
- `404`: Export task does not exist or its files have already been removed

## Changes

- **2026-10-19** `290af90fdb5a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/netxms/apis/netxms-api/changes/v1/data-export/:task-id/get.md)

---

[API](https://skmtc.dev/netxms/apis/netxms-api.md) - [All operations](https://skmtc.dev/netxms/apis/netxms-api/llms.txt) - [OpenAPI document](https://skmtc.dev/netxms/apis/netxms-api/revisions/740d85ba6674?raw)
