Class ApiHubGrpc.ApiHubBlockingStub (0.1.0)

public static final class ApiHubGrpc.ApiHubBlockingStub extends AbstractBlockingStub<ApiHubGrpc.ApiHubBlockingStub>

A stub to allow clients to do synchronous rpc calls to service ApiHub.

This service provides all methods related to the API hub.

Inheritance

java.lang.Object > io.grpc.stub.AbstractStub > io.grpc.stub.AbstractBlockingStub > ApiHubGrpc.ApiHubBlockingStub

Methods

build(Channel channel, CallOptions callOptions)

protected ApiHubGrpc.ApiHubBlockingStub build(Channel channel, CallOptions callOptions)
Parameters
Name Description
channel io.grpc.Channel
callOptions io.grpc.CallOptions
Returns
Type Description
ApiHubGrpc.ApiHubBlockingStub
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)

createApi(CreateApiRequest request)

public Api createApi(CreateApiRequest request)

Create an API resource in the API hub. Once an API resource is created, versions can be added to it.

Parameter
Name Description
request CreateApiRequest
Returns
Type Description
Api

createAttribute(CreateAttributeRequest request)

public Attribute createAttribute(CreateAttributeRequest request)

Create a user defined attribute. Certain pre defined attributes are already created by the API hub. These attributes will have type as SYSTEM_DEFINED and can be listed via ListAttributes method. Allowed values for the same can be updated via UpdateAttribute method.

Parameter
Name Description
request CreateAttributeRequest
Returns
Type Description
Attribute

createDeployment(CreateDeploymentRequest request)

public Deployment createDeployment(CreateDeploymentRequest request)

Create a deployment resource in the API hub. Once a deployment resource is created, it can be associated with API versions.

Parameter
Name Description
request CreateDeploymentRequest
Returns
Type Description
Deployment

createExternalApi(CreateExternalApiRequest request)

public ExternalApi createExternalApi(CreateExternalApiRequest request)

Create an External API resource in the API hub.

Parameter
Name Description
request CreateExternalApiRequest
Returns
Type Description
ExternalApi

createSpec(CreateSpecRequest request)

public Spec createSpec(CreateSpecRequest request)

Add a spec to an API version in the API hub. Multiple specs can be added to an API version. Note, while adding a spec, at least one of contents or source_uri must be provided. If contents is provided, then spec_type must also be provided. On adding a spec with contents to the version, the operations present in it will be added to the version.Note that the file contents in the spec should be of the same type as defined in the projects/{project}/locations/{location}/attributes/system-spec-type attribute associated with spec resource. Note that specs of various types can be uploaded, however parsing of details is supported for OpenAPI spec currently. In order to access the information parsed from the spec, use the GetSpec method. In order to access the raw contents for a particular spec, use the GetSpecContents method. In order to access the operations parsed from the spec, use the ListAPIOperations method.

Parameter
Name Description
request CreateSpecRequest
Returns
Type Description
Spec

createVersion(CreateVersionRequest request)

public Version createVersion(CreateVersionRequest request)

Create an API version for an API resource in the API hub.

Parameter
Name Description
request CreateVersionRequest
Returns
Type Description
Version

deleteApi(DeleteApiRequest request)

public Empty deleteApi(DeleteApiRequest request)

Delete an API resource in the API hub. API can only be deleted if all underlying versions are deleted.

Parameter
Name Description
request DeleteApiRequest
Returns
Type Description
Empty

deleteAttribute(DeleteAttributeRequest request)

public Empty deleteAttribute(DeleteAttributeRequest request)

Delete an attribute. Note: System defined attributes cannot be deleted. All associations of the attribute being deleted with any API hub resource will also get deleted.

Parameter
Name Description
request DeleteAttributeRequest
Returns
Type Description
Empty

deleteDeployment(DeleteDeploymentRequest request)

public Empty deleteDeployment(DeleteDeploymentRequest request)

Delete a deployment resource in the API hub.

Parameter
Name Description
request DeleteDeploymentRequest
Returns
Type Description
Empty

deleteExternalApi(DeleteExternalApiRequest request)

public Empty deleteExternalApi(DeleteExternalApiRequest request)

Delete an External API resource in the API hub.

Parameter
Name Description
request DeleteExternalApiRequest
Returns
Type Description
Empty

deleteSpec(DeleteSpecRequest request)

public Empty deleteSpec(DeleteSpecRequest request)

Delete a spec. Deleting a spec will also delete the associated operations from the version.

Parameter
Name Description
request DeleteSpecRequest
Returns
Type Description
Empty

deleteVersion(DeleteVersionRequest request)

public Empty deleteVersion(DeleteVersionRequest request)

Delete an API version. Version can only be deleted if all underlying specs, operations, definitions and linked deployments are deleted.

Parameter
Name Description
request DeleteVersionRequest
Returns
Type Description
Empty

getApi(GetApiRequest request)

public Api getApi(GetApiRequest request)

Get API resource details including the API versions contained in it.

Parameter
Name Description
request GetApiRequest
Returns
Type Description
Api

getApiOperation(GetApiOperationRequest request)

public ApiOperation getApiOperation(GetApiOperationRequest request)

Get details about a particular operation in API version.

Parameter
Name Description
request GetApiOperationRequest
Returns
Type Description
ApiOperation

getAttribute(GetAttributeRequest request)

public Attribute getAttribute(GetAttributeRequest request)

Get details about the attribute.

Parameter
Name Description
request GetAttributeRequest
Returns
Type Description
Attribute

getDefinition(GetDefinitionRequest request)

public Definition getDefinition(GetDefinitionRequest request)

Get details about a definition in an API version.

Parameter
Name Description
request GetDefinitionRequest
Returns
Type Description
Definition

getDeployment(GetDeploymentRequest request)

public Deployment getDeployment(GetDeploymentRequest request)

Get details about a deployment and the API versions linked to it.

Parameter
Name Description
request GetDeploymentRequest
Returns
Type Description
Deployment

getExternalApi(GetExternalApiRequest request)

public ExternalApi getExternalApi(GetExternalApiRequest request)

Get details about an External API resource in the API hub.

Parameter
Name Description
request GetExternalApiRequest
Returns
Type Description
ExternalApi

getSpec(GetSpecRequest request)

public Spec getSpec(GetSpecRequest request)

Get details about the information parsed from a spec. Note that this method does not return the raw spec contents. Use GetSpecContents method to retrieve the same.

Parameter
Name Description
request GetSpecRequest
Returns
Type Description
Spec

getSpecContents(GetSpecContentsRequest request)

public SpecContents getSpecContents(GetSpecContentsRequest request)

Get spec contents.

Parameter
Name Description
request GetSpecContentsRequest
Returns
Type Description
SpecContents

getVersion(GetVersionRequest request)

public Version getVersion(GetVersionRequest request)

Get details about the API version of an API resource. This will include information about the specs and operations present in the API version as well as the deployments linked to it.

Parameter
Name Description
request GetVersionRequest
Returns
Type Description
Version

listApiOperations(ListApiOperationsRequest request)

public ListApiOperationsResponse listApiOperations(ListApiOperationsRequest request)

List operations in an API version.

Parameter
Name Description
request ListApiOperationsRequest
Returns
Type Description
ListApiOperationsResponse

listApis(ListApisRequest request)

public ListApisResponse listApis(ListApisRequest request)

List API resources in the API hub.

Parameter
Name Description
request ListApisRequest
Returns
Type Description
ListApisResponse

listAttributes(ListAttributesRequest request)

public ListAttributesResponse listAttributes(ListAttributesRequest request)

List all attributes.

Parameter
Name Description
request ListAttributesRequest
Returns
Type Description
ListAttributesResponse

listDeployments(ListDeploymentsRequest request)

public ListDeploymentsResponse listDeployments(ListDeploymentsRequest request)

List deployment resources in the API hub.

Parameter
Name Description
request ListDeploymentsRequest
Returns
Type Description
ListDeploymentsResponse

listExternalApis(ListExternalApisRequest request)

public ListExternalApisResponse listExternalApis(ListExternalApisRequest request)

List External API resources in the API hub.

Parameter
Name Description
request ListExternalApisRequest
Returns
Type Description
ListExternalApisResponse

listSpecs(ListSpecsRequest request)

public ListSpecsResponse listSpecs(ListSpecsRequest request)

List specs corresponding to a particular API resource.

Parameter
Name Description
request ListSpecsRequest
Returns
Type Description
ListSpecsResponse

listVersions(ListVersionsRequest request)

public ListVersionsResponse listVersions(ListVersionsRequest request)

List API versions of an API resource in the API hub.

Parameter
Name Description
request ListVersionsRequest
Returns
Type Description
ListVersionsResponse

searchResources(SearchResourcesRequest request)

public SearchResourcesResponse searchResources(SearchResourcesRequest request)

Search across API-Hub resources.

Parameter
Name Description
request SearchResourcesRequest
Returns
Type Description
SearchResourcesResponse

updateApi(UpdateApiRequest request)

public Api updateApi(UpdateApiRequest request)

Update an API resource in the API hub. The following fields in the [API][] can be updated:

  • display_name
  • description
  • owner
  • documentation
  • target_user
  • team
  • business_unit
  • maturity_level
  • attributes The update_mask should be used to specify the fields being updated. Updating the owner field requires complete owner message and updates both owner and email fields.
Parameter
Name Description
request UpdateApiRequest
Returns
Type Description
Api

updateAttribute(UpdateAttributeRequest request)

public Attribute updateAttribute(UpdateAttributeRequest request)

Update the attribute. The following fields in the Attribute resource can be updated:

  • display_name The display name can be updated for user defined attributes only.
  • description The description can be updated for user defined attributes only.
  • allowed_values To update the list of allowed values, clients need to use the fetched list of allowed values and add or remove values to or from the same list. The mutable allowed values can be updated for both user defined and System defined attributes. The immutable allowed values cannot be updated or deleted. The updated list of allowed values cannot be empty. If an allowed value that is already used by some resource's attribute is deleted, then the association between the resource and the attribute value will also be deleted.
  • cardinality The cardinality can be updated for user defined attributes only. Cardinality can only be increased during an update. The update_mask should be used to specify the fields being updated.
Parameter
Name Description
request UpdateAttributeRequest
Returns
Type Description
Attribute

updateDeployment(UpdateDeploymentRequest request)

public Deployment updateDeployment(UpdateDeploymentRequest request)

Update a deployment resource in the API hub. The following fields in the deployment resource can be updated:

  • display_name
  • description
  • documentation
  • deployment_type
  • resource_uri
  • endpoints
  • slo
  • environment
  • attributes The update_mask should be used to specify the fields being updated.
Parameter
Name Description
request UpdateDeploymentRequest
Returns
Type Description
Deployment

updateExternalApi(UpdateExternalApiRequest request)

public ExternalApi updateExternalApi(UpdateExternalApiRequest request)

Update an External API resource in the API hub. The following fields can be updated:

  • display_name
  • description
  • documentation
  • endpoints
  • paths The update_mask should be used to specify the fields being updated.
Parameter
Name Description
request UpdateExternalApiRequest
Returns
Type Description
ExternalApi

updateSpec(UpdateSpecRequest request)

public Spec updateSpec(UpdateSpecRequest request)

Update spec. The following fields in the spec can be updated:

  • display_name
  • source_uri
  • lint_response
  • attributes
  • contents
  • spec_type In case of an OAS spec, updating spec contents can lead to:
  • Creation, deletion and update of operations.
  • Creation, deletion and update of definitions.
  • Update of other info parsed out from the new spec. In case of contents or source_uri being present in update mask, spec_type must also be present. Also, spec_type can not be present in update mask if contents or source_uri is not present. The update_mask should be used to specify the fields being updated.
Parameter
Name Description
request UpdateSpecRequest
Returns
Type Description
Spec

updateVersion(UpdateVersionRequest request)

public Version updateVersion(UpdateVersionRequest request)

Update API version. The following fields in the version can be updated currently:

  • display_name
  • description
  • documentation
  • deployments
  • lifecycle
  • compliance
  • accreditation
  • attributes The update_mask should be used to specify the fields being updated.
Parameter
Name Description
request UpdateVersionRequest
Returns
Type Description
Version