Run

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.

It will return success if the conditions to start the process are met, without waiting for the import to finish.

It requires the run-import permission.

URLRequires AuthHTTP Method

/api/v1/import.run

yes

POST

  • 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.

Headers

ArgumentExampleRequiredDescription

X-User-Id

myuser-name

Required

The authenticated user ID.

X-Auth-Token

myauth-token

Required

Auth token.

Example Call

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' \

Example Result

Success

{
  "success": true
}

Error

  • No Permission: This occurs when the authenticated user doesn't have the run-import permission.

{
    "success": false,
    "error": "User does not have the permissions required for this action [error-unauthorized]"
}

Change Log

VersionDescription

6.3.0

Added

Last updated

Rocket.Chat versions receive support for six months after release.