# REST Resource: projects.locations.apis.versions

- [Resource: Version](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions#Version)
  - [JSON representation](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions#Version.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions#METHODS_SUMMARY)

## Resource: Version

Represents a version of the API resource in API hub. This is also referred to as the API version.

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "description": string, "documentation": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/Documentation`) }, "specs": [ string ], "apiOperations": [ string ], "definitions": [ string ], "deployments": [ string ], "createTime": string, "updateTime": string, "lifecycle": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`) }, "compliance": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`) }, "accreditation": { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`) }, "attributes": { string: { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`) }, ... }, "selectedDeployment": string, "sourceMetadata": [ { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/SourceMetadata`) } ] } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The name of the version. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}` |
| `displayName` | `string` Required. The display name of the version. |
| `description` | `string` Optional. The description of the version. |
| `documentation` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/Documentation`)`` Optional. The documentation of the version. |
| `specs[]` | `string` Output only. The specs associated with this version. Note that an API version can be associated with multiple specs. Format is `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` |
| `apiOperations[]` | `string` Output only. The operations contained in the API version. These operations will be added to the version when a new spec is added or when an existing spec is updated. Format is `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}` |
| `definitions[]` | `string` Output only. The definitions contained in the API version. These definitions will be added to the version when a new spec is added or when an existing spec is updated. Format is `projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}` |
| `deployments[]` | `string` Optional. The deployments linked to this API version. Note: A particular API version could be deployed to multiple deployments (for dev deployment, UAT deployment, etc) Format is `projects/{project}/locations/{location}/deployments/{deployment}` |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time at which the version was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time at which the version was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `lifecycle` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`)`` Optional. The lifecycle of the API version. This maps to the following system defined attribute: `projects/{project}/locations/{location}/attributes/system-lifecycle` attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute. |
| `compliance` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`)`` Optional. The compliance associated with the API version. This maps to the following system defined attribute: `projects/{project}/locations/{location}/attributes/system-compliance` attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute. |
| `accreditation` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`)`` Optional. The accreditations associated with the API version. This maps to the following system defined attribute: `projects/{project}/locations/{location}/attributes/system-accreditation` attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute. |
| `attributes` | ``map (key: string, value: object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/AttributeValues`))`` Optional. The list of user defined attributes associated with the Version resource. The key is the attribute name. It will be of the format: `projects/{project}/locations/{location}/attributes/{attribute}`. The value is the attribute values associated with the resource. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `selectedDeployment` | `string` Optional. The selected deployment for a Version resource. This can be used when special handling is needed on client side for a particular deployment linked to the version. Format is `projects/{project}/locations/{location}/deployments/{deployment}` |
| `sourceMetadata[]` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/SourceMetadata`)`` Output only. The list of sources and metadata from the sources of the version. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions/create` | Create an API version for an API resource in the API hub. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions/delete` | Delete an API version. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions/get` | Get details about the API version of an API resource. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions/list` | List API versions of an API resource in the API hub. |
| ### `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions/patch` | Update API version. |