/build/static/layout/Breadcrumb_cap_w.png

Software Question


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

07/22/2019 431 views

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

Comments

  • Did you have any luck?


Community Chosen Answer

2

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

Answered 07/24/2019 by: DavidCondit
White Belt

All Answers

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

Answered 07/24/2019 by: isudothings
Senior Purple Belt

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