Task REST APIs
Overview
Use the Task endpoints to retrieve status for data table and migration tasks, cancel and delete tasks, and retrieve files associated with a task (e.g. log files and export zip files).
Note: The Task REST APIs are only available for admin users.
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
Get List of Data Table Tasks
https://sitename.oracle.com/rest/v17/tasks/?q={category:{$in:[13,17,26]}}
{ "items": [{ "id": 41365772, "dateModified": "10/18/2019 1:19 PM", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/tasks/41365772" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/tasks" } ], "name": "Rack_Domain", "category": { "lookupCode": "13", "displayValue": "Data Table Upload" }, "status": "Completed", "result": "4118171", "executionTime": "10/18/2019 1:19 PM", "dateAdded": "10/18/2019 1:19 PM" }, { "id": 41365771, "dateModified": "10/18/2019 1:18 PM", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/tasks/41365771" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/tasks" } ], "name": "Rack_Domain Export", "category": { "lookupCode": "26", "displayValue": "Data Table Export" }, "status": "Completed", "result": "datatable_1571422724473", "executionTime": "10/18/2019 1:18 PM", "dateAdded": "10/18/2019 1:18 PM" }, { "id": 41365769, "dateModified": "10/18/2019 1:18 PM", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/tasks/41365769" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/tasks" } ], "name": "Rack_Domain", "category": { "lookupCode": "17", "displayValue": "Data Table Deploy" }, "status": "Completed", "executionTime": "10/18/2019 1:18 PM", "dateAdded": "10/18/2019 1:18 PM" } ], "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/tasks" } ] }
Get List of Migration Tasks
https://sitename.oracle.com/rest/v17/tasks/?q={category:{$in:[51,52]}}
{ "items": [{ "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" }, { "id": 41372640, "dateModified": "04/15/2020 3:45 PM", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/tasks/41372640" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/tasks" }, { "rel": "child", "href": "https://sitename.oracle.com/rest/v17/tasks/41372640/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" } ], "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/tasks" } ] }
Data Table Export Task Example
https://sitename.oracle.com/rest/v17/tasks/41373364
{ "id": 41373364, "dateModified": "04/16/2020 2:07 PM", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/tasks/41373364" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/tasks" }, { "rel": "child", "href": "https://sitename.oracle.com/rest/v17/tasks/41373364/files" } ], "name": "Data Tables (2) Export", "category": { "lookupCode": "26", "displayValue": "Data Table Export" }, "status": "Completed", "result": "datatable_1587064062872", "executionTime": "04/16/2020 2:07 PM", "dateAdded": "04/16/2020 2:07 PM" }
Migration Package Export Task Example
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" }
The /tasks/{taskId}/actions/cancel
endpoint was deprecated in Oracle CPQ 20B. Use the following endpoint to cancel tasks.
https://sitename.oracle.com/rest/v17/tasks/41365996
{ "status": "Cancellation Requested" }
{ "id": 3033184510, "dateModified": "03/20/2020 1:26 AM", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/tasks/3033184510" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v17/tasks" }, { "rel": "child", "href": "https://sitename.oracle.com/rest/v17/tasks/3033184510/files" } ], "name": "Migration REST Import", "category": { "lookupCode": "50", "displayValue": "Migration Package Import" }, "status": "Cancellation Requested", "executionTime": "03/20/2020 1:26 AM", "dateAdded": "03/20/2020 1:26 AM" }
https://sitename.oracle.com/rest/v17/tasks/41365771
https://sitename.oracle.com/rest/v17/tasks/actions/deleteTasks
{ "selections": [41365769, 4118171, 41365772] }
Get Data Table Export Task File List
https://sitename.oracle.com/rest/v17/tasks/41373364/files
{ "items": [{ "links": [{ "rel": "related", "href": "https://sitename.oracle.com/rest/v17/tasks/41373364/files/datatable_1571428547692" } ], "name": "datatable_1571428547692", "type": "application/zip" } ], "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/tasks/41373364/files" } ] }
Get Migration Package Export Task File List
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 Exported Data Table File
https://sitename.oracle.com/rest/v17/tasks/41373364/files/datatable_1571428547692
Download Exported Migration Package File
https://sitename.oracle.com/rest/v17/tasks/41372543/files/MigrationPackage_2