Skip to main content
GET
Fetch Import

Overview

This endpoint returns the state of an import created by a v2 write endpoint: where it stands, and what became of the rows it wrote. Use this endpoint for:
  • Waiting for the values you sent to be written
  • Finding the rows an import set aside, to fix them on your side
It follows the imports of Import quota values. The imports created by the v1 endpoints are followed with the v1 Fetch import: here, their id returns 404 Not Found.

Your first call

Example response


What an import holds

An import can stay scheduled for a few minutes when another import of your company is running.

One item per quota

An import can write several quotas. Each item of resources tells what became of the rows of one of them: skipped counts the rows set aside and the values identical to the ones already stored.

A row set aside

Each item of warnings tells why a row was set aside, and repeats it: The rows set aside are an unknown or archived user, and a row replaced by a later one for the same user and period. An item of errors has the same fields, with a path of [] and a row of null.

Errors

Read the import right after the call that created it: the response is always up to date.

Authorizations

X-API-Key
string
header
required

Your Qobra API key. Generate it from Settings > API Keys in Qobra.

Path Parameters

import_id
string<ObjectId>
required

ID of an import, the import_id returned by a v2 write endpoint

Response

The state of the import.

The state of an import, with every call it merged: no result is kept per call

id
string<ObjectId>
required

ID of the import, the import_id the calls returned

status
enum<string>
required

scheduled while the import waits for its turn or for its debounce, running while it writes, finished once every resource is done

Available options:
scheduled,
running,
finished
progress
integer
required

Average progress of its resources

Required range: 0 <= x <= 100
created_at
string<date-time>
required

When the first call created the import

launched_at
string<date-time> | null
required

When the import started, null until then

finished_at
string<date-time> | null
required

When the import finished, null until then

resources
object[]
required

One item per resource the import writes