Bulk Upload of Users
While App47 supports AD integration, you might find you'd rather upload a lot of Users via a spreadsheet. This can be done via our API; what's more, we've created a project to handle this exact need. Check out Enchilada – this code allows you to create a list of users via an Excel file and upload them into your App47 Account.
All that's needed is a user's name, email, and an auto-approve flag (true or false are accepted values). Next, you'll need your App47 Account's API token, which can be found in the Account section of the Dashboard. Then run the code and you're set to go!
Bulk user & device creation API
App47 supports a bulk API for creating users (and any corresponding devices). At this time, the API endpoint supports JSON only. This endpoint works nearly identically to the device/user endpoint. However, instead of a single document, this endpoint accepts an array of documents.
URLs:
Action | HTTP method | URL |
---|---|---|
create | POST | https://cirrus.app47.com/api/bulk_users_devices |
Note: This is a special endpoint that only permits bulk creation.
The array of documents should contain documents in the form of:
{ "device": { "unique_identifier":"qwerty1234555", "description":"My device test one", "platform":"iOS" }, "user": { "name":"User One 5", "email":"user.one.+@mailinator.com" } }
Note that a document instance contains a device along with a corresponding user. The device aspect is not required.
Creating multiple user/devices in one shot then becomes:
options = { headers: {'X-Token':'ZSUVSOtxOdqpzJ9u24CPIg', 'Accept':"application/json", 'Content-Type': 'application/json' } } deviceUserArray = [] range = [0..2] for num in range deviceUserArray.push { device: { unique_identifier: "blah-blahxxx-#{num}", description: 'My device test one', platform: 'iOS' } \ , user: { name: "test_user_#{num}", email: "user.xx.#{num}.+@mailinator.com" } } createOptions = options createOptions['data'] = JSON.stringify deviceUserArray client.post('https://cirrus.app47.com/api/bulk_users_devices', createOptions).on 'complete', (data, response) -> # handle response...
The response is a JSON array of documents that consist of the user's corresponding App47 Id, plus their name and email.
Comments
0 comments
Please sign in to leave a comment.