Skip to content

Export Screenshot

The screenshots you capture with Launchbrightly are valuable. You might want to export them to your own storage service in order to have a greater control over how they can be accessed.

We currently support exporting to Cloudflare R2 storage.

1. Create a transload job request

POST /transload

Request
json
{
  "source": {
    "integrationId": "c3251228-0aa8-4d11-b54b-54fab6101d90",
    "platform": "s3",
    "fileObject": "public/company5.png"
  },
  "destination": {
    "integrationId": "7a15e898-6f43-4344-ace0-0f7d6cd60b83",
    "platform": "r2",
    "fileObject": "public/company5.png"
  }
}

The fileObject is the bucket key without the bucket name.

2. Check the progress of the transload operation

GET /transload/:id

Response:
json
{
  "id": "5f8e299b-04d9-4a2a-a440-86f6dbc7bd3e",
  "url": "https://launchbrightly.aa8a3d07732701852320591d5e867c9c.r2.cloudflarestorage.com/public/company5.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=f0689905dd4887ab9571214ef15872b6%2F20240208%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20240208T162551Z&X-Amz-Expires=3600&X-Amz-Signature=06be321f757a1596b46304376da566d9112bff5c47319188cee40ff38267c3f4&X-Amz-SignedHeaders=host&x-id=GetObject"
}

HTTP Status codes:

HTTP CodeDescription
202The job was successfully created.
422Validation-related errors
500Any unhandled exception

Bulk Exporting

If you would like to export more than just one screenshot at a time. Send an array of objects as payload:

POST /transload

Request:
json
[
  {
    "source": {
      "integrationId": "c3251228-0aa8-4d11-b54b-54fab6101d90",
      "platform": "s3",
      "fileObject": "public/company5.png"
    },
    "destination": {
      "integrationId": "7a15e898-6f43-4344-ace0-0f7d6cd60b83",
      "platform": "r2",
      "fileObject": "launchbrightly/public/company5.png"
    }
  },
  {
    "source": {
      "integrationId": "7a15e898-6f43-4344-ace0-0f7d6cd60b83",
      "platform": "s3",
      "fileObject": "public/company5.png"
    },
    "destination": {
      "integrationId": "7a15e898-6f43-4344-ace0-0f7d6cd60b83",
      "platform": "r2",
      "fileObject": "launchbrightly/public/company5.png"
    }
  }
]

Response:

json
{
  "id": "3f376ea6-8483-4091-947f-13bcd657473c",
  "transload": [
    {
      "id": "905c9331-2895-4011-a426-cef2a121d647",
      "createdAt": "2024-02-13T18:38:09.920Z",
      "updatedAt": "2024-02-13T18:38:09.920Z"
    },
    {
      "id": "8b4f0f41-b43f-4f70-977b-f212a2a21d04",
      "createdAt": "2024-02-13T18:38:10.038Z",
      "updatedAt": "2024-02-13T18:38:10.038Z"
    },
    {
      "id": "6da72fc8-0a76-4bc4-8c2e-bf5a774460d9",
      "createdAt": "2024-02-13T18:38:10.133Z",
      "updatedAt": "2024-02-13T18:38:10.133Z"
    }
  ]
}

HTTP Status codes:

HTTP CodeDescription
202The job was successfully created.
422Validation-related errors
500Any unhandled exception

Check the progress of the bulk transload operation

GET /transload/:id

Response:
json
{
  "summary": {
    "total": 2,
    "success": 2,
    "pending": 0,
    "failed": 0
  },
  "screenshots": [
    {
      "id": "14d66498-47f3-49cd-8888-9579e2fdde04",
      "jobId": "ef69dae0-9e77-48d3-822a-89c6f7a8c396",
      "status": "completed",
      "url": "https://launchbrightly-my.sharepoint.com/:i:/g/personal/hyder_launchbrightly_onmicrosoft_com/Ea4hNBNMyJBOlWsAFtZ9nd0BVcnGXSaou7OAqQpchtm7RA",
      "createdAt": "2024-09-18T07:49:41.197Z",
      "updatedAt": "2024-09-18T07:49:49.828Z"
    },
    {
      "id": "886a24f1-c478-4152-ae71-d05a87d2f7ed",
      "jobId": "ef69dae0-9e77-48d3-822a-89c6f7a8c396",
      "status": "completed",
      "url": "https://launchbrightly-my.sharepoint.com/:i:/g/personal/hyder_launchbrightly_onmicrosoft_com/EbOmLSnseNlDhD8MT6igTxMBtMuo4FqG85kfYol17ihLLQ",
      "createdAt": "2024-09-18T07:49:43.367Z",
      "updatedAt": "2024-09-18T07:49:51.257Z"
    }
  ]
}

Limitation of sending bulk requests

The API allows you to submit up to 100 screenshot capture jobs in a single request. If you have more than 100 jobs, you will need to send multiple requests.

To check the progress of multiple job IDs, separate them with commas, as shown below:

GET /transload/:jobId1,:jobId2,:jobId3