Api Definitions - Get Definition
Get an API definition.
GET https://{serviceName}.data.{region}.azure-apicenter.ms/workspaces/{workspaceName}/apis/{apiName}/versions/{versionName}/definitions/{definitionName}?api-version=2024-02-01-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
api
|
path | True |
string maxLength: 50 |
Api identifier. |
definition
|
path | True |
string maxLength: 50 |
Definition identifier. |
region
|
path | True |
string |
Region name |
service
|
path | True |
string |
Region-unique API Center service name |
version
|
path | True |
string maxLength: 50 |
Version identifier. |
workspace
|
path | True |
string maxLength: 50 |
Workspace identifier. |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
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
ApiDefinitions_GetDefinition
Sample request
GET https://{serviceName}.data.{region}.azure-apicenter.ms/workspaces/default/apis/echo-api/versions/2023-01-01/definitions/default?api-version=2024-02-01-preview
Sample response
{
"name": "default",
"title": "Default",
"specification": {
"name": "openapi",
"version": "3.0.1"
},
"description": "Default API definition."
}
Definitions
Name | Description |
---|---|
Api |
API definition resource model. |
Api |
API specification |
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/azure/Guidelines.md#handling-errors. |
ApiDefinition
API definition resource model.
Name | Type | Description |
---|---|---|
description |
string maxLength: 1000 |
The description of the API definition. |
name |
string maxLength: 50 |
Definition identifier. |
specification |
The API specification details. |
|
title |
string maxLength: 50 |
The name of the API definition. |
ApiSpecification
API specification
Name | Type | Description |
---|---|---|
name |
string |
API specification name, e.g. 'swagger' or 'openapi'. |
version |
string |
API specification version, e.g. '3.0.1'. |
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/azure/Guidelines.md#handling-errors.
Name | Type | Description |
---|---|---|
code |
string |
One of a server-defined set of error codes. |
innererror |
Inner error. |