Get Import Operation Status
    • Dark
      Light
    • PDF

    Get Import Operation Status

    • Dark
      Light
    • PDF

    Article summary

    Get
    /api/v1/import.status

    Get the status of the current import operation.Permission required: run-import

    Changelog

    VersionDescription
    6.3.0Added
    Header parameters
    X-User-Id
    stringRequired

    The user ID.

    ExampleCkCPNctrgCDfmWLqC
    X-Auth-Token
    stringRequired

    The authentication token.

    Example1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE
    Responses
    200

    The following operation statuses are possible for the operation:

    • none: No import operation was ever created.
    • new: An operation was created but no data was added to it.
    • loading: A traditional importer is currently loading data from a file to the import operation.
    • ready: An operation was created and has data ready to import.
    • importing: The import operation is running and the users are being created.
    • error: An error caused the operation to stop running.
    • canceled: The operation was interrupted by an administrator.
    • done: The operation was completed successfully.

    Note the following points: 1. The operation is considered successful if it processes every user in the staging area, even if no user is imported. 2. You can check how many users have been imported or failed to import with the operation.count.completed and operation.count.error attributes. 3. The data from users that failed to import will remain in the staging area after the operation is complete. 4. While the operation is running, the values on operation.count are only updated once after every 50 users are processed.

    Success Example
    {
      "state": "ready",
      "operation": {
        "_id": "64d51ea91558939980aab371",
        "type": "api",
        "importerKey": "api",
        "ts": "2023-08-10T17:30:17.519Z",
        "status": "importer_user_selection",
        "valid": true,
        "user": "7TY57bBj3xQXvf2i2",
        "_updatedAt": "2023-08-10T17:41:20.052Z",
        "count": {
          "total": 2,
          "users": 2
        }
      },
      "success": true
    }
    Expand All
    object
    state
    string
    operation
    object
    _id
    string
    type
    string
    importerKey
    string
    ts
    string
    status
    string
    valid
    boolean
    user
    string
    _updatedAt
    string
    count
    object
    total
    integer
    users
    integer
    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?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.