Last updated Apr 16, 2024

Export app data and access it in the cloud

This page explains the export app data feature of the app migration platform.

Export app data

The app migration platform uploads the app data to a secure cloud storage, and sends your cloud app the app-data-uploaded event notification when upload is complete.

See an example

This section shows you an example of sending data to the secure cloud storage.

1
2
OutputStream firstDataStream = migrationGateway.createAppData(transferId);
// You can upload up to 50GB
firstDataStream.write("Your binary data goes here".getBytes());
firstDataStream.close();

// You can also apply labels to distinguish data or to add meta data to support your import process
OutputStream secondDataStream = migrationGateway.createAppData(transferId, "some-optional-label");
secondDataStream.write("more bytes".getBytes());
secondDataStream.close();

The example above is part of our sample app.

Recommendation: The app migration platform can upload multiple files in parallel, and may not organize export files in the same sequence that you upload. If the sequence of files you upload is important, you can use file labels to help you order the export files sequentially after retrieving it to your cloud site.

Access exported data in the cloud

Your cloud app can use the App data retrieval API to access the app data exported to the secure cloud storage.

About the App data retrieval API

The endpoints of the App data retrieval API enable you to access the exported app data by performing the following tasks:

  1. Retrieve a list of s3keys uploaded by the server app under a particular transferId.
  2. Retrieve an S3 URL, signed by the app migration platform, for a given s3Key.

Limits: For compliance purposes, we have placed the following limits on the app migration platform:

  • The signed S3 URL expires one hour after your retrieve it. After the expiry time, your cloud app can request a new URL.
  • You must access the exported data within 12 days of receiving the first notification.
  • We recommend that you access data and mappings before the end of the mappings lifespan.
  • If the App data retrieval API responds to your request with a HTTP 429 error, you may have reached the request limit for the API. We recommend that you resend your request after a few minutes.
  • When the App Data API responds with an HTTP 5xx error, the issue is likely temporary. We recommend retrying the request with an exponential backoff strategy.
  • Once the transfer is settled, the App data retrieval API will return an HTTP 403 error.

Retrieve list of exported app data

Use the following endpoint to request the App data retrieval API for a list of data uploaded by the server app under a particular transferId.

Active transfers allow you to make calls to APIs of the app migration platform with a specific transferId for 14 days after you receive the first notification that your server app has been triggered. After the 14-day period, active transfers will expire. The app migration platform will return a HTTP 4XX response code to any requests that contain the transferId of an expired transfer.

MethodEndpoint
GETmigration/data/{transferId}/all

In the endpoint above, specify the transferId from which the app data was exported.

See an example

  • Sample request

    1
    2
    curl -X GET "https://your-site.atlassian.net/rest/atlassian-connect/1/migration/data/26925583-10bd-49fb-b67c-15fc2447a97b/all"
    
  • Sample response

    1
    2
    {
        [
            {
                "s3Key": "dbc96598-fc84-4c91-9e60-2fc01f705de7",
                "label": "my-data-export"
            },
            {
                "s3Key": "abc86558-jg32-5c82-9e60-2fc01f705de7"
            },
            {
                "s3Key": "f9d95eb3-924b-43d4-8115-447beca388c3",
                "label": "some-optional-label"
            }
        ]
    }
    

The label value is available only if your server app uploads app data with a label.

Retrieve a S3 URL for a s3key

Use the following endpoint to access the app data export from the cloud storage.

MethodEndpoint
GETmigration/data/{s3Key}

Replace {s3Key} with the s3Key you received with the list in the previous request.

See an example

  • Sample request

    1
    2
    curl -X GET "https://your-site.atlassian.net/rest/atlassian-connect/1/migration/data/f9d95eb3-924b-43d4-8115-447beca388c3"
    
  • Sample response

    1
    2
    {
     "url" : "http://s3DownloadableLink" 
    }
    

The example above is part of our sample app

Recommendation: Where possible, design your data retrieval process to be incremental, and consider merging data. Jira/Confluence admin users are likely to run multiple migrations that target the same cloud site.

Rate this page: