Resource: ApiSpec
Describes a version of an API in a structured way. ApiSpecs provide formal descriptions that consumers can use to use a version. ApiSpec resources are intended to be fully-resolved descriptions of an ApiVersion. When specs consist of multiple files, these should be bundled together (e.g., in a zip archive) and stored as a unit. Multiple specs can exist to provide representations in different API description formats. Synchronization of these representations would be provided by tooling and background services.
JSON representation |
---|
{ "name": string, "filename": string, "description": string, "revisionId": string, "createTime": string, "revisionCreateTime": string, "revisionUpdateTime": string, "mimeType": string, "sizeBytes": integer, "hash": string, "sourceUri": string, "contents": string, "labels": { string: string, ... }, "annotations": { string: string, ... } } |
Fields | |
---|---|
name |
Resource name. |
filename |
A possibly-hierarchical name used to refer to the spec from other specs. |
description |
A detailed description. |
revisionId |
Output 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. |
createTime |
Output only. Creation timestamp; when the spec resource was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
revisionCreateTime |
Output only. Revision creation timestamp; when the represented revision was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
revisionUpdateTime |
Output only. Last update timestamp: when the represented revision was last modified. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
mimeType |
A style (format) descriptor for this spec that is specified as a Media Type. Possible values include |
sizeBytes |
Output only. The size of the spec file in bytes. If the spec is gzipped, this is the size of the uncompressed spec. |
hash |
Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is the hash of the uncompressed spec. |
sourceUri |
The 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. |
contents |
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 specs.getContents. A base64-encoded string. |
labels |
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 An object containing a list of |
annotations |
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. An object containing a list of |
Methods |
|
---|---|
|
Creates a specified spec. |
|
Removes a specified spec, all revisions, and all child resources (e.g., artifacts). |
|
Deletes a revision of a spec. |
|
Returns a specified spec. |
|
Returns the contents of a specified spec. |
|
Gets the access control policy for a resource. |
|
Returns matching specs. |
|
Lists all revisions of a spec. |
|
Used to modify a specified spec. |
|
Sets the current revision to a specified prior revision. |
|
Sets the access control policy on the specified resource. |
|
Adds a tag to a specified revision of a spec. |
|
Returns permissions that a caller has on the specified resource. |