KACE API: How do I add a comment WITH attachment?
Hey im using the current KACE Api 10.2 and got most of it working fine. I create new tickets and also can add comments to the tickets and get all attachments. But how is it possible to add attachments within the comment?
I found this in the doc - but i dont get it:
Answers (1)
Top Answer
GET is a verb to retrieve a resource. If you want to add an attachment you would use POST
Here is ** an example ** of what a HTTP POST to the server may look like to add an attachment and a comment to a ticket with the ID of 2.
POST {{Server}}/api/service_desk/tickets/2
Content-Type: multipart/form-data
x-dell-csrf-token: {{CSRF_TOKEN}}
x-dell-api-version: 5
Content-Disposition: form-data; name="Tickets"
[{"title": "Changed title along with attachment add",
"change": {"comment": "This is my comment with attachment","attachmentSet" : "INVENTORY_FILE","owners_only" : 1}}]
Content-Disposition: form-data; name="INVENTORY_FILE[]"; filename="KACE-logo-RGB.pdf"
Content-Type: application/pdf
What programing language are you using to craft your API calls?