Step 2 - Retrieve List of Jobs

Overview

Once you've sent your migration file via SFTP, you can retrieve a list of all jobs created from the clientId specified within the migration job file.

Fetch Aerosync Token

Fetching statuses on the migration jobs require a separate Aerosync-specific token, different from the tokens used for payment APIs (user creation, transactions).

Staging - POST [<https://api.staging.aerosync.com/v1/token](https://api.staging.aerosync.com/v1/token)>

Production - POST [<https://api.aerosync.com/v1/token](https://api.aerosync.com/v1/token)>

curl --location 'https://api.aerosync.com/v1/token' \
--header 'Content-Type: application/json' \
--data '{
	"apiKey":"test1",
	"apiSecret": "test1"
}'

Response Example

{
    "status": "success",
    "statusCode": 200,
    "TTL": "1800",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIxYTJlNTBkMi01OWFlLTQ5OTktYjMyZC00YTQ5YjM3YmMyN2EiLCJleHAiOjE3MTUyMDIyNjYsIkNsaWVudElkIjoiMWYyMTIzNTYtZmNlYi00MmViLWFiZTQtYWE5MjJhY2YyY2Q1IiwiQ2xpZW50TmFtZSI6IkFlcm9wYXkgRGV2In0.4LUNZB5gIAsJi9niz65w4Qr6n_qo17UlefunJ2SJM7w"
}

Retrieve List of Jobs

Staging - POST <https://api.staging.aerosync.com/v1/clients/{client_id}/jobs

Production - POST <https://api.aerosync.com/v1/clients/{client_id}/jobs

Request Parameters

ParameterRequired?TypeDescription
client_idYesstringSpecified within the migration file

Request Example

GET https://api.staging.aerosync.com/v1/clients/{client_id}/jobs
Authorization: Bearer {token}

Response Example - Three jobs created in total

{
    "status": "success",
    "statusCode": 200,
    "client_id": "myClientId",
    "jobs": [
        {
            "job_id": "63c9f8ef-7e50-464f-8a23-a319647a2e9d",
            "created_at": "2024-09-03T19:06:25.490972+00:00"
        },
        {
            "job_id": "a43df75e-3f8a-402a-94bb-388d5e8ff99c",
            "created_at": "2024-09-03T19:19:15.434616+00:00"
        },
        {
            "job_id": "b4a09864-2028-4646-b7df-07adf1498db8",
            "created_at": "2024-09-03T19:03:39.118087+00:00"
        }
    ]
}

Retrieve Job

Staging - POST <https://api.staging.aerosync.com/v1/clients/{client_id}/jobs/{{job_id}}

Production - POST <https://api.aerosync.com/v1/clients/{client_id}/jobs/{{job_id}}