Movatterモバイル変換


[0]ホーム

URL:


Import an API into the Postman API Builder

You can import an existing API specification into the Postman API Builder. API specifications can be imported from a local file or directory, a URL, raw text, or an API gateway.

You can also import an API specification from a code repository. Learn more aboutimporting data from a Git repository.

Import an API specification

  1. In Postman, clickImport in the sidebar.

  2. Select an API specification file, enter a link to the API, or paste your raw text.

    If you import an OpenAPI 3.0 or AsyncAPI 2.0 specification this way, you’ll only have the option toimport the specification into Spec Hub. To import an OpenAPI 3.0 or AsyncAPI 2.0 specification into the API Builder,import the file into your API.

  3. You can choose to import the specification as a collection or as an API along with a collection.

    API specification import options

    ClickSetting iconView Import Settings for more configuration options. These options will vary depending on your API specification.

  4. ClickImport.

  5. AnImport Complete message displays in the footer. In the message, selectOpen in Postman iconGo to Collection next to a collection or API to open the imported element.

    Import complete message

Import a multi-file API specification

Multi-file API specifications are supported in OpenAPI 2.0 and 3.0 APIs and protobuf 2.0 and 3.0 APIs.

If you import a multi-file OpenAPI 3.0 specification this way, you’ll only have the option toimport the specification into Spec Hub. To import a multi-file OpenAPI 3.0 specification into the API Builder,import the files into your API.

  1. In Postman, clickImport in the sidebar.

  2. Selectfolders, then select a local folder with your API files.

  3. Select the files you want to import into Postman. SelectPostman Collection to create a collection only. Select(format) with a Postman Collection to import the specification as a collection in theCollections tab and an API with a collection.

    ClickSetting iconView Import Settings for more configuration options. These options will vary depending on your API specification.

  4. ClickImport.

  5. AnImport Complete message displays in the footer. In the message, selectOpen in Postman iconGo to Collection next to a collection or API to open the imported element.

    Import complete message

Learn more aboutworking with multi-file API specifications.

Import API specifications from Amazon API Gateway

Amazon API Gateway enables developers to publish and manage APIs that access AWS and other web services and data sources. You can import APIs directly from AWS Gateway to Postman. This creates an integration with API Gateway. Once connected, you can view your API deployment status and history from within Postman. You can also viewAmazon CloudWatch metrics for each stage to get operational insight into your API.

This integration supports importing OpenAPI 3.0 specifications for both HTTP and REST APIs. Importing a specification will create a new API in Postman and will also configure an integration with AWS API Gateway.

To import an API from AWS API Gateway, clickImport in the sidebar, then selectOther Sources > AWS API Gateway. When importing an API from AWS API Gateway, you can choose to authenticate by creating an AWS IAM role or by using an AWS access key. Follow the steps for your chosen method:

Authenticate with an AWS IAM role

To set up a connection to Amazon API Gateway using an AWS IAM role, do the following:

  1. SelectIAM underAWS Authentication Method.

    Connecting with AWS IAM role
  2. Select theAWS API Type (HTTP or REST).

To create an IAM role for Postman in AWS, do the following:

  1. Sign in to theAWS IAM console and selectCreate role.

  2. UnderSelect type of trusted entity, selectAWS account.

  3. UnderAn AWS account, selectAnother AWS account and enter Postman’sAWS Account ID:258201882842

  4. UnderOptions, select theRequire external ID checkbox and enter theExternal ID from Postman. You can find the external ID in Postman’sConnect to AWS API Gateway procedure underStep 1: Create an IAM role, as shown inAuthenticating with an AWS IAM role.

    For more information, refer to theAWS IAM guide on using external IDs.

  5. ClickNext: Permissions.

  6. Select an existing IAM policy or clickCreate policy. If you are creating a policy, use the following JSON code:

    {"Version":"2012-10-17","Statement":[{"Sid":"Stmt909923626743","Effect":"Allow","Action":["apigateway:GET","apigateway:PUT","apigateway:POST","cloudwatch:GetMetricData"],"Resource":["*"]}]}

    This policy will enable exporting and deploying for HTTP API specifications. (Exporting and deploying aren’t supported for REST API specifications.) You can customize theAction section in the IAM policy based on your needs:

    • "apigateway:GET" - (Required) Enables viewing API Gateway deployments for HTTP and REST APIs in Postman.
    • "apigateway:PUT" - Enablesexporting HTTP API specifications to the API Gateway.
    • "apigateway:POST" - Enablesdeploying HTTP API specifications to a stage on the API Gateway.
    • "apigateway:*" - Assigns all GET, PUT, POST, PATCH, DELETE permissions to the IAM role.
    • "cloudwatch:GetMetricData" - Enablesviewing CloudWatch metrics in Postman.
  7. ClickNext: Tags.

  8. ClickNext: Review.

  9. Add aRole name andRole description, then clickCreate role.

Copy theRole ARN from AWS and paste it in Postman underStep 2: Enter role ARN and region. Next, enter theAWS Region where the API Gateway is located and select theAPI Gateway. Then, enter anAPI Name for the imported API. When you’re ready, clickConnect.

Authenticate with an AWS access key

To set up a connection to Amazon API Gateway using an AWS access key, selectAccess Key underAWS Authentication Method.

Connecting with AWS access key

Next, enter information about the connection:

  • Select theAWS API Type (HTTP or REST).
  • Enter theAccess Key ID andSecret Access Key for your AWS account. (Learn how tofind your credentials in AWS.)
  • Enter theAWS Region where the API Gateway is located and select theAPI Gateway.
  • Enter anAPI Name for the imported API.

When you’re ready, clickImport. After importing your API specification, you canview API deployments in Postman.

Import API specifications from Azure API Management

You can import a specification from a connected Azure API Management service to an API in Postman. Importing a specification will create a new API in Postman and will also configure an integration with Azure API Management. Learn more aboutintegrating with Azure API Management.

To import an API specification from Azure API Management, do the following:

  1. ClickImport in the sidebar, then selectOther Sources > Azure API Management.

  2. You’ll be prompted to authorize Postman to access your Microsoft Azure account. After you grant access, you can close the browser tab and return to Postman.

  3. Enter information about the Azure API Management service you want to import a specification from:

    • Subscription - Thesubscription where the service was created.
    • Resource Group - Theresource group that has the service.
    • Service - The Azure API Managementservice instance used for deploying your API.
    • Azure API Version - The Azure APIversion you want to import.
    • Definition type - Select the specification for the specification you want to import (OpenAPI 2.0 or OpenAPI 3.0).
    • API name - The name to use for the new API that will be created in Postman using the imported specification.
  4. ClickImport.

Supported API specifications formats

Postman directly supports importing the following formats:

There are also tools on GitHub to convert different API specifications into a Postman Collection that can be imported:

Last modified: 2025/10/10



[8]ページ先頭

©2009-2025 Movatter.jp