Add Attachments to a Process
/ic/api/process/v1/processes/{processId}/attachments
Adds attachments to a process.
NOTE:
Whether a process application uses documents or attachments depends on the application configuration.
- If Oracle Content and Experience(documents) is enabled, the application can only use documents, and API operations on attachments do not apply.
- If Oracle Content and Experience(documents) is not enabled, the application can only use attachments, and API operations on documents do not apply.
To identify whether Oracle Content and Experience(documents) is enabled in a process application, use the API /ic/api/process/v1/processes/{processId} to retrieve process instance details. Oracle Content and Experience(documents) is enabled when the parameter isDoCSEnabled=true.
Request
- multipart/mixed
-
processId(required): string
Value of process ID
Response
- application/json
200 Response
409 Response
500 Response
Examples
The following example shows how to add an attachment to a process by submitting a POST request on the REST resource.
Send Request
curl -H "Authorization: Bearer access_token -F "part1=@request.json;type=application/json" -F "part2=@serviceRequest.txt;type=text/plain" -X POST http://example.com/ic/api/process/v1/processes/{processId}/attachments -H "Content-Type:multipart/mixed"
Where,
-
example.com
is the host where Oracle Integration is running. -
request.json
is the file containing data about the attachment.The following is an example of
request.json
file:{ "attachmentName" : "serviceRequest.txt", "mimeType" :"text/plain" }
Where
attachmentName
is the name of the attachment file andmimeType
is its mime-type.
Example of Response Body
{ "totalResult":false, "hasMore":false, "items":[ { "attachmentName":"BigFiles.txt", "mimeType":"text/plain", }, { "attachmentName":"config.xml", "mimeType":"text/xml", }, { "attachmentName":"serviceRequest.txt", "mimeType":"text/plain", } ], "links":[ { "href":"http://example.com/ic/api/process/v1/processes/3/attachments", "length":0, "rel":"self" }, { "href":"http://example.com/ic/api/process/v1/processes/3", "length":0, "rel":"parent" } ] }