/build/static/layout/Breadcrumb_cap_w.png

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:



0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: KevinG 4 years ago
Red Belt
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?

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ