Import and export API definitions

更新时间:
复制 MD 格式

API Gateway supports importing and exporting API definitions based on the OpenAPI Specification (OAS) standard, including OAS-compliant extensions. Use these capabilities to migrate existing APIs and manage API data across accounts, regions, and platforms.

Import OAS-compliant APIs

API Gateway supports importing API definitions that follow OAS 2.0 or OAS 3.0. You can also import OAS-compliant extensions to migrate existing APIs to API Gateway without modification. This section covers:

  • Parameter mappings between an OAS 2.0-compliant API definition and an API Gateway API definition.

  • Parameter mappings between an OAS 3.0-compliant API definition and an API Gateway API definition.

  • Importing OAS 2.0-compliant API definitions that contain API Gateway extensions.

Export APIs based on OAS

API Gateway supports exporting API definitions in OAS 2.0 or OAS 3.0 format, enabling you to migrate API data across accounts, regions, or platforms. This section covers:

  • Exporting OAS-compliant APIs.

    You can export an entire API group or specific APIs.

API Gateway Swagger extensions

Import a Swagger 2.0 file to create an API in the API Gateway console or by calling the ImportSwagger operation. This section covers:

  • Extensions supported by Swagger: Swagger supports extensions to its native Operation Object. Extensions provide authentication, parameter mapping, and backend service capabilities.

  • Compatibility: parameter type mappings between Swagger and API Gateway.

  • Swagger extension examples: examples of Swagger extensions for API Gateway.

  • Usage notes: important considerations when using this feature.