Process the data from the current import operation, creating the users on Rocket.Chat. It requires the current import operation state to be ready
and it changes the operation state to importing.
{% hint style="success" %} It will return success if the conditions to start the process are met, without waiting for the import to finish. {% endhint %}
{% hint style="info" %}
It requires the run-import
permission.
{% endhint %}
URL | Requires Auth | HTTP Method |
---|---|---|
/api/v1/import.run |
yes |
POST |
{% hint style="warning" %}
- If a user can not be imported successfully it'll be flagged but the operation will not stop.
- If a user's email or username is already in use, it'll not be created.
- Only the users that were imported successfully will be removed from the staging area. {% endhint %}
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.run' \
--header 'x-auth-token: QizJozLOnWMi_2vWaLHhjfd-XYKT6XM40lTZ3zg1UMd' \
--header 'x-user-id: rbAXPnMktTFbNpwtJ' \
--header 'Content-Type: application/json' \
{
"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 |