Trying to get all Testruns associated with a Testplan

Hello, I am trying to get all the Testruns associated with a Testplan using this curl command:

curl -L ‘https:// app. testiny .io / api/ v1 / testrun/ find’
-H ‘Content-Type: application/json’
-H ‘Accept: application/json’
-H ‘X-Api-Key: MY API KEY’
-d ‘{ “map”: { “entities”: [“testplan”, “testrun”], “ids”: { “testplan_id”: 3 } } }’

Sadly I am getting this error:

{
“type”: “ApiError”,
“code”: “API_INTERNAL_ERROR”,
“message”: “Read operation failed because of an internal error”,
“reqid”: “wZuJU4OjUt0O5P6HFVuf”
}

Hi and welcome to the Testiny forum!

You can just search for all test runs where the testplan_id is 3:

curl -L ‘https://app. testiny.io/api/v1/testrun/find’
-H ‘Content-Type: application/json’
-H ‘Accept: application/json’
-H ‘X-Api-Key: MY API KEY’
-d ‘{ “filter”: { “testplan_id”: 3 } }’

Regards,
Alex