Skip to main content

spec_revisions

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

Overview

Namespec_revisions
TypeResource
Idgoogle.apigeeregistry.spec_revisions

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringResource name.
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.
contentsstring (byte)Input only. The contents of the spec. Provided by API callers when specs are created or updated. To access the contents of a spec, use GetApiSpecContents.
createTimestring (google-datetime)Output only. Creation timestamp; when the spec resource was created.
descriptionstringA detailed description.
filenamestringA possibly-hierarchical name used to refer to the spec from other specs.
hashstringOutput only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is the hash of the uncompressed spec.
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.
mimeTypestringA style (format) descriptor for this spec that is specified as a Media Type. Possible values include application/vnd.apigee.proto, application/vnd.apigee.openapi, and application/vnd.apigee.graphql, with possible suffixes representing compression types. These hypothetical names are defined in the vendor tree defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").
revisionCreateTimestring (google-datetime)Output only. Revision creation timestamp; when the represented revision was created.
revisionIdstringOutput only. Immutable. The revision ID of the spec. A new revision is committed whenever the spec contents are changed. The format is an 8-character hexadecimal string.
revisionUpdateTimestring (google-datetime)Output only. Last update timestamp: when the represented revision was last modified.
sizeBytesinteger (int32)Output only. The size of the spec file in bytes. If the spec is gzipped, this is the size of the uncompressed spec.
sourceUristringThe original source URI of the spec (if one exists). This is an external location that can be used for reference purposes but which may not be authoritative since this external resource may change after the spec is retrieved.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_apis_versions_specs_list_revisionsselectprojectsId, locationsId, apisId, versionsId, specsIdpageSize, pageToken, filterLists all revisions of a spec. Revisions are returned in descending order of revision creation time.
projects_locations_apis_versions_specs_delete_revisiondeleteprojectsId, locationsId, apisId, versionsId, specsIdDeletes a revision of a spec.

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.

NameDatatypeDescription
apisIdstring
locationsIdstring
projectsIdstring
specsIdstring
versionsIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Lists all revisions of a spec. Revisions are returned in descending order of revision creation time.

SELECT
name,
annotations,
contents,
createTime,
description,
filename,
hash,
labels,
mimeType,
revisionCreateTime,
revisionId,
revisionUpdateTime,
sizeBytes,
sourceUri
FROM google.apigeeregistry.spec_revisions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND apisId = '{{ apisId }}' -- required
AND versionsId = '{{ versionsId }}' -- required
AND specsId = '{{ specsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}';

DELETE examples

Deletes a revision of a spec.

DELETE FROM google.apigeeregistry.spec_revisions
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND apisId = '{{ apisId }}' --required
AND versionsId = '{{ versionsId }}' --required
AND specsId = '{{ specsId }}' --required;