Api Versions - List Versions
List a collection of API versions.
GET https://{serviceName}.data.azure-apicenter.net/workspaces/{workspaceName}/apis/{apiName}/versions?api-version=2024-02-01-preview
GET https://{serviceName}.data.azure-apicenter.net/workspaces/{workspaceName}/apis/{apiName}/versions?api-version=2024-02-01-preview&top={top}&skip={skip}&maxpagesize={maxpagesize}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
api
|
path | True |
string |
Api identifier. |
service
|
path | True |
string |
Region-unique API Center service name |
workspace
|
path | True |
string |
Workspace identifier. |
api-version
|
query | True |
string |
The API version to use for this operation. |
maxpagesize
|
query |
integer int32 |
The maximum number of result items per page. |
|
skip
|
query |
integer int32 |
The number of result items to skip. |
|
top
|
query |
integer int32 |
The number of result items to return. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The request has succeeded. |
|
Other Status Codes |
An unexpected error response. Headers x-ms-error-code: string |
Security
AadOauth2Auth
The Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Token URL:
https://login.microsoftonline.com/common/oauth2/token
Scopes
Name | Description |
---|---|
https://azure-apicenter.net/user_impersonation |
Examples
ApiVersions_ListVersions
Sample request
GET https://{serviceName}.data.azure-apicenter.net/workspaces/default/apis/echo-api/versions?api-version=2024-02-01-preview
Sample response
{
"value": [
{
"name": "2023-01-01",
"title": "2023-01-01",
"lifecycleStage": "design"
}
],
"nextLink": "https://..."
}
Definitions
Name | Description |
---|---|
Api |
API version resource model. |
Azure. |
The error object. |
Azure. |
A response containing error details. |
Azure. |
An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. |
Lifecycle |
API Lifecycle Stage |
Paged |
Paged collection of ApiVersion items |
ApiVersion
API version resource model.
Name | Type | Description |
---|---|---|
lifecycleStage |
Current lifecycle stage of the API version. |
|
name |
string |
Version identifier. |
title |
string |
Version title. |
Azure.Core.Foundations.Error
The error object.
Name | Type | Description |
---|---|---|
code |
string |
One of a server-defined set of error codes. |
details |
An array of details about specific errors that led to this reported error. |
|
innererror |
An object containing more specific information than the current object about the error. |
|
message |
string |
A human-readable representation of the error. |
target |
string |
The target of the error. |
Azure.Core.Foundations.ErrorResponse
A response containing error details.
Name | Type | Description |
---|---|---|
error |
The error object. |
Azure.Core.Foundations.InnerError
An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.
Name | Type | Description |
---|---|---|
code |
string |
One of a server-defined set of error codes. |
innererror |
Inner error. |
LifecycleStage
API Lifecycle Stage
Name | Type | Description |
---|---|---|
deprecated |
string |
API is in the deprecated stage |
design |
string |
API is in the design stage |
development |
string |
API is in the development stage |
preview |
string |
API is in the preview stage |
production |
string |
API is in the production stage |
retired |
string |
API is in the retired stage |
testing |
string |
API is in the testing stage |
PagedApiVersion
Paged collection of ApiVersion items
Name | Type | Description |
---|---|---|
nextLink |
string |
The link to the next page of items |
value |
The ApiVersion items on this page |