Fuselage
Start Import
Triggers the process of importing users, rooms and messages to the server.
URL
Requires Auth
HTTP Method
/api/v1/startImport
yes
POST

Payload

input
{ "users": [], "channels": [] }
Required
Object containing two arrays: users and channels
users
[ {
"user_id": "bradley.hilton", "username": "bradley.hilton", "email": "[email protected]", "is_deleted": false,
"is_bot": false,
"do_import": true,
"is_email_taken": false
} ]
Required
Array of users, must be a property of the input object.
channels
[ {
"channel_id": "PyPSgdctSfa29vr59",
"name": "newRoom",
"is_archived": false,
"do_import": true,
"is_private": false,
"is_direct": false
} ]
Required
Array of channels, must be a property of the input object.
Each user described in the users array should contain the following properties:
user_id
"bradley.hilton"
Required
The unique user identifier (which is the username, since the user may not have a proper _id yet).
username
"bradley.hilton"
Required
The username for the user.
email
Required
The email address for the user.
is_deleted
false
Required
Was the described user deleted?
is_bot
false
Required
Is the described user a bot?
do_import
true
Required
Should the described user be imported?
is_email_taken
false
Required
Is there an existing user with the same email?
Similarly, each channel described in the channels array should contain the following properties:
channel_id
"4K2ovcvP5LqfxXnd5"
Required
The unique room identifier.
name
"newRoom"
Required
The username for the user.
creator
"MF72rfNWNcv9EFZsx"
Optional default: undefined
The identifier of the channel owner.
is_private
false
Required
Is the described room private?
is_direct
false
Required
Is the described room of type "Direct Messages"?
is_archived
true
Required
Is the described room archived?
do_import
false
Required
Should the described room be imported?

Example Call

1
curl -H 'X-Auth-Token: _2u_4MzRroRcnqc59GYUY_Kwgr9HgtZ9HCKn-2aIvMJ' \
2
-H 'X-User-Id: FL2fZL4ERhwA3gWiS' \
3
-H "Content-type: application/json" \
4
'http://localhost:3000/api/v1/teams.updateMember' \
5
-d '{ "input": { "users": [ { "user_id": "bradley.hilton", "username": "bradley.hilton", "email": "[email protected]", "is_deleted": false, "is_bot": false, "do_import": true, "is_email_taken": false } ], "channels": [ { "channel_id": "WheeksNSvS5bsmYyw", "name": "newRoom", "is_archived": false, "do_import": true, "is_private": false, "is_direct":false } ] } } '
Copied!

Example Result

1
{
2
"success": true
3
}
Copied!
Export as PDF
Copy link
Edit on GitHub