Migration Package REST APIs
Overview
Oracle CPQ supports Migration Package REST API endpoints to aid administrators in the creation, distribution, and deployment of migration packages to different environments. Migration Resource endpoints retrieve the data source entities that are required for successful migration. Oracle CPQ supports retrieving all migration resources, migration resources within a defined Oracle CPQ category, and specific migration resources from within a category.
The following Oracle CPQ Migration REST API endpoints are available in the Integration Catalog and do not require a Service Request on My Oracle Support:
-
Get List of Migration Packages
-
Get Migration Package Properties
-
Export Migration Package
-
Import Migration Package
The following Migration Package and Migration Resource endpoints require you to log a Service Request on My Oracle Support to be available in the Oracle CPQ Integration Catalog:
-
Create a Migration Package
-
Update a Migration Package
-
Delete a Migration Package
-
Get All Migration Package Content
-
Get Migration Package Category Content
-
Get Migration Package Content Dependencies
-
Get Migration Package Resource Low-level Details
-
Update Migration Package Content
-
Update Migration Package Resource Low-Level Details
-
Version a Migration Package
-
Migrate Package
-
Upload ZIP file for a Migration Package
-
Get All Migration Resources
-
Get Category Migration Resources
-
Get Category Resource Low-level Details
-
Get Dependencies of the Selected Migration Resources or Migration Package from Source Site
-
Migrate Selected Migration Resources or Migration Package from Source Site
Refer to the Task REST APIs for the following task-related functions: Get List of Tasks, Get Task, Cancel Task, Get Task File List, and Download a Task File.
Oracle CPQ uses HTTP Basic authentication to authenticate REST calls from third-party systems. When making a call to an Oracle CPQ REST API, the third-party system’s REST client must have encrypted Oracle CPQ login credentials in the Header and an Accept Header that both adhere to HTTP Basic authentication standards. The Accept Header must be set to application/schema+json
to see the detailed schema of the resource. For more information see the topic Supported REST Headers.
Administration
Note: The migration package REST APIs are only available for users with administrative permissions and access to the Migration feature.
Get List of Migration Packages
Get List of Migration Packages | ||
---|---|---|
Description |
This endpoint retrieves a list of migration packages. |
|
URI Endpoint |
/rest/v17/migrationPackages |
|
Endpoint Parameters |
None required |
|
q |
(Optional) Declares a query expression to specify filtering criteria. | |
fields |
(Optional) Specifies a comma-separated list of fields to be included in response. |
|
orderby |
(Optional) Specifies a comma-separated list of pairs to order the response by. | |
For more information, see Query Specification Syntax. |
||
HTTP Method |
GET |
|
Request Body Parameters |
None |
|
Response Body Parameters |
The REST API returns the following items for each package: |
|
name |
The name of the migration package | |
description |
The description for the migration package | |
version |
The version of the migration package | |
dateRelease |
The date the migration package was released | |
dateAdded |
The date the migration package was added | |
dateModified |
The date of the last migration package modification | |
identifier |
The unique identifier for the migration package | |
dependencies |
A list of migration package dependencies |
https://sitename.oracle.com/rest/v17/migrationPackages
{ "items": [{ "name": "Migration Package", "identifier": "migrationPackage_v1", "version": 1, "dateAdded": "2020-04-17T14:10:20.000Z", "dateModified": "2020-04-17T14:10:20.000Z", "dependencies": { "items": [] }, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/migrationPackages/migrationPackage_v1" } ] }, { "name": "ABO Utilities", "identifier": "aBOUtilities_v1", "version": 1, "dateAdded": "2020-04-17T14:11:12.000Z", "dateModified": "2020-04-17T14:11:12.000Z", "dependencies": { "items": [] }, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/migrationPackages/aBOUtilities_v1" } ] }, { "name": "Migration Package", "identifier": "migrationPackage_v2", "version": 2, "dateRelease": "2020-04-17T05:00:00.000Z", "dateAdded": "2020-04-17T14:12:52.000Z", "dateModified": "2020-04-17T14:14:10.000Z", "dependencies": { "items": [{ "name": "ABO Utilities", "version": 1 } ] }, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/migrationPackages/migrationPackage_v2" } ] } ], "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/migrationPackages" } ] }
Get Migration Package Properties
https://sitename.oracle.com/rest/v17/migrationPackages/migrationPackage_v2
{ "name": "Migration Package", "identifier": "migrationPackage_v2", "version": 2, "dateAdded": "2020-04-15T21:01:57.000Z", "dateModified": "2020-04-15T21:01:57.000Z", "dependencies": { "items": [] }, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/migrationPackages/migrationPackage_v2" } ] }
Description |
This endpoint creates a new migration package. |
|
---|---|---|
URI Endpoint |
/rest/v17/migrationPackages |
|
Endpoint Parameters |
None |
|
HTTP Method |
POST |
|
Request Body Parameters |
name |
(Required) The name of the migration package |
description |
(Optional) The description of the migration package | |
dateRelease |
(Optional) The date, in yyyy-MM-dd format, the migration package was released | |
contents |
(Optional) A list of migration package contents | |
dependencies |
(Optional) A list of migration package dependencies | |
Response Body Parameters |
name |
The name of the migration package |
identifier |
The unique identifier for the migration package. The identifier is auto-generated based on input package name and version number. | |
description |
The description of the migration package | |
version |
The version of the migration package. The default version value is 1. | |
dateRelease |
The date the migration package was released | |
dateAdded |
The date the migration package was added | |
dateModified |
The date of the last migration package modification | |
dependencies |
A list of migration package dependencies |
https://sitename.oracle.com/rest/v17/migrationPackages
{ "name": "pkg2", "contents": { "items": [{ "name": "Commerce", "category": "COMMERCE", "children": [{ "name": "Formula", "variableName": "formula", "resourceType": "process" }, { "name": "Test", "variableName": "test", "resourceType": "process", "granular": true, "children": [{ "name": "Move", "variableName": "_action_process_move", "resourceType": "action", "modifiedByUser": "matt", "lastModified": "07/05/2023 11:28 PM" }, { "name": "Email", "variableName": "_action_process_email_print", "resourceType": "action", "modifiedByUser": "matt", "lastModified": "07/05/2023 11:28 PM" }, { "name": "Main", "variableName": "main", "resourceType": "document", "modifiedByUser": "matt", "lastModified": "07/05/2023 11:27 PM" } ] } ] } ] } }
{ "name": "pkg2", "identifier": "pkg2_v1", "version": 1, "dateAdded": "2023-08-24T09:31:42.000Z", "dateModified": "2023-08-24T09:31:42.000Z", "dependencies": {}, "links": [{ "rel": "self", "href": "http://sitename.oracle.com /rest/v17/migrationPackages/pkg2_v1" }, { "rel": "child", "href": "http://sitename.oracle.com /rest/v17/migrationPackages/pkg2_v1/contents", "name": "contents" } ] }
Description |
This endpoint updates the migration package properties of an existing migration package. Only specified properties are added or updated using the PATCH method. |
|
---|---|---|
URI Endpoint |
/rest/v17/migrationPackages/{id} |
|
Endpoint Parameters |
id |
The unique identifier for the migration package the user wants to update |
HTTP Method |
PATCH |
|
Request Body Parameters |
description |
(Optional) The description of the migration package |
dateRelease |
(Optional) The date the migration package was released | |
contents |
(Optional) A list of migration package contents | |
dependencies |
(Optional) A list of migration package dependencies | |
Response Body Parameters |
name |
The name of the migration package |
identifier |
The unique identifier for the migration package | |
description |
The description of the migration package | |
version |
The version of the migration package | |
dateRelease |
The date the migration package was released | |
dateAdded |
The date the migration package was added | |
dateModified |
The date of the last migration package modification | |
dependencies |
A list of migration package dependencies |
https://sitename.oracle.com/rest/v17/migrationPackages/pkg2_v1
{ "name": "pkg2", "contents": { "items": [{ "name": "Commerce", "category": "COMMERCE", "children": [{ "name": "Formula", "variableName": "formula", "resourceType": "process" }, { "name": "Test", "variableName": "test", "resourceType": "process", "granular": true, "children": [{ "name": "Move", "variableName": "_action_process_move", "resourceType": "action", "modifiedByUser": "matt", "lastModified": "07/05/2023 11:28 PM" }, { "name": "Email", "variableName": "_action_process_email_print", "resourceType": "action", "modifiedByUser": "matt", "lastModified": "07/05/2023 11:28 PM" }, { "name": "Main", "variableName": "main", "resourceType": "document", "modifiedByUser": "matt", "lastModified": "07/05/2023 11:27 PM" } ] } ] } ] } }
{ "name": "pkg2", "identifier": "pkg2_v1", "version": 1, "dateAdded": "2023-08-24T09:31:42.000Z", "dateModified": "2023-08-24T09:31:42.000Z", "dependencies": {}, "links": [{ "rel": "self", "href": "http://sitename.oracle.com /rest/v17/migrationPackages/pkg2_v1" }, { "rel": "child", "href": "http://sitename.oracle.com /rest/v17/migrationPackages/pkg2_v1/contents", "name": "contents" } ] }
Description |
This endpoint deletes a migration package. |
|
---|---|---|
URI Endpoint |
/rest/v17/migrationPackages/{id} |
|
Endpoint Parameters |
id |
The unique identifier for the migration package |
HTTP Method |
DELETE |
|
Request Body Parameters |
None |
|
Response Body Parameters |
HTTP Code 204 |
https://sitename.oracle.com/rest/v17/migrationPackages/migrationPackage_v1
Get All Migration Package Content
Description |
This endpoint retrieves all migration resources included in an existing package. |
|
---|---|---|
URI Endpoint |
/rest/v17/migrationPackages/{id}/contents |
|
Endpoint Parameters |
id |
The unique identifier for the migration package |
HTTP Method |
GET |
|
Request Body Parameters |
None |
|
Response Body Parameters |
JSON data containing all migration resource properties |
https://sitename.oracle.com/rest/v17/migrationPackages/migrationPackage_v1/contents
{ "items": [{ "name": "Configuration", "category": "CONFIGURATION", "children": [{ "name": "Integration", "variableName": "integration", "resourceType": "product_family_configuration" } ] }, { "name": "Commerce", "category": "COMMERCE", "children": [{ "name": "Test", "variableName": "test", "resourceType": "process" } ] } ], "links": [{ "rel": "self", "href": "http://sitename.oracle.com /rest/v17/migrationPackages/migrationPackage_v1/contents" }, { "rel": "parent", "href": "http://sitename.oracle.com /rest/v17/migrationPackages/migrationPackage_v1" } ] }
Get Migration Package Category Content
Description |
This endpoint retrieves all migration resources for a specific category included in an existing migration package. |
|
---|---|---|
URI Endpoint |
/rest/v17/migrationPackages/{id}/contents/{category} |
|
Endpoint Parameters |
id |
The unique identifier for the migration package |
category |
The category of migration content | |
HTTP Method |
GET |
|
Request Body Parameters |
None |
|
Response Body Parameters |
JSON data containing the migration package category properties |
https://sitename.oracle.com/rest/v17/migrationPackages/migrationPackage_v1/contents/CONFIGURATION
{ "name": "Configuration", "category": "CONFIGURATION", "children": [{ "name": "Integration", "variableName": "integration", "resourceType": "product_family_configuration" } ], "links": [{ "rel": "self", "href": "http://sitename.oracle.com /rest/v17/migrationPackages/migrationPackage_v1/contents/CONFIGURATION" } ] }
Get Migration Package Content Dependencies
Description |
This endpoint retrieves content dependencies for a migration package. |
|
---|---|---|
URI Endpoint |
/rest/v17/migrationPackages/{id}/contents/dependencies |
|
Endpoint Parameters |
id |
The unique identifier for the migration package |
HTTP Method |
GET |
|
Request Body Parameters |
None |
|
Response Body Parameters |
JSON data containing the dependencies for a migration package. |
https://sitename.oracle.com/rest/v17/migrationPackages/migrationPackage_v1/contents/dependencies
{ "items": [{ "name": "Configuration", "category": "CONFIGURATION", "children": [{ "name": "Admin", "variableName": "admin", "resourceType": "product_family_configuration", "dependencies": [{ "name": "Admin", "category": "PRODUCT_DEFINITION", "variableName": "admin", "type": "HIGH_LEVEL", "hierarchy": "CATALOG~Admin" }, { "name": "Get User Data", "category": "UTIL_LIBRARY", "variableName": "getUserData", "type": "HIGH_LEVEL", "hierarchy": "UTIL_LIBRARY~Get User Data" } ] } ] }, { "name": "Commerce", "category": "COMMERCE", "children": [{ "name": "Test", "variableName": "test", "resourceType": "process", "dependencies": [{ "name": "Document - English", "category": "DOCUMENT_DESIGNER", "variableName": "Document - English", "type": "HIGH_LEVEL", "hierarchy": "DOCUMENT_DESIGNER~Test/Test~Document - English" } ] } ] } ] }
Get Migration Package Resource Low-level Details
Description |
This endpoint retrieves low-level details of a migration resource within a specific category of a migration package. |
|
---|---|---|
URI Endpoint |
/rest/v17/migrationPackages/{id}/contents/{category}/{varName} |
|
Endpoint Parameters |
id |
The unique identifier for the migration package |
category |
The category of migration content | |
varName |
The variable name of the resource | |
HTTP Method |
GET |
|
Request Body Parameters |
None |
|
Response Body Parameters |
JSON data containing the low-level details of a migration resource that is included in an existing package for a specific category. For example, for Commerce process the response contains: document , sub-documents, actions, attributes, etc. included in the migration package. |
https://sitename.oracle.com/rest/v17/migrationPackages/migrationPackage_v1/contents/configuration/admin
{ "name": "All Product Family", "variableName": "admin", "children": [ { "name": "Bill Country", "variableName": "CRM_BILL_COUNTRY", "resourceType": "attribute", "modifiedByUser": "superuser", "lastModified": "05/15/2019 1:18 PM" }, { "name": "Admin (Product Family)", "variableName": "admin", "resourceType": "product_family", "modifiedByUser": "sam", "lastModified": "03/26/2021 10:04 AM", "children": [ { "name": "Name", "variableName": "_bm_model_name", "resourceType": "attribute", "lastModified": "03/26/2021 10:04 AM" }, { "name": "Line", "variableName": "line", "resourceType": "product_line", "modifiedByUser": "Automation_JET_UserType_FullAccess", "lastModified": "02/21/2018 12:58 PM", "children": [ { "name": "Test Model", "variableName": "model", "resourceType": "model", "modifiedByUser": "Automation_JET_UserType_FullAccess", "lastModified": "06/15/2017 3:04 PM" } ] } ] }, { "name": "All PF Level (Recommendation)", "variableName": "allPFLevel", "resourceType": "rule", "modifiedByUser": "sam", "lastModified": "05/03/2023 10:56 AM" } ], "links": [ { "rel": "self", "href": "http://sitename.oracle.com /rest/v17/migrationPackages/migrationPackage_v1/contents/configuration/admin" } ] }
Update Migration Package Content
Description |
This endpoint updates all content within a migration package. Using the PUT method replaces the entire package contents with new package contents. |
|
---|---|---|
URI Endpoint |
/rest/v17/migrationPackages/{id}/contents |
|
Endpoint Parameters |
id |
The unique identifier for the migration package |
HTTP Method |
PUT |
|
Request Body Parameters |
items |
The migration package content for update |
Response Body Parameters |
items |
The migration package content updated |
https://sitename.oracle.com/rest/v17/migrationPackages/pkg2/contents
{ "name": "pkg2", "contents": { "items": [{ "name": "Commerce", "category": "COMMERCE", "children": [{ "name": "Formula", "variableName": "formula", "resourceType": "process" }, { "name": "Test", "variableName": "test", "resourceType": "process", "granular": true, "children": [{ "name": "Move", "variableName": "_action_process_move", "resourceType": "action", "modifiedByUser": "matt", "lastModified": "07/05/2023 11:28 PM" }, { "name": "Email", "variableName": "_action_process_email_print", "resourceType": "action", "modifiedByUser": "matt", "lastModified": "07/05/2023 11:28 PM" }, { "name": "Main", "variableName": "main", "resourceType": "document", "modifiedByUser": "matt", "lastModified": "07/05/2023 11:27 PM" } ] } ] } ] } }
{ "name": "pkg2", "identifier": "pkg2_v1", "version": 1, "dateAdded": "2023-08-24T09:31:42.000Z", "dateModified": "2023-08-24T09:31:42.000Z", "dependencies": {}, "links": [{ "rel": "self", "href": "http://sitename.oracle.com /rest/v17/migrationPackages/pkg2_v1" }, { "rel": "child", "href": "http://sitename.oracle.com /rest/v17/migrationPackages/pkg2_v1/contents", "name": "contents" } ] }
Update Migration Package Resource Low-level Details
Description |
This endpoint updates low-level details of a migration resource within a specific category of a migration package. Using the PUT method replaces the entire package contents with new package contents. |
|
---|---|---|
URI Endpoint |
/rest/v17/migrationPackages/{id}/contents/{category}/{varName} |
|
Endpoint Parameters |
id |
The unique identifier for the migration package |
category |
The category of migration content | |
variableName |
The variable name of the resource | |
HTTP Method |
PUT |
|
Request Body Parameters |
items |
The low-level items for update |
checkedAll |
The Boolean value, if true, includes all migratable low-level detail resources | |
Response Body Parameters |
JSON data containing the list of all migration resources saved as part of low-level details. |
https://sitename.oracle.com/rest/v17/migrationPackages/migrationPackage_v1/contents/commerce/test
{ "items": [{ "variableName": "main", "resourceType": "document", "children": [{ "variableName": "submit", "resourceType": "action" } ] } ] }
{ "name": "Test", "variableName": "test", "modifiedByUser": "matt", "lastModified": "09/19/2019 12:30 PM", "children": [{ "name": "Main", "variableName": "main", "resourceType": "document", "modifiedByUser": "matt", "lastModified": "09/18/2019 3:07 PM", "children": [{ "name": "Submit", "variableName": "submit", "resourceType": "action", "modifiedByUser": "lisa", "lastModified": "06/06/2019 1:24 PM" } ] } ], "links": [{ "rel": "self", "href": "http://sitename.oracle.com /rest/v17/migrationPackages/migrationPackage_v1/contents/COMMERCE/test" } ] }
Description |
This endpoint versions an existing migration package. The new version copies the name, properties and all contents of the original version and is given a new higher version number of the existing migration package and a new identifier. |
|
---|---|---|
URI Endpoint |
/rest/v17/migrationPackages/{id}/actions/newVersion |
|
Endpoint Parameters |
id |
The unique identifier for the migration package |
HTTP Method |
POST |
|
Request Body Parameters |
None |
|
Response Body Parameters |
name |
The name of the migration package |
identifier |
The unique identifier for the migration package | |
description |
The description of the migration package | |
version |
The version of the migration package | |
dateRelease |
The date the migration package was released | |
dateAdded |
The date the migration package was added | |
dateModified |
The date of the last migration package modification | |
dependencies |
A list of migration package dependencies |
https://sitename.oracle.com/rest/v17/migrationPackages/migrationPackage_v10/actions/newVersion
{ "name": "Migration Package", "identifier": "migrationPackage_v11", "version": 11, "dateAdded": "2023-06-29T05:42:26.000Z", "dateModified": "2023-06-29T05:42:26.000Z", "dependencies": {}, "links": [{ "rel": "self", "href": "http://sitename.oracle.com /rest/v17/migrationPackages/migrationPackage_v11" }, { "rel": "child", "href": "http://sitename.oracle.com /rest/v17/migrationPackages/migrationPackage_v11/contents" } ], }
Description |
This endpoint migrates a package that has been uploaded to the server. |
|
---|---|---|
URI Endpoint |
/rest/v17/migrationPackages/actions/migrate |
|
Endpoint Parameters |
None |
|
HTTP Method |
POST |
|
Request Body Parameters |
uploadPackageIndentifier
|
(Required) The identifier for the uploaded ZIP file residing on the server. This value is returned from the Upload ZIP file for a Migration Package REST API. |
cleanPkgsOfSameName |
(Optional) The boolean value to delete the migration packages from resources having the same name | |
contents |
(Optional) Content to be added to the migration package
|
|
includeSnapshot |
(Optional) The boolean value to indicate whether to create a snapshot | |
migrationDescription |
(Optional) The migrate package description | |
sendNoificationTo |
(Optional) The email address to send migrate package status (i.e., success or error message) | |
targetProcessVarName |
(Optional) The process variable name to perform cross-process migration | |
Response Body Parameters |
taskId |
The task identifier associated with the migration job. A task is initiated when you migrate a package. You can view the status of the migration and cancel the migration, if required. Refer to the Task REST APIs for the following task-related functions: Get List of Tasks, Get Task, Cancel Task, Get Task File List, and Download a Task File. |
https://sitename.oracle.com/rest/v17/migrationPackages/actions/migrate
{ "uploadedPackageIdentifier": "MigrationPackage_21668616413578", "targetProcessVarName": "", "sendNotificationTo": "lisa.jones@yourcompany.com", "includeSnapshot": false, "cleanPkgsOfSameName": true }
{ "taskId": 3023444194, "links": [{ "rel": "related", "href": "http://sitename.oracle.com /rest/v17/tasks/3023444194" } ], "messages": { "info": ["There are other migration tasks that are currently running. Your request will be queued."] } }
Upload ZIP File for a Migration Package
Description |
This endpoint uploads a migration package ZIP file to the server. |
|
---|---|---|
URI Endpoint |
/rest/v17/migrationPackages/actions/uploadPackage |
|
Endpoint Parameters |
None |
|
HTTP Method |
POST |
|
Request Body Parameters |
Multipart/form data
|
Form data, for example:
|
Response Body Parameters |
name |
The name of the migration package |
identifier |
The unique identifier for the migration package |
|
description |
The description of the migration package | |
version |
The version of the migration package | |
dateRelease |
The date the migration package was released | |
dateAdded |
The date the migration package was added | |
dateModified |
The date of the last migration package modification |
|
siteVersion |
The version for the site |
|
uploadedPackageIdentifier |
The server location of the uploaded ZIP file |
|
crossProcessMigrationEnabled |
The Boolean value to indicate if the migration package is elibible for cross-process migration |
|
dependencies |
A list of migration package dependencies |
|
uploadStatus |
The upload status of the migration package
|
https://sitename.oracle.com/rest/v17/migrationPackages/actions/uploadPackage
{ "name": "MigrationPackage", "identifier": "migrationPackage_v11", "version": 11, "dateModified": "2023-05-27T02:29:48.000Z", "uploadedPackageIdentifer": "MigrationPackage_111665383246705", "siteVersion": "22.3.0", "validCPM": false, "dependencies": {}, "links": [{ "rel": "self", "href": "http://sitename.oracle.com /rest/v17/migrationPackages/TestPackage_111665383246705?retrieveFromPkgZip=true" }, { "rel": "child", "href": "http://sitename.oracle.com /rest/v17/migrationPackages/TestPackage_111665383246705/contents?retrieveFromPkgZip=true" } ] }
curl --request POST 'https://sitename.oracle.com /rest/v17/migrationPackages/actions/uploadPackage' \ --header 'Authorization: Basic c3VwZXJ1c2VyOnFhcGFzcw==' \ --header 'Cookie: JSESSIONID=41fdadef842a4b3ba2079846ac05a5a14ee284b2b4fc509eb875!1363400201' \ --form 'file=@/D:/MigrationPackage_2.zip
https://sitename.oracle.com/rest/v17/migrationPackages/migrationPackage_v2/actions/export
{ "taskId": 41372543, "links": [{ "rel": "related", "href": "https://sitename.oracle.com/rest/v17/tasks/41372543" } ] }
A task is initiated when you export a migration package and the migration package zip file will be associated with the task. After exporting the migration package, you can view the status of the export and download the exported migration package.
Get Task Example
To view the status of the migration package export initiate the Get Task REST API using the task id from the Export Migration Package REST API response.
https://sitename.oracle.com/rest/v17/tasks/41372543
{ "id": 41372543, "dateModified": "04/15/2020 3:33 PM", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/tasks/41372543" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/tasks" }, { "rel": "child", "href": "https://sitename.oracle.com/rest/v17/tasks/41372543/files" } ], "name": "Migration REST Export", "category": { "lookupCode": "52", "displayValue": "Migration Package Export" }, "status": "Completed", "result": "MigrationPackage_2", "executionTime": "04/15/2020 3:33 PM", "dateAdded": "04/15/2020 3:33 PM" }
After the task has completed, perform the following steps to download the exported migration package:
-
Get Task File List
Initiate the Get Task File List REST API using the task id from the Export Migration Package REST API response.
https://sitename.oracle.com/rest/v17/tasks/41372543/files
{ "items": [{ "links": [{ "rel": "related", "href": "https://sitename.oracle.com/rest/v17/tasks/41372543/files/MigrationPackage_2" } ], "name": "MigrationPackage_2", "type": "application/zip" } ], "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/tasks/41372543/files" } ] }
-
Download Task File
Initiate the Download Task File REST API using the file name from the Get Task File List REST API.
https://sitename.oracle.com/rest/v17/tasks/41372543/files/MigrationPackage_2
https://sitename.oracle.com/rest/v17/migrationPackages/actions/import
--form 'file=@/D:/MigrationPackage_2.zip' \ --form 'migrationDescription=This migration package contains...' \ --form 'sendNotificationTo=<username>@<domain>.com' \ --form 'includeSnapshot=true' \ --form 'targetProcessVarName=oraclecpqo_bmClone_1' \ --form 'cleanOtherVersionsOfSamePackage=true'
{ "taskId": 41372699, "links": [{ "rel": "related", "href": "https://sitename.oracle.com/rest/v17/tasks/41372699" } ] }
A task is initiated when you import a migration package. After importing the migration package, you can view the status of the import and cancel the migration package, if required.
Get Task Example
To view the status of the migration package import initiate the Get Task REST API using the task id from the Import Migration Package REST API response.
https://sitename.oracle.com/rest/v17/tasks/41372699
{ "id": 41372699, "dateModified": "04/15/2020 4:02 PM", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/tasks/41372699" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/tasks" }, { "rel": "child", "href": "https://sitename.oracle.com/rest/v17/tasks/41372699/files" } ], "name": "Migration REST Import", "category": { "lookupCode": "51", "displayValue": "Migration Package Import" }, "status": "Completed", "detailStatus": { "message": "Task is completed successfully.", "items": [{ "entity": "Util Library", "status": "Successful" }, { "entity": "Package", "status": "Successful" } ] }, "executionTime": "04/15/2020 4:00 PM", "dateAdded": "04/15/2020 4:00 PM" }
To cancel the migration package import initiate the Cancel Task REST API using the task id from the Import Migration Package REST API response.
Migration Resources
Migration Resource endpoints retrieve the data source entities that are required for successful migration. Oracle CPQ supports retrieving all migratable resources, resources within a defined Oracle CPQ category, and specific migration resources from within a category.
Description |
This endpoint retrieves all the migration resources, grouped by category. |
|
---|---|---|
URI Endpoint |
/rest/v17/migrationResources |
|
Endpoint Parameters |
None |
|
HTTP Method |
GET |
|
Request Body Parameters |
None |
|
Response Body Parameters |
JSON data containing all migration resources |
https://sitename.oracle.com/rest/v17/migrationResources
{ "items": [{ "name": "Util Library", "category": "UTIL_LIBRARY", "children": [{ "name": "", "variableName": "template_1", "resourceType": "library", "granular": true, "links": [{ "rel": "related", "href": "http://sitename.oracle.com /rest/v17/migrationResources/UTIL_LIBRARY/template_1" } ] } ] }, { "name": "Product Definition", "category": "PRODUCT_DEFINITION", "children": [{ "name": "Vision Vehicles", "variableName": "visionVehicles", "resourceType": "product_family" } ] }, { "name": "Catalog", "category": "CATALOG", "children": [{ "name": "Admin", "variableName": "admin", "resourceType": "product_line_model" } ] }, { "name": "Configuration", "category": "CONFIGURATION", "children": [{ "name": "Admin", "variableName": "admin", "resourceType": "product_family_configuration", "granular": true, "links": [{ "rel": "related", "href": "http://sitename.oracle.com /rest/v17/migrationResources/CONFIGURATION/admin" } ] } ] } ], "links": [{ "rel": "self", "href": "http://sitename.oracle.com /rest/v17/migrationResources" } ] }
Get Category Migration Resources
Description |
This endpoint retrieves all migration resources for a specific category. |
|
---|---|---|
URI Endpoint |
/rest/v17/migrationResources/{category} |
|
Endpoint Parameters |
category |
The category of migration content. Include to filter by resource category |
HTTP Method |
GET |
|
Request Body Parameters |
None |
|
Response Body Parameters |
JSON data containing the list of migration resources |
https://sitename.oracle.com/rest/v17/migrationResources/UTIL_LIBRARY
{ "items": [{ "name": "Util Library", "category": "UTIL_LIBRARY", "children": [{ "name": "RecommendationRule_StringArrayAttribute", "variableName": "recommendationRule_StringArrayAttribute", "resourceType": "library", "links": [{ "rel": "related", "href": "http:// https://sitename.oracle.com /migrationResources/UTIL_LIBRARY/recommendationRule_StringArrayAttribute" } ] }, { "name": "TranslatedLanguage", "variableName": "translatedLanguage", "resourceType": "library", "links": [{ "rel": "related", "href": "http:// https://sitename.oracle.com /migrationResources/UTIL_LIBRARY/translatedLanguage" } ] } ] } ] }
Get Category Resource Low-level Details
Description |
This endpoint retrieves low-level details of a migration resource within a specific category. |
|
---|---|---|
URI Endpoint |
/rest/v17/migrationResources/{category}/{varName} |
|
Endpoint Parameters |
category |
The category of migration content. Include to filter by resource category. |
varName |
The variable name of the category item. Include to filter by resource category and variable name. | |
HTTP Method |
GET |
|
Request Body Parameters |
None |
|
Response Body Parameters |
JSON data containing the low-level details of a migration resource for a specific category. For example, for Commerce process the response contains: document , sub-documents, actions, attributes, etc. |
https://sitename.oracle.com/rest/v17/migrationResources/COMMERCE/test
{ "name": "Test", "variableName": "test", "modifiedByUser": "matt", "lastModified": "09/19/2019 12:30 PM", "children": [{ "name": "Export File Attachments", "variableName": "_action_export_file_attachments", "resourceType": "action", "modifiedByUser": "matt", "lastModified": "12/15/2017 3:25 PM" }, { "name": "Main", "variableName": "main", "resourceType": "document", "modifiedByUser": "matt", "lastModified": "09/18/2019 3:07 PM", "children": [{ "name": "SSM 1", "variableName": "sSM1", "resourceType": "attribute", "modifiedByUser": "matt", "lastModified": "09/17/2019 9:11 AM" }, { "name": "submit", "variableName": "submit", "resourceType": "action", "lastModified": "01/05/2023 9:55 AM" }, { "name": "Hide AJAX Output Sub", "variableName": "hideAJAXOutputSub", "resourceType": "rule", "modifiedByUser": "matt", "lastModified": "09/17/2019 1:19 PM" } ] }, { "name": "formulaOutput = formulaInput", "variableName": "formulaOutput = formulaInput", "resourceType": "formula", "modifiedByUser": "matt", "lastModified": "09/17/2019 12:44 PM" }, { "name": "To Step 2 Step", "variableName": "toStep2", "resourceType": "step", "lastModified": "12/15/2017 3:25 PM" }, { "name": "Document PDF(Printer Friendly/History)", "variableName": "documentPDF", "resourceType": "xsl_view", "modifiedByUser": "matt", "lastModified": "12/15/2017 3:25 PM" } ], "links": [{ "rel": "self", "href": "https://sitename.oracle.com /rest/v17/migrationResources/COMMERCE/test" } ] }
Get Dependencies for Selected Migration Resources or Migration Package from Source Site
https://sitename.oracle.com/rest/v17/migrationResources/dependencies
Example of Dependencies of Selected Migration Resources from a Source Site
{ "contents": { "items": [{ "category": "COMMERCE", "children": [{ "name": "test", "variableName": "test", "granular": true, "children": [{ "variableName": "test", "resourceType": "process", "checked": false, "children": [{ "name": "Main", "variableName": "main", "resourceType": "document", "children": [{ "name": "Save", "variableName": "save", "resourceType": "action", "modifiedByUser": "superuser", "lastModified": "08/01/2023 10:28 PM" }, { "name": "Submit", "variableName": "submit", "resourceType": "action", "modifiedByUser": "superuser", "lastModified": "08/01/2023 10:27 PM" } ] } ] } ] } ] } ] } }
{ "items": [{ "name": "Commerce", "category": "COMMERCE", "children": [{ "name": "Test", "variableName": "test", "resourceType": "process", "granular": true, "dependencies": [{ "name": "HTML Field 1", "category": "COMMERCE", "variableName": "hTMLField1", "resourceType": "attribute", "type": "LOW_LEVEL", "hierarchy": "test~process/main~document/hTMLField1~attribute" }, { "name": "Help Select Actions To Be Hidden", "category": "COMMERCE", "variableName": "helpSelectActionsToBeHidden", "resourceType": "attribute", "type": "LOW_LEVEL", "hierarchy": "test~process/main~document/helpSelectActionsToBeHidden~attribute" }, { "name": "Step Name", "category": "COMMERCE", "variableName": "stepName", "resourceType": "attribute", "type": "LOW_LEVEL", "hierarchy": "test~process/main~document/stepName~attribute" } ] } ] } ] }
Example of Dependencies of a Migration Package from a Source Site
{ "packageIdentifier": "migrationPackage_v1", "contents": { "items": [{ "category": "COMMERCE", "children": [{ "name": "test", "variableName": "test", "granular": true, "children": [{ "variableName": "test", "resourceType": "process", "checked": false, "children": [{ "name": "Main", "variableName": "main", "resourceType": "document", "children": [{ "name": "Save", "variableName": "save", "resourceType": "action", "modifiedByUser": "superuser", "lastModified": "08/01/2023 10:28 PM" }, { "name": "Submit", "variableName": "submit", "resourceType": "action", "modifiedByUser": "superuser", "lastModified": "08/01/2023 10:27 PM" } ] } ] } ] } ] } ] } }
{ "items": [{ "name": "Commerce", "category": "COMMERCE", "children": [{ "name": "Test", "variableName": "test", "resourceType": "process", "granular": true, "dependencies": [{ "name": "HTML Field 1", "category": "COMMERCE", "variableName": "hTMLField1", "resourceType": "attribute", "type": "LOW_LEVEL", "hierarchy": "test~process/main~document/hTMLField1~attribute" }, { "name": "Help Select Actions To Be Hidden", "category": "COMMERCE", "variableName": "helpSelectActionsToBeHidden", "resourceType": "attribute", "type": "LOW_LEVEL", "hierarchy": "test~process/main~document/helpSelectActionsToBeHidden~attribute" }, { "name": "Step Name", "category": "COMMERCE", "variableName": "stepName", "resourceType": "attribute", "type": "LOW_LEVEL", "hierarchy": "test~process/main~document/stepName~attribute" } ] } ] } ] }
Migrate Selected Migration Resources or Migration Package from Source Site
Migrate Selected Migration Resources or Migration Package from Source Site |
||
---|---|---|
Description |
This endpoint migrates the selected migration resources or a migration package from a source site. |
|
URI Endpoint |
/rest/v17/migrationResources/actions/migrate |
|
Endpoint Parameters |
None |
|
HTTP Method |
POST |
|
Request Header |
siteURL |
(Required) The URL for the source site |
username |
(Required) The username for the source site | |
password |
(Required) The password for the source site | |
Request Body Parameters |
packageIdentifier |
(Required for Migration Package) The identifier for the migration package residing in the source site |
cleanPkgsOfSameName |
(Required for Migration Package and Optional for Migration Resources) The boolean value to delete the migration packages from resources having the same name | |
contents |
(Required for Migration Resources and Optional for Migration Package) Content to be migrated
|
|
excludeContents |
(Optional) The migration package content to exclude from the migration. The specified excludeContents are not migrated with the package. |
|
includeSnapshot |
(Optional) The boolean value to indicate whether to create a snapshot | |
migrationDescription |
(Optional) The migrate resource or migrate package description | |
sendNotificationTo |
(Optional) The email address to send migrate status (i.e., success or error message)e | |
dependencies |
(Optional) A list of migration resources or migration package dependencies | |
Response Body Parameters |
taskId |
The task identifier associated with the migration job. A task is initiated when you migrate resources or a package. You can view the status of the migration and cancel the migration, if required. Refer to the Task REST APIs for the following task-related functions: Get List of Tasks, Get Task, Cancel Task, Get Task File List, and Download a Task File. |
https://sitename.oracle.com/rest/v17/migrationResources/actions/migrate
Example of Migrating Resources from a Source Site
{ "contents": { "items": [{ "category": "COMMERCE", "children": [{ "variableName": "test", "granular": true, "children": [{ "variableName": "main", "resourceType": "document", "checkedAllChildren": false, "children": [{ "name": "eSignature Action Set", "variableName": "_action_esig_set", "resourceType": "action_set", "lastModified": "06/15/2023 3:27 AM" } ] } ] } ] } ] } }
{ "taskId": 3023163957, "links": [{ "rel": "related", "href": "http://sitename.oracle.com /rest/v17/tasks/3023163957" } ] }
Example of Migrating a Package from a Source Site
{ "packageIdentifier": "packageName3_v1", "sendNotificationTo": "lisajones@yourcompany.com", "includeSnapshot": false, "excludeContents": { "items": [{ "category": "COMMERCE", "children": [{ "variableName": "test", "granular": true, "children": [{ "variableName": "main", "resourceType": "document", "checkedAllChildren": false, "children": [{ "name": "eSignature Action Set", "variableName": "_action_esig_set", "resourceType": "action_set", "lastModified": "06/15/2023 3:27 AM" } ] } ] } ] } ] }, "dependencies": { "items": [{ "name": "Commerce", "category": "COMMERCE", "children": [{ "name": "Test", "variableName": "test", "resourceType": "process", "granular": true, "dependencies": [{ "name": "HTML Field 1", "category": "COMMERCE", "variableName": "hTMLField1", "resourceType": "attribute", "type": "LOW_LEVEL", "hierarchy": "test~process/main~document/hTMLField1~attribute" } ] } ] } ] } }
{ "taskId": 3023163957, "links": [{ "rel": "related", "href": "http://sitename.oracle.com /rest/v17/tasks/3023163957" } ] }