Start Import
- Print
- DarkLight
- PDF
Start Import
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Post
/api/v1/startImport
Triggers the process of importing users, rooms and messages to the workspace. Permission required: run-import
Changelog
Version | Description |
---|---|
3.0.0 | Added |
Header parameters
X-User-Id
stringRequired
The user ID.
ExampleCkCPNctrgCDfmWLqC
X-Auth-Token
stringRequired
The authentication token.
Example1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE
Body parameters
Example
{
"input": {
"users": [
{
"user_id": "testbh",
"username": "testbh",
"email": "[email protected]",
"is_deleted": false,
"is_bot": false,
"do_import": true,
"is_email_taken": false
}
],
"channels": [
{
"channel_id": "WDuJLFkjwk6L7LdFC",
"name": "dlp",
"is_archived": false,
"do_import": true,
"is_private": false,
"is_direct": false
}
]
}
}
object
input
object Required
The input object contains two arrays: users
and channels
.
users
Array of object Required
object
user_id
string Required
The unique user identifier (which is the username, since the user may not have a proper _id
yet).
Examplebradley.hilton
username
string Required
The user name.
Examplebradley.hilton
is_deleted
boolean Required
Was the described user deleted?
is_bot
boolean Required
Is the described user a bot?
do_import
boolean Required
Should the described user be imported?
is_email_taken
boolean Required
Is there an existing user with the same email?
channels
Array of object Required
object
channel_id
string Required
The unique room identifier.
Example4K2ovcvP5LqfxXnd5
name
string Required
The name of the room.
ExamplenewRoom
is_archived
boolean Required
Is the described room archived?
do_import
boolean Required
Should the described room be imported?
is_private
boolean Required
Is the described room private?
creator
string
The identifier of the room owner.
Default"undefined"
ExampleMF72rfNWNcv9EFZsx
Responses
200
OK
Success
{
"success": true
}
object
success
boolean
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string
403
Forbidden
Permission Error
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}
object
success
boolean
error
string
Was this article helpful?