:doc:`ApiGatewayV2 <../../apigatewayv2>` / Client / export_api

**********
export_api
**********



.. py:method:: ApiGatewayV2.Client.export_api(**kwargs)

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/ExportApi>`_  


  **Request Syntax**
  ::

    response = client.export_api(
        ApiId='string',
        ExportVersion='string',
        IncludeExtensions=True|False,
        OutputType='YAML'|'JSON',
        Specification='OAS30',
        StageName='string'
    )
    
  :type ApiId: string
  :param ApiId: **[REQUIRED]** 

    The API identifier.

    

  
  :type ExportVersion: string
  :param ExportVersion: 

    The version of the API Gateway export algorithm. API Gateway uses the latest version by default. Currently, the only supported version is 1.0.

    

  
  :type IncludeExtensions: boolean
  :param IncludeExtensions: 

    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.

    

  
  :type OutputType: string
  :param OutputType: **[REQUIRED]** 

    The output type of the exported definition file. Valid values are JSON and YAML.

    

  
  :type Specification: string
  :param Specification: **[REQUIRED]** 

    The version of the API specification to use. OAS30, for OpenAPI 3.0, is the only supported value.

    

  
  :type StageName: string
  :param StageName: 

    The name of the API stage to export. If you don't specify this property, a representation of the latest API configuration is exported.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'body': StreamingBody()
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Success

      
      

      - **body** (:class:`.StreamingBody`) -- 

        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.

        
  
  **Exceptions**
  
  *   :py:class:`ApiGatewayV2.Client.exceptions.NotFoundException`

  
  *   :py:class:`ApiGatewayV2.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`ApiGatewayV2.Client.exceptions.BadRequestException`

  