Creates a new import operation; If an operation was already running, it will be aborted. Any data from previous imports will be cleared automatically.
{% hint style="info" %}
It requires the run-import
permission.
{% endhint %}
URL | Requires Auth | HTTP Method |
---|---|---|
/api/v1/import.new |
yes |
POST |
Argument | Example | Required | Description |
---|---|---|---|
X-User-Id | myuser-name | Required | The authenticated user ID. |
X-Auth-Token | myauth-token | Required | Auth token. |
curl --location --request POST 'http://localhost:3000/api/v1/import.new' \
--header 'x-auth-token: QizJozLOnWMi_2vWaLHhjfd-XYKT6XM40lTZ3zg1UMd' \
--header 'x-user-id: rbAXPnMktTFbNpwtJ' \
--header 'Content-Type: application/json' \
--data ''
{
"operation": {
"_id": "64d69545ee8ae821983005f5",
"type": "api",
"importerKey": "api",
"ts": "2023-08-11T20:08:37.655Z",
"status": "importer_new",
"valid": true,
"user": "rbAXPnMktTFbNpwtJ",
"_updatedAt": "2023-08-11T20:08:37.655Z"
},
"success": true
}
- No Permission: This occurs when the authenticated user doesn't have the
run-import
permission.
{% tabs %} {% tab title="No Permission" %}
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}
{% endtab %} {% endtabs %}
Version | Description |
---|---|
6.3.0 |
Added |