Hi, Can someone please share with me an example of...
# develocity
i
Hi, Can someone please share with me an example of API call to
api/tests/containers
with parameters? the wiki does not contain any structure of the APi and its very hard to tell. This is something i came up with but it does not work
Copy code
<url>/api/tests/containers?container="*"&testOutcomes=failed&query=user:bla buildStartTime:"2025-03-14T09:15:30+02:00 to 2025-03-15T12:30:45+02:00"
I am trying to get top 10 flaky tests from an API call
i
Flaky tests in the last 7 days including the build scan id:
Copy code
curl --location -G \
    'https://$DV_URL/api/tests/containers' \
    --header "Authorization: Bearer $TOKEN" \
    --data-urlencode 'container=*' \
    --data-urlencode 'testOutcomes=flaky' \
    --data-urlencode 'include=buildScanIds' \
    --data-urlencode 'query=buildStartTime>-7d'
i
@Inaki thanks that works. How do i add more params to query, to make it more complex?
i
the
query
parameter supports the advanced search syntax https://docs.gradle.com/develocity/api-manual/#advanced_search_syntax for instance:
Copy code
--data-urlencode 'query=buildStartTime>-7d tag:CI project:geode'
🙌 1