

# ExportedAPI


Represents an exported definition of an API in a particular output format, for example, YAML. The API is serialized to the requested specification, for example, OpenAPI 3.0.

## URI


`/v2/apis/apiId/exports/specification`

## HTTP methods


### GET


**Operation ID:** `ExportApi`

Exports a definition of an API in a particular output format and specification.


**Path parameters**  

| Name | Type | Required | Description | 
| --- |--- |--- |--- |
| specification | String | True | The version of the API specification to use. `OAS30`, for OpenAPI 3.0, is the only supported value. | 
| apiId | String | True | The API identifier. | 


**Query parameters**  

| Name | Type | Required | Description | 
| --- |--- |--- |--- |
| includeExtensions | String | False | Specifies whether to include [ API Gateway extensions](https://docs.aws.amazon.com//apigateway/latest/developerguide/api-gateway-swagger-extensions.html) in the exported API definition. API Gateway extensions are included by default.  | 
| stageName | String | False | The name of the API stage to export. If you don't specify this property, a representation of the latest API configuration is exported. | 
| exportVersion | String | False | The version of the API Gateway export algorithm. API Gateway uses the latest version by default. Currently, the only supported version is `1.0`. | 
| outputType | String | True | The output type of the exported definition file. Valid values are `JSON` and `YAML`. | 


**Responses**  

| Status code | Response model | Description | 
| --- |--- |--- |
| 200 | ExportedApi | Success | 
| 400 | BadRequestException | One of the parameters in the request is invalid. | 
| 404 | NotFoundException | The resource specified in the request was not found. | 
| 429 | LimitExceededException | The client is sending more than the allowed number of requests per unit of time. | 

## Schemas


### Response bodies


#### ExportedApi schema
ExportedApi

```
"string"
```

#### BadRequestException schema
BadRequestException

```
{
  "message": "string"
}
```

#### NotFoundException schema
NotFoundException

```
{
  "message": "string",
  "resourceType": "string"
}
```

#### LimitExceededException schema
LimitExceededException

```
{
  "message": "string",
  "limitType": "string"
}
```

## Properties


### BadRequestException


The request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.


| Property | Type | Required | Description | 
| --- |--- |--- |--- |
| message | string | False | Describes the error encountered. | 

### LimitExceededException


A limit has been exceeded. See the accompanying error message for details.


| Property | Type | Required | Description | 
| --- |--- |--- |--- |
| limitType | string | False | The limit type. | 
| message | string | False | Describes the error encountered. | 

### NotFoundException


The resource specified in the request was not found. See the `message` field for more information.


| Property | Type | Required | Description | 
| --- |--- |--- |--- |
| message | string | False | Describes the error encountered. | 
| resourceType | string | False | The resource type. | 

## See also


For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

### ExportApi

+ [AWS Command Line Interface V2](/goto/cli2/apigatewayv2-2018-11-29/ExportApi)
+ [AWS SDK for .NET V4](/goto/DotNetSDKV4/apigatewayv2-2018-11-29/ExportApi)
+ [AWS SDK for C\$1\$1](/goto/SdkForCpp/apigatewayv2-2018-11-29/ExportApi)
+ [AWS SDK for Go v2](/goto/SdkForGoV2/apigatewayv2-2018-11-29/ExportApi)
+ [AWS SDK for Java V2](/goto/SdkForJavaV2/apigatewayv2-2018-11-29/ExportApi)
+ [AWS SDK for JavaScript V3](/goto/SdkForJavaScriptV3/apigatewayv2-2018-11-29/ExportApi)
+ [AWS SDK for Kotlin](/goto/SdkForKotlin/apigatewayv2-2018-11-29/ExportApi)
+ [AWS SDK for PHP V3](/goto/SdkForPHPV3/apigatewayv2-2018-11-29/ExportApi)
+ [AWS SDK for Python](/goto/boto3/apigatewayv2-2018-11-29/ExportApi)
+ [AWS SDK for Ruby V3](/goto/SdkForRubyV3/apigatewayv2-2018-11-29/ExportApi)