I am using the https://docs.adaptavist.io/tm4j/server/api/v1/ APIs to automate create, update, and executions in our server based TM. One thing that I don't see is the ability to add comments (i.e. 'Comments' tab in the Test Case UI) via the APIs.
I see, through browser debugging, that a different API is being called by the TM UI of '/rest/tests/1.0/testcase/<id>/comments'. I am able to POST with that same API and add a comment. The problem I am having is that the <id> is a numeric (ex: 1534). I don't know how to determine that value from the normal <projectKey>-nnn key beyond watching the network call when visiting the Comments tab.
Is the '/rest/tests/1.0/ API documented somewhere? If not, does anyone know how to determine this id?
You can get a test case ID (number) from your test case key (string like PROJ-T123) using this request:
The response will contain the id value you need:
"testData" : [ ],
"majorVersion" : 1,
"id" : 12345,
"key" : "PROJ-T123",
Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events