- HTTP request
- Request body
- Response body
- Authorization scopes
- Scope
- SearchCatalogResult
- SearchResultType
- Try it!
Searches Data Catalog for multiple resources like entries and tags that match a query.
This is a Custom Method that doesn't return all information on a resource, only its ID and high level fields. To get more information, you can subsequently call specific get methods.
Note: Data Catalog search queries don't guarantee full recall. Results that match your query might not be returned, even in subsequent result pages. Additionally, returned (and not returned) results can vary if you repeat search queries.
For more information, see Data Catalog search syntax.
HTTP request
POST https://datacatalog.googleapis.com/v1/catalog:search
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"scope": {
object ( |
Fields | |
---|---|
scope |
Required. The scope of this search request. The |
query |
Optional. The query string with a minimum of 3 characters and specific syntax. For more information, see Data Catalog search syntax. An empty query string returns all data assets (in the specified scope) that you have access to. A query string can be a simple
|
page |
Upper bound on the number of results you can get in a single response. Can't be negative or 0, defaults to 10 in this case. The maximum number is 1000. If exceeded, throws an "invalid argument" exception. |
page |
Optional. Pagination token that, if specified, returns the next page of search results. If empty, returns the first page. This token is returned in the |
order |
Specifies the order of results. Currently supported case-sensitive values are:
Search queries don't guarantee full recall. Results that match your query might not be returned, even in subsequent result pages. Additionally, returned (and not returned) results can vary if you repeat search queries. If you are experiencing recall issues and you don't have to fetch the results in any specific order, consider setting this parameter to If this parameter is omitted, it defaults to the descending |
admin |
Optional. If set, use searchAll permission granted on organizations from |
Response body
Response message for catalog.search
.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"results": [
{
object ( |
Fields | |
---|---|
results[] |
Search results. |
total |
The approximate total number of entries matched by the query. |
next |
Pagination token that can be used in subsequent calls to retrieve the next page of results. |
unreachable[] |
Unreachable locations. Search results don't include data from those locations. To get additional information on an error, repeat the search request and restrict it to specific locations by setting the |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
Scope
The criteria that select the subspace used for query matching.
JSON representation |
---|
{ "includeOrgIds": [ string ], "includeProjectIds": [ string ], "includeGcpPublicDatasets": boolean, "restrictedLocations": [ string ], "starredOnly": boolean, "includePublicTagTemplates": boolean } |
Fields | |
---|---|
include |
The list of organization IDs to search within. To find your organization ID, follow the steps from Creating and managing organizations. |
include |
The list of project IDs to search within. For more information on the distinction between project names, IDs, and numbers, see Projects. |
include |
If See Google Cloud Public Datasets for more information. |
restricted |
Optional. The list of locations to search within. If empty, all locations are searched. Returns an error if any location in the list isn't one of the Supported regions. If a location is unreachable, its name is returned in the |
starred |
Optional. If By default, all results are returned, starred or not. |
includePublicTagTemplates |
Optional. This field is deprecated. The search mechanism for public and private tag templates is the same. |
SearchCatalogResult
Result in the response to a search request.
Each result captures details of one entry that matches the search.
JSON representation |
---|
{ "searchResultType": enum ( |
Fields | |
---|---|
search |
Type of the search result. You can use this field to determine which get method to call to fetch the full resource. |
search |
Sub-type of the search result. A dot-delimited full type of the resource. The same type you specify in the Examples: |
relative |
The relative name of the resource in URL format. Examples:
|
linked |
The full name of the Google Cloud resource the entry belongs to. For more information, see Full Resource Name. Example:
|
modify |
The last modification timestamp of the entry in the source system. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
fully |
Fully qualified name (FQN) of the resource. FQNs take two forms:
Example for a DPMS table:
|
display |
The display name of the result. |
description |
Entry description that can consist of several sentences or paragraphs that describe entry contents. |
Union field system . The source system of the entry. Applicable only when the search_result_type is ENTRY . system can be only one of the following: |
|
integrated |
Output only. The source system that Data Catalog automatically integrates with, such as BigQuery, Cloud Pub/Sub, or Dataproc Metastore. |
user |
Custom source system that you can manually integrate Data Catalog with. |
SearchResultType
The resource types that can be returned in search results.
Enums | |
---|---|
SEARCH_RESULT_TYPE_UNSPECIFIED |
Default unknown type. |
ENTRY |
An Entry . |
TAG_TEMPLATE |
A TagTemplate . |
ENTRY_GROUP |
An EntryGroup . |