Add Files to Attachment Attributes for a Custom Object Instance (PUT)

Allows a file to be attached to an attribute for an instance of a custom object.

 

URL

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

 

REQUEST METHOD

PUT

 

URL PARAMETERS

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

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

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

NewAttachGuid: This parameter is provided in the URL and does not need to be sent through PUT. The user is responsible for creating a new GUID.

 

FORM CONTENT

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

Data (Required): The file to be attached to the custom object. 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. The response for the PUT method should be HTTP/1.1 201 Created.

 

SUCCESS RESPONSE EXAMPLE

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