Last updated Dec 14, 2021

Rate this page:

App data

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

Export app data from server to cloud storage

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
3
4
5
6
7
8
9
OutputStream firstDataStream = migrationGateway.createAppData(transferId);
// You can upload up to 5GB
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 app data in cloud storage

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 5 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.

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
    curl -X GET "https://your-site.atlassian.net/rest/atlassian-connect/1/migration/data/26925583-10bd-49fb-b67c-15fc2447a97b/all"
  • Sample response

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    {
        [
            {
                "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
    curl -X GET "https://your-site.atlassian.net/rest/atlassian-connect/1/migration/data/f9d95eb3-924b-43d4-8115-447beca388c3"
  • Sample response

    1
    2
    3
    {
     "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: