Get User Import Status

Description

This endpoint can the used to get the current status of a user import request, using /api/user/import-users

Pre-requisites

  • In order to successfully use this endpoint the logged in user must be a Mimecast administrator with at least the Directories | Import | Read permission.

URI

To use this endpoint you send a POST request to:

  • /api/user/get-import-status

Request Headers

The following request headers must be included in your request:

Field Description
Authorization Please see the Authorization guide for more information on building the Authorization header.
x-mc-req-id

A randomly generated GUID, for example,

8578FCFC-A305-4D9A-99CB-F4D5ECEFE297
x-mc-app-id The Application ID provided with your Registered API Application.
x-mc-date

The current date and time in the following format, for example,

Tue, 24 Nov 2015 12:50:11 UTC

Request Body

{
 "data": [
  {
   "id": "String"
  }
 ]
}
data
Field Type Required Description
id String Required The Mimecast secure ID of the user import request created using /api/user/import-users.

Response

{
 "fail": [], 
 "meta": {
  "status": 200
 }, 
 "data": [
  {
   "status": "String", 
   "notifyEmailAddress": "String", 
   "totalUsers": 1, 
   "allowAddressMigration": false, 
   "successfulImportedUsers": 1, 
   "id": "String", 
   "clearGroup": false, 
   "created": "Date String", 
   "sourceFile": "String", 
   "importer": "String", 
   "reportFile": "String"
  }
 ]
}
meta object
Field Type Description
status Number The function level status of the request.
meta
Field Type Description
status Number The function level status of the request.
data
Field Type Description
id String The Mimecast secure ID of the user import.
importer String Email address of the admin that performed the user import.
notifyEmailAddress String Email address of the recipient to be alerted upon import request completion
created Date String Timestamp of the user import creation, in ISO 8601 format.
totalUsers Number Number of users in the import request.
successfulImportedUsers Number Number of users that were successfully imported.
clearGroup Boolean Returns true if the destination group was cleared prior to user import. Otherwise returns false.
allowAddressMigration Boolean Returns true if the imported users were placed in specific accounts based on the accountCode field. Valid only for AAA account structures. Otherwise returns false.
sourceFile String The Mimecast secure ID of the import source file. This does not currently have a follow-up use with the public API.
reportFile String The Mimecast secure ID of the job report file. This does not currently have a follow-up use with the public API.
status String Current status of the user import job. Possible values are pending, processing or completed.

Sample Code

Sample code is provided to demonstrate how to use the API and is not representative of a production application. To use the sample code; complete the required variables as described, populate the desired values in the request body, and execute in your favorite IDE.  Please see the

 

 page to find the correct base URL to use for your account.

POST {base_url}/api/user/get-import-status
Authorization: MC {accesskKey}:{Base64 encoded signed Data To Sign}
x-mc-date: {dateTime}
x-mc-req-id: {unique id}
x-mc-app-id: {applicationId}
Content-Type: application/json
Accept: application/json


{
  "data":[
    {
      "id": "String"
    }
  ]
}
Back to Top