Docs
Live demo
GET/api/v2/resources/search
targets:readAPI token

Search targets and discovered resources across organization scope, a page at a time in one stable order.

Parameters

Query1 required of 5
qstringqueryrequired

Search query

limitintegerquery

Maximum items in page

default 50
cursorstringquery

Opaque cursor from next_cursor of the previous page. Send it with the same query.

target_kindstringquery

Filter by target kind (postgres, mysql, clickhouse, mongodb, kubernetes)

postgresmysqlclickhousemongodbsshkubernetesapplication
match_typearray of string (ResourcesSearchMatchType)query

Keep only hits of these match types. Repeat the parameter for several. Without it every type but table is kept, as for clients of the previous release. Tables come only when table is named. Tables match by the start of their name and only for a query of at least three characters. Letter case is compared by the lower() of the Principal database: with LC_CTYPE=C only the ASCII letters A-Z ignore case.

targetdatabaseschematablerolemysql_userclickhouse_usermongodb_userk8s_namespacek8s_cluster_rolek8s_rolek8s_cluster_bindingk8s_role_bindingssh_tunnelssh_key
max items 16

Responses

200

OK

ResourcesSearchResponse · 6 fields
failed_targetsarray of ResourcesSearchFailedTargetrequired

Targets whose discovered resources the search could not read for this page. Empty when partial is false. Join the lists of every page read.

2 fields
target_idstringrequired
target_namestringrequired
has_morebooleanrequired

True when another page follows. The list ends when it is false.

itemsarray of ResourcesSearchItemrequired
12 fields
databasestring

Database of a database, schema or table hit.

managed_by_principalboolean

True for a Kubernetes object Principal created.

match_labelstring
match_typestring (ResourcesSearchMatchType)

What a resource search hit matched.

targetdatabaseschematablerolemysql_userclickhouse_usermongodb_userk8s_namespacek8s_cluster_rolek8s_rolek8s_cluster_bindingk8s_role_bindingssh_tunnelssh_key
namespacestring

Namespace of a Kubernetes namespace, Role or RoleBinding hit.

pathstring
resource_idstring
schemastring

Schema of a PostgreSQL schema or table hit. For MariaDB and ClickHouse tables, the database.

scorenumber
target_idstring
target_kindstring (TargetKind)
postgreskubernetesmysqlclickhousemongodbapplicationssh
target_namestring
next_cursorstring

Opaque cursor of the next page, present only when has_more is true. Send it unchanged as the cursor query parameter with the same filters.

totalinteger

Full number of items that match the request, present only when the list counts them. It is never the size of the page.

partialbooleanrequired

True when the resources of some targets could not be read for this page: the items are then not a proof that nothing else matches. A list is partial when any of its pages was.

Common errors: 400 401 403 429 504. They mean the same for every operation, see Errors.

↑ ↓ to moveEnter to openEsc to close