Documentation
In AWS API Gateway, a Stage represents a specific deployment environment of your API — such as dev, test, or prod. Once a REST API is created and developed, it must be deployed to a stage to be accessible via an endpoint.
Exporting an API from a stage allows you to:
- Generate an OpenAPI (Swagger) document representing the deployed API structure.
- Share the API structure with the frontend team, mobile developers, or import into tools like Postman, Swagger UI, Insomnia, etc.
- Version your API and migrate easily between environments.
Steps
- Access AWS API Gateway
- Open the API Gateway Console
- Select the REST API you want to export

- In the left panel → Choose Stages
- Click on the specific stage (e.g.,
dev
, prod
)

- View Stage Information
When a Stage is selected, you’ll see:
- Invoke URL:
https://{restapi-id}.execute-api.{region}.amazonaws.com/{stage}
- Options for logging, throttling, caching, etc.
→ This is the endpoint users can call.
- Export the API’s OpenAPI Definition
- Return to the main API screen (not inside the Stage)
- Click the Actions button (top-left corner) → Select Export


→ This file can be imported into Postman, Swagger UI, or other API documentation tools.
- Import to Postman
- Open Postman and click Import in the top-left corner

- Drag and drop the downloaded file and click Import

- Now you can start using the imported API immediately
