App migration

Get migration jobs

Get information about the migration jobs for your application, including progress and status, for currently running and finished jobs.

Migration Jobs are a background task. After you start one Nylas returns a success response, and the jobs run in the background until they finish. These jobs do not block other API calls, but also do not send a notification when complete. This API allows you to get general information about a them, so you can see their status.

There are two types of migration job: "snapshot" and "migration". A Snapshot job takes a snapshot of the application's v2 account data, and prepares it for migration. A Migration job actually turns the v2 account data into v3 grants.

Jobs have a status, which can be one of the following:

  • A pending job is queued and waiting to start.
  • A running job is currently in progress.
  • A partial job has finished, but was not able to migrate all accounts successfully.
  • A completed job has finished and successfully migrated all accounts.
  • A failed job has finished but did not migrate any accounts.

You can optionally filter the list of jobs to return only jobs with a specific status or type.

You can also use the sort_by_completion argument to return the list of jobs with pending and running jobs first, followed by failed, completed, and partial jobs. Finished jobs are ordered by their completion timestamp (CompletedAt) from the most recent to the oldest.

If you don't include any query parameters to filter the results, Nylas returns all jobs.

The API is rate limited to 20 requests per second per Nylas application ID.

get/v3/migration-tools/jobs

Query parameters

statusstring[]

Filter for jobs by status:

  • completed: The job finished and all accounts were migrated successfully.
  • failed: The job finished, but no accounts were migrated.
  • partial: The job finished. Some accounts were migrated successfully, and some failed.
  • pending: The job is queued.
  • running: The job is running.
typestring[]

Filter for jobs by type.

sort_by_completionboolean

When true, Nylas sorts the jobs it returns in the following order:

  1. Jobs with pending status.
  2. Jobs with running status.
  3. Jobs with all other statuses, from most to least recent CompletedAt time.

Response

Returns a list of jobs.

request_idstring

The request ID.

Example response

{
  "request_id": "5967ca40-a2d8-4ee0-a0e0-6f18ace39a90",
  "data": [
    {
      "job_id": "e19f8e1a-eb1c-41c0-b6a6-d2e59daf7f47",
      "type": "snapshot",
      "public_application_id": "e19f8e1a-eb1c-41c0-b6a6-d2e59daf7f47",
      "status": "pending",
      "count_all": 20,
      "count_success": 10,
      "count_failed": 5,
      "count_warning": 5,
      "created_at": 1617817109,
      "updated_at": 1617817109,
      "linked_job_id": "e19f8e1a-eb1c-41c0-b6a6-d2e59daf7f47"
    }
  ]
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.