Skip to main content

apis

Creates, updates, deletes, gets or lists a apis resource.

Overview

Nameapis
TypeResource
Idgoogle.apigeeregistry.apis

Fields

NameDatatypeDescription
namestringResource name.
descriptionstringA detailed description.
annotationsobjectAnnotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts.
availabilitystringA user-definable description of the availability of this service. Format: free-form, but we expect single words that describe availability, e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
createTimestringOutput only. Creation timestamp.
displayNamestringHuman-meaningful name.
labelsobjectLabels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with apigeeregistry.googleapis.com/ and cannot be changed.
recommendedDeploymentstringThe recommended deployment of the API. Format: projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}
recommendedVersionstringThe recommended version of the API. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}
updateTimestringOutput only. Last update timestamp.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_apis_getSELECTapisId, locationsId, projectsIdReturns a specified API.
projects_locations_apis_listSELECTlocationsId, projectsIdReturns matching APIs.
projects_locations_apis_createINSERTlocationsId, projectsIdCreates a specified API.
projects_locations_apis_deleteDELETEapisId, locationsId, projectsIdRemoves a specified API and all of the resources that it owns.
projects_locations_apis_patchUPDATEapisId, locationsId, projectsIdUsed to modify a specified API.

SELECT examples

Returns matching APIs.

SELECT
name,
description,
annotations,
availability,
createTime,
displayName,
labels,
recommendedDeployment,
recommendedVersion,
updateTime
FROM google.apigeeregistry.apis
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new apis resource.

/*+ create */
INSERT INTO google.apigeeregistry.apis (
locationsId,
projectsId,
name,
displayName,
description,
availability,
recommendedVersion,
recommendedDeployment,
labels,
annotations
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ availability }}',
'{{ recommendedVersion }}',
'{{ recommendedDeployment }}',
'{{ labels }}',
'{{ annotations }}'
;

UPDATE example

Updates a apis resource.

/*+ update */
UPDATE google.apigeeregistry.apis
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
description = '{{ description }}',
availability = '{{ availability }}',
recommendedVersion = '{{ recommendedVersion }}',
recommendedDeployment = '{{ recommendedDeployment }}',
labels = '{{ labels }}',
annotations = '{{ annotations }}'
WHERE
apisId = '{{ apisId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified apis resource.

/*+ delete */
DELETE FROM google.apigeeregistry.apis
WHERE apisId = '{{ apisId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';