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.

  • 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

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

Last updated

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