- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- SearchResult
- ApiHubResource
Search across API-Hub resources.
HTTP request
POST https://apihub.googleapis.com/v1/{location=projects/*/locations/*}:searchResources
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
location |
Required. The resource name of the location which will be of the type |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "query": string, "filter": string, "pageSize": integer, "pageToken": string } |
Fields | |
---|---|
query |
Required. The free text search query. This query can contain keywords which could be related to any detail of the API-Hub resources such display names, descriptions, attributes etc. |
filter |
Optional. An expression that filters the list of search results. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be The following field names are eligible for filtering: * Here are is an example:
|
pageSize |
Optional. The maximum number of search results to return. The service may return fewer than this value. If unspecified at most 10 search results will be returned. If value is negative then |
pageToken |
Optional. A page token, received from a previous [locations.searchResources][locations.searchResources] call. Specify this parameter to retrieve the next page of transactions. When paginating, you must specify the |
Response body
Response for the locations.searchResources
method.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"searchResults": [
{
object ( |
Fields | |
---|---|
searchResults[] |
List of search results according to the filter and search query specified. The order of search results represents the ranking. |
nextPageToken |
Pass this token in the |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
IAM Permissions
Requires the following IAM permission on the location
resource:
apihub.apis.list
For more information, see the IAM documentation.
SearchResult
Represents the search results.
JSON representation |
---|
{
"resource": {
object ( |
Fields | |
---|---|
resource |
This represents the ApiHubResource. Note: Only selected fields of the resources are populated in response. |
ApiHubResource
ApiHubResource is one of the resources such as Api, Operation, Deployment, Definition, Spec and Version resources stored in API-Hub.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
api |
This represents Api resource in search results. Only name, displayName, description and owner fields are populated in search results. |
operation |
This represents ApiOperation resource in search results. Only name, description, spec and details fields are populated in search results. |
deployment |
This represents Deployment resource in search results. Only name, displayName, description, deploymentType and apiVersions fields are populated in search results. |
spec |
This represents Spec resource in search results. Only name, displayName, description, specType and documentation fields are populated in search results. |
definition |
This represents Definition resource in search results. Only name field is populated in search results. |
version |
This represents Version resource in search results. Only name, displayName, description, lifecycle, compliance and accreditation fields are populated in search results. |