API methods exposed to perform app migrations in Forge apps. These methods will aid in manipulating and retrieving data related to the app migration, to allow vendors to perform any additional migration related actions.
See Set up Forge for details of the software required to develop Forge apps.
To consume the migrations module, add the following dependency to package.json
:
"@forge/migrations": "0.5.0"
In your Forge app, include the following:
import migration from '@forge/migrations';
The migration modules contains the below APIs which include methods that assist with migration related functions:
Returns the set of all S3 keys for a particular transferId
getAppDataList: (transferId: string) => Promise<AppDataListResponse>;
Returns the contents of a S3 file, given its s3Key
, used in conjunction with getAppDataList
to retrieve uploaded file data
getAppDataPayload: (s3Key: string) => Promise<APIResponse>;
Returns a set of containers with a specified containerType
.
These are the valid values for containerType
:
ConfluenceSpace
JiraProject
Site
getContainers: (transferId: string, containerType: string) => DefaultQueryBuilder;
Returns all mappings for a particular namespace for the scope of this app only.
getMappingById: (transferId: string, namespace: string, keys: Array<string>) => Promise<MappingResponse>;
Returns a paginated set of mappings for a particular namespace
getMappings: (transferId: string, namespace: string) => DefaultQueryBuilder;
With a response in the following format:
{
"results": [
{
"key": "10104",
"value": "10009"
},
{
"key": "10107",
"value": "10006"
}
]
}
messageProcessed: (transferId: string, messageId: string) => Promise<void>;
Required to update the status of migrations. If this is not called within 15 minutes, then the migration will be deemed as TIMED_OUT
See P2 to Forge Migrations for more information
See Get help for how to get help and provide feedback.