attaching kb to incident via rest api

chercm
Mega Sage

attaching kb to incident via rest api. 

 

i am able to create an incident using api but when closing i need to attach a default KB article to it. 

 

any way to do it ?

 

if the kb article gets v1 or v2 , how can i get the updated version in ? or i need to update the api call again ?

1 ACCEPTED SOLUTION

If you are closing the incident via api then send the whole KB related data as a string value and update in additional comment, system will add that KB Article link in activity log. 

 

AshishKMishra_0-1701315601890.png

explain, how you are closing this incident.


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

View solution in original post

8 REPLIES 8

H S B
Giga Guru

When you say while closing, does that mean your are closing using API call only or just locally by clicking on some UI action ( button ) ?

 

Please clarify the requirement a bit more in detail.

@H S B when opening ticket, i will need the kb to be attached on the incident . 

AshishKM
Kilo Patron
Kilo Patron

Hi @chercm ,

Do you have both version published at same time? , If that is case, you can manage in rest api code and get the latest version for incident.

Try to attach with the KB number and check which one attaching with incident, 

 

-Thanks,

AshishKMishra


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

@AshishKM do you mean that i need to manually look up the kb and put into the code ?