Skip to content
Get started

Get the processing status of a dataset

client.datasets.getStatus(stringdatasetID, RequestOptionsoptions?): DatasetGetStatusResponse { dataset_id, error, progress, 2 more }
GET/api/v1/datasets/{dataset_id}/status

Get the processing status of a dataset

ParametersExpand Collapse
datasetID: string
ReturnsExpand Collapse
DatasetGetStatusResponse { dataset_id, error, progress, 2 more }
dataset_id: string

Dataset ID

error: Error | null

Error details if the dataset failed. Null otherwise.

message: string

Error message

progress: Progress | null

Processing progress. Null when no run is active.

percent: number | null

Progress percentage (0-100)

processed_rows: number | null

Number of rows processed so far

total_rows: number | null

Total rows to process (samples_to_process or row_count)

row_count: number | null

Number of rows in the dataset

status: "pending" | "running" | "succeeded" | "failed"

Current processing status

One of the following:
"pending"
"running"
"succeeded"
"failed"

Get the processing status of a dataset

import Adaption from 'adaption';

const client = new Adaption({
  apiKey: process.env['ADAPTION_API_KEY'], // This is the default and can be omitted
});

const response = await client.datasets.getStatus('dataset_id');

console.log(response.dataset_id);
{
  "dataset_id": "dataset_id",
  "error": {
    "message": "message"
  },
  "progress": {
    "percent": 0,
    "processed_rows": 0,
    "total_rows": 0
  },
  "row_count": 0,
  "status": "pending"
}
Returns Examples
{
  "dataset_id": "dataset_id",
  "error": {
    "message": "message"
  },
  "progress": {
    "percent": 0,
    "processed_rows": 0,
    "total_rows": 0
  },
  "row_count": 0,
  "status": "pending"
}