I have a requirement to send files through a REST API to an external storage. The external storages uses internal schemas for metadata stored with the file and those schemas are mapped in the rest request to prefixes (from JSON-LD specification) for the properties in the JSON body, as below:
Pega uses multi-part messages for sending attachments to external world.
Create a REST Connector.
In an activity, set the pyRequestAttachmentPage Step page with the values for pyAttachNames, pyAttachValues and pyAttachTypes. Set the pyAttachValues property to binary content, pyAttachNames property to a filename and pyAttachTypes property to text/plain.
Invoke the Connect-REST from the activity using POST method.
The eaziest way to see the actual payload is to specify URL to be your TcpMon IP:port.
If that is you external system doesn't understand then you have to raise Enhancement request to add this feature to the Product.