feat(synthetics): add synthetics tests search command - #73
Merged
Conversation
Wire up the SearchTests API endpoint (GET /api/v1/synthetics/tests/search) which was already available in the datadog-api-client-go but not exposed as a pup subcommand. * Supports free text search and facet queries (creator, team, env, type, state, status, tag, region, domain, http_method, etc.) * --facets-only flag to discover available facets and values per org * --include-full-config to return full test configuration * Pagination via --start and --count * --sort for result ordering * Documented all facets with verified values from the API
platinummonkey
approved these changes
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wires up the
SearchTestsAPI endpoint (GET /api/v1/synthetics/tests/search) as a newpup synthetics tests searchsubcommand. The endpoint was already available indatadog-api-client-gobut not exposed in pup — currentlysynthetics tests listdumps all tests with no server-side filtering.Motivation
synthetics tests listreturns all tests in an org with no filtering. The search endpoint supports facet-based queries (creator,team,env,type, etc.) making it practical to find specific tests without client-side filtering.Changes
synthetics tests searchsubcommand (cmd/synthetics.go) — callsdatadogV1.SyntheticsApi.SearchTestswith all optional parameters:--textfor free text and facet queries (e.g.,creator:"Jane Doe",team:my-team,type:browser env:prod)--facets-onlyto discover available facets and values for the org--include-full-configto return full test configuration in results--start/--countfor pagination--sortfor result orderingcreator,team,env,type,state,status,tag,region,domain,http_method,http_path,muted,ci_execution_rule,creation_source,mobile_platform,notification,endpoint,step_countcmd/synthetics_test.go) for the new search handlerTesting
Checklist