Search tests events

POST {{baseUrl}}/api/v2/ci/tests/events/search

List endpoint returns CI Visibility test events that match a search query. Results are paginated similarly to logs.

Use this endpoint to build complex events filtering and search.

Request Body

{"filter"=>{"from"=>"now-15m", "query"=>"@test.service:web-ui-tests AND @test.status:fail", "to"=>"now"}, "options"=>{"time_offset"=>-15428975, "timezone"=>"GMT"}, "page"=>{"cursor"=>"eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit"=>25}, "sort"=>"-timestamp"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{"data":[{"attributes":{"attributes":{"customAttribute":123,"duration":2345},"tags":["team:A"],"test_level":"test"},"id":"AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA","type":"citest"},{"attributes":{"attributes":{"customAttribute":123,"duration":2345},"tags":["team:A"],"test_level":"test"},"id":"AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA","type":"citest"}],"links":{"next":"https://app.datadoghq.com/api/v2/ci/tests/events?filter[query]=foo\u0026page[cursor]=eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ=="},"meta":{"elapsed":132,"page":{"after":"eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ=="},"request_id":"MWlFUjVaWGZTTTZPYzM0VXp1OXU2d3xLSVpEMjZKQ0VKUTI0dEYtM3RSOFVR","status":"done","warnings":[{"code":"unknown_index","detail":"indexes: foo, bar","title":"One or several indexes are missing or invalid, results hold data from the other indexes"},{"code":"unknown_index","detail":"indexes: foo, bar","title":"One or several indexes are missing or invalid, results hold data from the other indexes"}]}}