Include Feed and attachments in Copy Ticket API

Hi All,

I am using this POST API to copy a ticket into another application.  

https://##.teamdynamix.com/TDWebApi/api/130/tickets?EnableNotifyReviewer=false&NotifyRequestor=false&NotifyResponsible=true

Is there any way that I can include the Feed and attachments of the original ticket on the move?

 

Thanks!

Tags API
Asked by Phil Thomson on Fri 1/28/22 9:20 AM
Sign In to leave feedback or contribute an answer

Answer (1)

This answer has been marked as the accepted answer
Mark Sayers Fri 2/4/22 1:01 PM

Hello Phil,

If you are creating a ticket in another app rather than moving the ticket, there isn't an action that supports creating the ticket *and* posting to its feed the entire contents of an originating ticket in one shot.

You would have to GET the Feed of the original ticket and then POST the entire response of that call back to the Feed of the new ticket. 

No feedback
Thanks Mark
I can GET the feed info its the POST that I'm having issues with. How do I reference the newly created ticket in the workflow?
- Phil Thomson Fri 2/18/22 9:07 AM
You reference each property in the Parameters section of the POST web service method like so:
TickResponseBodyName.PropertyNameHere

and for custom attributes it would look like:
TickResponseBodyName.Attributes[?(@.ID==33550)].Value

where "Attributes" is the name of the collection in the response being referenced, and the ID value is the attribute ID. Depending on what type of attribute it is you might need to use ValueText at the end instead of Value (like it if is a textbox/text area type attribute).
- Mark Sayers Fri 2/18/22 1:34 PM