versions
Creates, updates, deletes, gets or lists a versions
resource.
Overview
Name | versions |
Type | Resource |
Id | google.apigeeregistry.versions |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_apis_versions_get
- projects_locations_apis_versions_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Resource name. |
annotations | object | Annotations 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. |
createTime | string (google-datetime) | Output only. Creation timestamp. |
description | string | A detailed description. |
displayName | string | Human-meaningful name. |
labels | object | Labels 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. |
primarySpec | string | The primary spec for this version. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec} |
state | string | A 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". |
updateTime | string (google-datetime) | Output only. Last update timestamp. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Resource name. |
annotations | object | Annotations 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. |
createTime | string (google-datetime) | Output only. Creation timestamp. |
description | string | A detailed description. |
displayName | string | Human-meaningful name. |
labels | object | Labels 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. |
primarySpec | string | The primary spec for this version. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec} |
state | string | A 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". |
updateTime | string (google-datetime) | Output only. Last update timestamp. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_apis_versions_get | select | projectsId , locationsId , apisId , versionsId | Returns a specified version. | |
projects_locations_apis_versions_list | select | projectsId , locationsId , apisId | pageSize , pageToken , filter , orderBy | Returns matching versions. |
projects_locations_apis_versions_create | insert | projectsId , locationsId , apisId | apiVersionId | Creates a specified version. |
projects_locations_apis_versions_patch | update | projectsId , locationsId , apisId , versionsId | updateMask , allowMissing | Used to modify a specified version. |
projects_locations_apis_versions_delete | delete | projectsId , locationsId , apisId , versionsId | force | Removes a specified version and all of the resources that it owns. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
apisId | string | |
locationsId | string | |
projectsId | string | |
versionsId | string | |
allowMissing | boolean | |
apiVersionId | string | |
filter | string | |
force | boolean | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_apis_versions_get
- projects_locations_apis_versions_list
Returns a specified version.
SELECT
name,
annotations,
createTime,
description,
displayName,
labels,
primarySpec,
state,
updateTime
FROM google.apigeeregistry.versions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND apisId = '{{ apisId }}' -- required
AND versionsId = '{{ versionsId }}' -- required;
Returns matching versions.
SELECT
name,
annotations,
createTime,
description,
displayName,
labels,
primarySpec,
state,
updateTime
FROM google.apigeeregistry.versions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND apisId = '{{ apisId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- projects_locations_apis_versions_create
- Manifest
Creates a specified version.
INSERT INTO google.apigeeregistry.versions (
data__name,
data__displayName,
data__description,
data__state,
data__labels,
data__annotations,
data__primarySpec,
projectsId,
locationsId,
apisId,
apiVersionId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ state }}',
'{{ labels }}',
'{{ annotations }}',
'{{ primarySpec }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ apisId }}',
'{{ apiVersionId }}'
RETURNING
name,
annotations,
createTime,
description,
displayName,
labels,
primarySpec,
state,
updateTime
;
# Description fields are for documentation purposes
- name: versions
props:
- name: projectsId
value: string
description: Required parameter for the versions resource.
- name: locationsId
value: string
description: Required parameter for the versions resource.
- name: apisId
value: string
description: Required parameter for the versions resource.
- name: name
value: string
description: >
Resource name.
- name: displayName
value: string
description: >
Human-meaningful name.
- name: description
value: string
description: >
A detailed description.
- name: state
value: string
description: >
A 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".
- name: labels
value: object
description: >
Labels 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.
- name: annotations
value: object
description: >
Annotations 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.
- name: primarySpec
value: string
description: >
The primary spec for this version. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
- name: apiVersionId
value: string
UPDATE
examples
- projects_locations_apis_versions_patch
Used to modify a specified version.
UPDATE google.apigeeregistry.versions
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__state = '{{ state }}',
data__labels = '{{ labels }}',
data__annotations = '{{ annotations }}',
data__primarySpec = '{{ primarySpec }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND apisId = '{{ apisId }}' --required
AND versionsId = '{{ versionsId }}' --required
AND updateMask = '{{ updateMask}}'
AND allowMissing = {{ allowMissing}}
RETURNING
name,
annotations,
createTime,
description,
displayName,
labels,
primarySpec,
state,
updateTime;
DELETE
examples
- projects_locations_apis_versions_delete
Removes a specified version and all of the resources that it owns.
DELETE FROM google.apigeeregistry.versions
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND apisId = '{{ apisId }}' --required
AND versionsId = '{{ versionsId }}' --required
AND force = '{{ force }}';