You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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",