Upload (11.1.2.3.600)

Uploads a file from the current directory on the local machine to the repository. Files on the repository cannot be accessed directly.

If a file already exists, the API gives an error and does not overwrite it. Use this command to upload data, metadata, and back up snapshots to a service instance. See About EPM Automate in Working with EPM Automate.

If a -1 status is returned and it is the last chunk to be uploaded, this means that an LCM artifact snapshot has been uploaded and zip extraction is in progress. The client pings the URL until the status is a positive integer. This job is done asynchronously.

Note: The entire path to the file must be encoded, for example, changing / to %2F and spaces to %20.

For example, change this path to an .HTML file in the apr directory:

apr/2020-03-04 23_07_20/2020-03-04 23_07_20.html

to this:

apr%2F2020-03-04%2023_07_20%2F2020-03-04%2023_07_20.html

Required Roles

Service Administrator

Any predefined role and the Migrations – Administer granular role

REST Resource

POST /interop/rest/11.1.2.3.600/applicationsnapshots/{applicationSnapshotName}/contents

Note:

For Data Management uploads, use the following JSON format for the query parameter:

/interop/rest/11.1.2.3.600/applicationsnapshots/{applicationSnapshotName}/contents?extDirPath=inbox

Request

Supported Media Types: application/octet-stream

Table 9-19 Parameters

Name Description Type Required Default
applicationSnapshotName Name of the application snapshot or file name to be uploaded (for example, "Artifact Snapshot.zip" or s112.csv). A file with this name is created in the repository. If a file or folder with this name exists in the repository, an error indicates that a file or folder exists Path Yes None
extDirPath

Used to support upload of Data Management files.

Supported values include:

  • inbox - Upload files into the inbox; except for Profitability and Cost Management, Oracle Fusion Cloud Enterprise Performance Management business processes look in this location for files to process
  • profitinbox - Upload files to be processed by Profitability and Cost Management
  • to_be_imported - Upload a Narrative Reporting snapshot that is to be imported during the next daily maintenance of the environment
  • outbox - Upload files to the outbox for all Cloud EPM business processes except for Profitability and Cost Management
  • profitoutbox - Upload files to the outbox for Profitability and Cost Management

You can also use a directory under inbox, outbox, profitinbox, and profitoutbox, for example, inbox/directory_name

Example: "extDirPath= inbox/directory_name" to upload files to a directory within the inbox for processing by Data Management.

Upload: /interop/rest/11.1.2.3.600/applicationsnapshots/applicationSnapshotName/contents?extDirPath=inbox%2Fdm_folder

Example: "extDirPath=inbox" where inbox is the folder where the Data Management file is to be uploaded

Example of query parameters in JSON format for Data Management Upload: /interop/rest/11.1.2.3.600/applicationsnapshots/{applicationSnapshotName}/contents?extDirPath=inbox

Query No None

Response

Supported Media Types: application/json

Table 9-20 Parameters

Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible values: self, recreate service
data Parameters as key value pairs passed in the request

Example of Response Body

{
  "status": 0,
  "details": null,
  "links": [
    {
      "data": null,
      "action": "POST",
      "href": "https://<_BASE-URL_>/interop/rest/11.1.2.3.600/applicationsnapshots/{applicationSnapshotName}/contents"
    }
  ]
}

Sample cURL Command

curl -X POST -s -u '<USERNAME>:<PASSWORD>' -H 'Content-Type: application/octet-stream'  --data-binary '@<FILE_NAME_PATH>' 'https://<BASE-URL>/interop/rest/11.1.2.3.600/applicationsnapshots/<FILE_NAME>/contents'