Find the Code for a Setup Task

To automate the process of migrating setup tasks, you would need the setup task code.

In this use case, you'll learn how to use the task name of a resource to find the task code. Before you begin, keep the name of the setup task ready.

Find the Code for a Setup Task

Let's look at this example of finding the code for the Manage Legal Entity task, using the Features resource.

curl -i -u "<username>:<password>" -X GET https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/setupTasks?&q=TaskName LIKE '%Manage Legal Entity'
Sample Response Payload
{
  "items" : [ {
    "TaskCode" : "XLE_MANAGE_LEGAL_ENTITY",
    "TaskName" : "Manage Legal Entity",
    "AvailableFlag" : "Y",
    "ExportImportSupportedFlag" : "Y",
    "CSVExportImportSupportedFlag" : "Y",
    "links" : [ {
      "rel" : "self",
      "href" : "https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/setupTasks/XLE_MANAGE_LEGAL_ENTITY",
      "name" : "setupTasks",
      "kind" : "item"
    }, {
      "rel" : "canonical",
      "href" : "https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/setupTasks/XLE_MANAGE_LEGAL_ENTITY",
      "name" : "setupTasks",
      "kind" : "item"
    } ]
  } ],
  "count" : 1,
  "hasMore" : false,
  "limit" : 25,
  "offset" : 0,
  "links" : [ {
    "rel" : "self",
    "href" : "https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/setupTasks",
    "name" : "setupTasks",
    "kind" : "collection"
  } ]
}

The setup task code returned by the query is XLE_MANAGE_LEGAL_ENTITY.

Now that you got the code for the setup task, you can use this to automate the export or import process. For more information about how to automate the export or import process, see topic Automate Export and Import of CSV File Packages.