Upload a request item file
post
/epm/rest/v1/requests/{requestId}/attachments/importFile
Request
Supported Media Types
- multipart/form-data
Path Parameters
Form Parameters
-
file: file
-
fileName: string
Indicates the name of the file being uploaded. Do not include local path information, just the file name.
Response
Supported Media Types
- application/json
200 Response
File received and saved
403 Response
Forbidden
500 Response
Invalid file stream
Examples
The following example shows how to attach a file to a request by submitting a post request on the REST resource using cURL.
cURL Command
curl --user epm_cloud_user -X POST \ https://servername.fa.us2.oraclecloud.com/epm/rest/v1/requests/e1847bbc-f2d2-46a2-af3d-2dadcf9d7bd4/attachments/importFile \ -H 'Accept: application/json' \ -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \ -F file=@sampleImportFile.xlsx \ -F fileName=sampleImportFile.xlsx
Example of Response Body
The following shows an example of the response body in JSON format.
{ "links": [ { "rel": "attachment", "href": "https://servername.fa.us2.oraclecloud.com/epm/rest/v1/requests/e1847bbc-f2d2-46a2-af3d-2dadcf9d7bd4/attachments/b70919e7-5c07-466f-9989-6063fc59bf3e" } ] }