Add Files to Event Attachment Attribute

Allows a file to be attached to an event in the Worfklow module through an Attachment attribute associated with the event.

 

URL

{WSUrl}/api/events/<EventCode>/<AttributeVariableName>/files

 

REQUEST METHOD

POST

 

URL PARAMETERS

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

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

 

FORM CONTENT

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

FileName (Required): Name used to identify the attachment. This name can later be used to recover the file and should contain the file extension (for example, "file.pdf").

 

REQUEST EXAMPLE

{WSUrl}/api/events/EVTD201411000022/attributevariablename/files

 

FORM CONTENT EXAMPLE

{

"FileName": "Proof of Payment.pdf",

"Data": "TWFuIGlzIGRWQsIG5vdCBvbm"

}

 

SUCCESS RESPONSE

The ID of the attachment added. Returns a Guid.

 

SUCCESS RESPONSE EXAMPLE

HTTP status code 201: Created

"ab70bc23-2cd0-43a2-9f45-a34d18fb60a7"