APIGateway / Client / get_export

get_export#

APIGateway.Client.get_export(**kwargs)#

Exports a deployed version of a RestApi in a specified format.

See also: AWS API Documentation

Request Syntax

response = client.get_export(
    restApiId='string',
    stageName='string',
    exportType='string',
    parameters={
        'string': 'string'
    },
    accepts='string'
)
Parameters:
  • restApiId (string) –

    [REQUIRED]

    The string identifier of the associated RestApi.

  • stageName (string) –

    [REQUIRED]

    The name of the Stage that will be exported.

  • exportType (string) –

    [REQUIRED]

    The type of export. Acceptable values are ‘oas30’ for OpenAPI 3.0.x and ‘swagger’ for Swagger/OpenAPI 2.0.

  • parameters (dict) –

    A key-value map of query string parameters that specify properties of the export, depending on the requested exportType. For exportType oas30 and swagger, any combination of the following parameters are supported: extensions='integrations' or extensions='apigateway' will export the API with x-amazon-apigateway-integration extensions. extensions='authorizers' will export the API with x-amazon-apigateway-authorizer extensions. postman will export the API with Postman extensions, allowing for import to the Postman tool

    • (string) –

      • (string) –

  • accepts (string) – The content-type of the export, for example application/json. Currently application/json and application/yaml are supported for exportType of oas30 and swagger. This should be specified in the Accept header for direct API requests.

Return type:

dict

Returns:

Response Syntax

{
    'contentType': 'string',
    'contentDisposition': 'string',
    'body': StreamingBody()
}

Response Structure

  • (dict) –

    The binary blob response to GetExport, which contains the generated SDK.

    • contentType (string) –

      The content-type header value in the HTTP response. This will correspond to a valid ‘accept’ type in the request.

    • contentDisposition (string) –

      The content-disposition header value in the HTTP response.

    • body (StreamingBody) –

      The binary blob response to GetExport, which contains the export.

Exceptions