Skip to main content

versions

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

Overview

Nameversions
TypeResource
Idgoogle.apigeeregistry.versions

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.
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.
primarySpecstringThe primary spec for this version. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
statestringA user-definable description of the lifecycle phase of this API version. Format: free-form, but we expect single words that describe API maturity, e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION", "DEPRECATED", "RETIRED".
updateTimestringOutput only. Last update timestamp.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_apis_versions_getSELECTapisId, locationsId, projectsId, versionsIdReturns a specified version.
projects_locations_apis_versions_listSELECTapisId, locationsId, projectsIdReturns matching versions.
projects_locations_apis_versions_createINSERTapisId, locationsId, projectsIdCreates a specified version.
projects_locations_apis_versions_deleteDELETEapisId, locationsId, projectsId, versionsIdRemoves a specified version and all of the resources that it owns.
projects_locations_apis_versions_patchUPDATEapisId, locationsId, projectsId, versionsIdUsed to modify a specified version.

SELECT examples

Returns matching versions.

SELECT
name,
description,
annotations,
createTime,
displayName,
labels,
primarySpec,
state,
updateTime
FROM google.apigeeregistry.versions
WHERE apisId = '{{ apisId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.apigeeregistry.versions (
apisId,
locationsId,
projectsId,
name,
displayName,
description,
state,
labels,
annotations,
primarySpec
)
SELECT
'{{ apisId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ state }}',
'{{ labels }}',
'{{ annotations }}',
'{{ primarySpec }}'
;

UPDATE example

Updates a versions resource.

/*+ update */
UPDATE google.apigeeregistry.versions
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
description = '{{ description }}',
state = '{{ state }}',
labels = '{{ labels }}',
annotations = '{{ annotations }}',
primarySpec = '{{ primarySpec }}'
WHERE
apisId = '{{ apisId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND versionsId = '{{ versionsId }}';

DELETE example

Deletes the specified versions resource.

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