You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

SOAP XML payload to attach a file

Accepted answer
15
Views
5
Comments
edited Jun 8, 2022 12:09PM in General Technical Discussions 5 comments

Summary

How to create an incident with file attachment

Content

Hi all,

I am trying to create a new incident with attachment via SOAP client and trying to figure out the XML payload for this.

I have tried the below (excerpt from the crate incident request) and it doesn't create an attachment.

   <ns4:FileAttachments>
                <ns4:IncidentFileAttachment xsi:type="ns4:IncidentFileAttachment" action="add">
                    <ns4:ContentType>application/octet-stream</ns4:ContentType>
                    <ns4:Data>dGVzdA==</ns4:Data>
                    <ns4:FileName>test.csv</ns4:FileName>
                    <ns4:Name>Test File Attachments</ns4:Name>
                </ns4:IncidentFileAttachment>
            </ns4:FileAttachments> 

Can anyone please confirm if the object types (tags) are correct for an attachment. I am not able to find any  documentation online.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!