Api Export - Get
Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}?format={format}&export=true&api-version=2024-05-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
api
|
path | True |
string |
API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Regex pattern: |
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. |
service
|
path | True |
string |
The name of the API Management service. Regex pattern: |
subscription
|
path | True |
string uuid |
The ID of the target subscription. The value must be an UUID. |
api-version
|
query | True |
string |
The API version to use for this operation. |
export
|
query | True |
Query parameter required to export the API details. |
|
format
|
query | True |
Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes. New formats can be added in the future. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The response contains a stream with a full set of API metadata and includes API entity with an embedded array of operation entities. |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Api |
Api |
ApiManagementGetApiExportInOpenApi2dot0
Sample request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api?format=swagger-link&export=true&api-version=2024-05-01
Sample response
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api",
"format": "swagger-link-json",
"value": {
"link": "https://apimgmtstkjpszxxxxxxx.blob.core.windows.net/api-export/Swagger Petstore Extensive.json?XXXXXXXX"
}
}
ApiManagementGetApiExportInOpenApi3dot0
Sample request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/aid9676?format=openapi-link&export=true&api-version=2024-05-01
Sample response
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/aid9676",
"format": "openapi-link",
"value": {
"link": "https: //apimgmtstkjpszxxxxxxx.blob.core.windows.net/api-export/Swagger Petstore.yaml?storage-sas-signatureXXXX"
}
}
Definitions
Name | Description |
---|---|
Api |
API Export result. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Export |
Query parameter required to export the API details. |
Export |
Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes. New formats can be added in the future. |
Export |
Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. |
Value |
The object defining the schema of the exported API Detail |
ApiExportResult
API Export result.
Name | Type | Description |
---|---|---|
format |
Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. |
|
id |
string |
ResourceId of the API which was exported. |
value |
The object defining the schema of the exported API Detail |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
ExportApi
Query parameter required to export the API details.
Name | Type | Description |
---|---|---|
true |
string |
ExportFormat
Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes. New formats can be added in the future.
Name | Type | Description |
---|---|---|
openapi+json-link |
string |
Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob. |
openapi-link |
string |
Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob. |
swagger-link |
string |
Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob. |
wadl-link |
string |
Export the Api Definition in WADL Schema to Storage Blob. |
wsdl-link |
string |
Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type |
ExportResultFormat
Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes.
Name | Type | Description |
---|---|---|
openapi-link |
string |
Export the API Definition in OpenAPI Specification 3.0 to Storage Blob. |
swagger-link-json |
string |
The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob. |
wadl-link-json |
string |
Export the API Definition in WADL Schema to Storage Blob. |
wsdl-link+xml |
string |
The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs of Type |
Value
The object defining the schema of the exported API Detail
Name | Type | Description |
---|---|---|
link |
string |
Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes. |