Add Files to Attachment or Image Attribute for a Custom Object Instance (POST)

Allows files to be attached to an Image or Attachment attribute of an instance registered for a custom object.

 

URL

{RMUrl}/api/objects/<ObjectVariableName>/<InstanceID>/<AttributeVariableName>/files

 

REQUEST METHOD

POST

 

URL PARAMETERS

ObjectVariableName: This parameter is provided in the URL and does not need to be sent through POST.

InstanceID: This parameter is provided in the URL and does not need to be sent through POST.

AttributeVarName: This parameter is provided in the URL and does not need to be sent through POST.

 

FORM CONTENT

FileName (Required): Name used to identify the file in the attribute.

Data (Required): File to be attached to the attribute. The maximum file size is 10 MB. The file bytes must be converted to a base64 string before sending.

Description (Optional): Optional comment for the attachment.

 

REQUEST EXAMPLE

{RMUrl}/api/objects/book/66f295ae-f946-4f74-9ef4-21a0ca93febb/attachment/files

 

FORM CONTENT EXAMPLE

{
"FileName": "Receipt.pdf",
"Data": "TWFuIGlzIGR...WQsIG5vdCBvbm",
"Description": "Proof of payment sent."
}

 

SUCCESS RESPONSE

The ID of the file attached. Returns a Guid.

 

SUCCESS RESPONSE EXAMPLE

"443de4ae-2360-4b66-bf69-8c9e4ca09001"