Method: projects.locations.retrieveApiViews

Retrieve API views.

HTTP request

GET https://apihub.googleapis.com/v1/{parent=projects/*/locations/*}:retrieveApiViews

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent resource name. Format: projects/{project}/locations/{location}.

Query parameters

Parameters
filter

string

Optional. The filter expression.

pageSize

integer

Optional. The maximum number of results to return. Default to 100.

pageToken

string

Optional. A page token, received from a previous locations.retrieveApiViews call. Provide this to retrieve the subsequent page.

view

enum (ApiViewType)

Required. The view type to return.

Request body

The request body must be empty.

Response body

The [locations.retrieveApiViews][ApiHubInternal.RetrieveApiViews] method's response.

If successful, the response body contains data with the following structure:

JSON representation
{
  "apiViews": [
    {
      object (ApiView)
    }
  ],
  "nextPageToken": string
}
Fields
apiViews[]

object (ApiView)

The list of API views.

nextPageToken

string

Next page token.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

IAM Permissions

Requires the following IAM permissions on the parent resource:

  • apihub.apiOperations.listAll
  • apihub.apis.list
  • apihub.deployments.list
  • apihub.specs.listAll
  • apihub.versions.listAll

For more information, see the IAM documentation.

ApiViewType

The view type of API.

Enums
API_VIEW_TYPE_UNSPECIFIED The default view type.
MCP_SERVER The MCP server view in API hub.
MCP_TOOL The MCP tool view in API hub.

ApiView

The view of an API.

JSON representation
{

  // Union field view can be only one of the following:
  "mcpServerView": {
    object (FlattenedApiVersionDeploymentView)
  },
  "mcpToolView": {
    object (FlattenedApiVersionOperationDeploymentView)
  }
  // End of list of possible types for union field view.
}
Fields
Union field view. API view. view can be only one of the following:
mcpServerView

object (FlattenedApiVersionDeploymentView)

Output only. MCP server view.

mcpToolView

object (FlattenedApiVersionOperationDeploymentView)

Output only. MCP tools view.

FlattenedApiVersionDeploymentView

A flattened view of an API, its version and one of the linked deployments.

JSON representation
{
  "api": {
    object (Api)
  },
  "version": {
    object (Version)
  },
  "deployment": {
    object (Deployment)
  }
}
Fields
api

object (Api)

The API.

version

object (Version)

The version.

deployment

object (Deployment)

The deployment.

FlattenedApiVersionOperationDeploymentView

A flattened view of an API, its version, one of its operations and one of the linked deployments. If there are no deployments linked to the operation then the result will be empty.

JSON representation
{
  "api": {
    object (Api)
  },
  "version": {
    object (Version)
  },
  "apiOperation": {
    object (ApiOperation)
  },
  "deployment": {
    object (Deployment)
  }
}
Fields
api

object (Api)

The API.

version

object (Version)

The version.

apiOperation

object (ApiOperation)

The API operation.

deployment

object (Deployment)

The deployment.