User export resources
Trigger User export
Allows to trigger a User export as txt/csv
file containing a list of users. Requires the User Admin
role.
POST /export/users
Parameter | Type | Default | Required | Description |
---|---|---|---|---|
include_deleted |
Boolean |
false | ✗ | Wether deleted users are included |
with_invite |
Boolean |
false | ✗ | If set to true, the file will contain an additional column containing an invite link for inactive users. |
filter |
String |
✗ | Filter for active or inactive users. Allowed values: active and inactive. |
Response
The request will be returned, immediately. The export is running in the background.
{
"export_id": 4,
"start_date": "2018-07-30T16:39:19.000Z",
"file_size": null,
"user_id": 1,
"end_date": null,
"filename": "starmind_user_export_20180731-234412.csv",
"count": null,
"status": "processing",
"message": null
}
Available exports
Returns all User exports for the network. A finished export is indicated with status: "success".
GET export/users
Response
[
{
"export_id": 1,
"start_date": "2018-07-30T16:10:19.000Z",
"file_size": null,
"user_id": 1,
"end_date": null,
"filename": "network_user_export_inactive_20180730-161019.csv",
"count": null,
"status": "processing",
"message": null
},
{
"export_id": 2,
"start_date": "2018-07-30T16:13:22.000Z",
"file_size": 1129207,
"user_id": 1,
"end_date": "2018-07-30T16:13:44.000Z",
"filename": "network_user_export_20180730-161322.csv",
"count": 32103,
"status": "success",
"message": null
},
{
"export_id": 3,
"start_date": "2018-07-31T12:00:00.000Z",
"file_size": null,
"user_id": 1,
"end_date": null,
"filename": "network_user_export_20180731-120000.csv",
"count": null,
"status": "error",
"message": "Error occurred"
}
]
Export
Returns a User export by ID. Each export can have following states:
"success", "processing", "error".
If a User export is in status "success", the file_size
(bytes), count
(number of exported users) and end_date
will be provided, additionally.
GET export/users/:ID
Response
{
"export_id": 2,
"start_date": "2018-07-30T16:13:22.000Z",
"file_size": 1129207,
"user_id": 1,
"end_date": "2018-07-30T16:13:44.000Z",
"filename": "network_user_export_20180730-161322.csv",
"count": 32103,
"status": "success",
"message": null
}
Export download
Returns a csv file containing the User export. Content-Type: txt/csv
, Encoding: UTF-16LE
, with the following columns:
id, first name, last name, email, email behaviour, interface language, content languages, gender, country, location, company, department, position, about, auth type, unique id, date created, first seen, last seen, date deleted, is initialized, is activated, is deleted, invite link
Please note that fields are TAB separated.
All datetime columns (date created
, first seen
, etc.) are formatted according to the pattern yyyy-MM-dd HH:mm:ss
and are always in timezone UTC+00
.
If the with_invite
parameter is set to true, the response contains an additional column invite link
.
GET export/users/:ID/file
Response
network_user_export_20180730-161322.csv