- HTTP request
- Request body
- Response body
- Authorization scopes
- Scope
- SearchCatalogResult
- SearchResultType
- Try it!
Searches Data Catalog for multiple resources like entries, tags that match a query.
This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not return the complete resource, only the resource identifier and high level fields. Clients can subsequently call Get
methods.
Note that Data Catalog search queries do not guarantee full recall. Query results that match your query may not be returned, even in subsequent result pages. Also note that results returned (and not returned) can vary across repeated search queries.
See Data Catalog Search Syntax for more information.
HTTP request
POST https://datacatalog.googleapis.com/v1beta1/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. A |
query |
Optional. The query string in search query syntax. An empty query string will result in all data assets (in the specified scope) that the user has access to. Query strings can be simple as "x" or more qualified as:
Note: Query tokens need to have a minimum of 3 characters for substring matching to work correctly. See Data Catalog Search Syntax for more information. |
page |
Number of results in the search page. If <=0 then defaults to 10. Max limit for pageSize is 1000. Throws an invalid argument for pageSize > 1000. |
page |
Optional. Pagination token returned in an earlier |
order |
Specifies the ordering of results, currently supported case-sensitive choices are:
If not specified, defaults to |
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 |
The token that can be used to retrieve the next page of results. |
unreachable[] |
Unreachable locations. Search result does not include data from those locations. Users can get additional information on the error by repeating the search request with a more restrictive parameter -- setting the value for |
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 ] } |
Fields | |
---|---|
include |
The list of organization IDs to search within. To find your organization ID, follow instructions in https://cloud.google.com/resource-manager/docs/creating-managing-organization. |
include |
The list of project IDs to search within. To learn more about the distinction between project names/IDs/numbers, go to https://cloud.google.com/docs/overview/#projects. |
include |
If |
restricted |
Optional. The list of locations to search within. 1. If empty, search will be performed in all locations; 2. If any of the locations are NOT in the valid locations list, error will be returned; 3. Otherwise, search only the given locations for matching results. Typical usage is to leave this field empty. When a location is unreachable as returned in the Valid locations: * asia-east1 * asia-east2 * asia-northeast1 * asia-northeast2 * asia-northeast3 * asia-south1 * asia-southeast1 * australia-southeast1 * eu * europe-north1 * europe-west1 * europe-west2 * europe-west3 * europe-west4 * europe-west6 * global * northamerica-northeast1 * southamerica-east1 * us * us-central1 * us-east1 * us-east4 * us-west1 * us-west2 |
SearchCatalogResult
A result that appears in the response of 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. This field can be used to determine which Get method to call to fetch the full resource. |
search |
Sub-type of the search result. This is a dot-delimited description of the resource's full type, and is the same as the value callers would provide in the "type" search facet. Examples: |
relative |
The relative resource name of the resource in URL format. Examples:
|
linked |
The full name of the cloud resource the entry belongs to. See: https://cloud.google.com/apis/design/resource_names#full_resource_name. Example:
|
modify |
Last-modified timestamp of the entry from the managing system. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
SearchResultType
The different types of resources that can be returned in search.
Enums | |
---|---|
SEARCH_RESULT_TYPE_UNSPECIFIED |
Default unknown type. |
ENTRY |
An Entry . |
TAG_TEMPLATE |
A TagTemplate . |
ENTRY_GROUP |
An EntryGroup . |