/build/static/layout/Breadcrumb_cap_w.png

API: How do I add a comment to an existing helpdesk ticket?

All,

I'd like to add a comment via API to an existing helpdesk ticket. Any ideas?

Here's the knowledge base article which covers the basic helpdesk ticket API CRUD operations: https://support.quest.com/kace-systems-management-appliance/kb/266751/read-update-and-create-tickets-using-the-kace-helpdesk-api

I can run a GET http://k1000-dev1/api/service_desk/tickets/{ticket # goes here}/changes  request to see a list of comments (and other changes) for a ticket, but I don't know how to add a new change/comment to the ticket via API. 


Thanks!


David


1 Comment   [ + ] Show comment
  • Did you have any luck? - MakerTim 5 years ago

Answers (2)

Posted by: DavidCondit 5 years ago
White Belt
4

It's not described in the API documentation or knowledge base articles, but here's how you do it:


Method and URL:
PUT http://your-k1000-site-goes-here/api/service_desk/tickets/your-ticket-#-goes-here


Headers:
Accept: application/json
Content-Type: application/json
x-dell-csrf-token: your-token-goes-here
x-dell-api-version: your-version-goes-here (e.g. 9)


Body:
{
"Tickets" : [
{
"change": { "comment": "I'm an API-created comment!" }
}
]
}


Also, here's the method and url for reading a ticket's comments. Make sure you use the same headers as the PUT request and no body.

GET http://your-k1000-site-goes-here/api/service_desk/tickets/your-ticket-#-goes-here/changes


Comments:
  • Perfect, thanks a lot! - isudothings 5 years ago
  • I have literally created a profile on this site to upvote this - i have been going slowly mad wondering why such an obvious thing wasn't listed in the docs. Thank you. - singleUseUser 4 years ago
  • This was very helpful! Thank you!

    Are you aware of any way to set the user for the change? Adding a 'user' object to the 'change' object resulted in a successful call, however, the comment still belongs to the signed in user, not the one attached to the 'change' object. - fogartys1215 4 years ago
Posted by: isudothings 5 years ago
Senior Purple Belt
0

I don't see any endpoint that exposes that field as editable. I'm open correction, however. Retrieving comments is simple, however, adding a comment natively through the API isn't something I see. If anyone finds it is indeed possible, please ping me and I can explore adding that functionality to the community powershell module.


Changing the status via API is very straight forward however. I document this here:

https://github.com/ArtisanByteCrafter/KaceSMA/wiki/Service-Desk-Endpoints

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
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