Connect multiple APIs to a repository | Postman Learning Center (2024)

You can connect more than one API in Postman to the same Git repository. For each API you want to connect, repeat the process to set up the Git integration. For complete steps, see Using a cloud-hosted Git repository or Using an on-premises Git repository.

It's important to make sure your APIs remain separated in the repository to avoid changes from one API getting applied to another API. You can separate your APIs in the repository using either files or branches.

Separating APIs with files

You can keep your APIs separate by adding different definition files to each API. Definition files can exist at the root level of the repository or in any subdirectory. Also, when setting up the Git integrations, make sure to select a different collections folder for each API. This will keep your collection files separated.

For example, if you have an emails API and an sms API, you could have the following file structure for the main branch in your repository:

  • emails-api.yaml - Root definition file for the emails API
  • emails/postman/collections - Collections directory for the emails API
  • sms-api.yaml - Root definition file for the sms API
  • sms/postman/collections - Collections directory for the sms API

If you're working on a multi-file API definition, you can choose which files to add to each API. Make sure to select the correct definition files when adding files to an API.

For OpenAPI 2.0 and 3.0 APIs, when you add definition files to your API, Postman scans for any referenced files in the same repository and automatically adds them to your API. If two APIs are in the same repository, and each API's root definition files reference the same file, that file will be added to both APIs. In this case, changes made in one API may affect the other API.

Reusing components in multiple APIs

If there are common components referenced by multiple APIs, you can keep them in separate directories (such as schemas or responses). You can then add the common component files to each API as needed. This enables you to reuse the same component file in more than one API definition. Keep in mind that if you push changes to a component file from one API, other APIs that use the same component will also be affected.

Separating APIs with branches

You can keep your APIs separate by using a different branch for each API in the repository. For example, if you have a notifications-v1 API and a notifications-v2 API, you could have the following branch and directory structure in your repository:

  • notifications-v1 branch
    • notifications.yaml - Root definition file for the notifications-v1 API
    • postman/collections - Collections directory for the notifications-v1 API
  • notifications-v2 branch
    • notifications.yaml - Root definition file for the notifications-v2 API
    • postman/collections - Collections directory for the notifications-v2 API

As you work on your APIs, you can switch branches and push or pull changes for any branch. To keep your APIs separate, always make sure you are on the correct branch before pushing or pulling changes.

Connect multiple APIs to a repository | Postman Learning Center (2024)
Top Articles
Classroom Economy Reward System - The Routty Math Teacher
Bank Account Transfers Details | Western Union AU
Data reveals most expensive dog breeds in U.S. for 2024 
Trivial Pursuit Pogo Answers
57 Freeway Accident Today 2023
Hannahcpalmer Leaks
Oontz Angle 3 Manual
247 Cincinnati
violinplot - Violin plot - MATLAB
What Number Is 0.1 Less Than 11.6
Stretch limos were the ultimate status symbol. Now they're going for cheap on Craigslist.
Rock Auto Parts Catalogue
Methstreams Boxing Stream
Craigslist Gigs Galveston
Dekalb County Jail Fort Payne Alabama
Bad And Boujee One Mo Chance Age
Green Flag Route
Profile By Sanford Recipes
Th 8 Best Army
18 Cafes in Yoyogi that You'll Want to Visit Repeatedly
How to Grow and Care for Four O’Clock Flowers | Gardener’s Path
George Hamilton Deck Commercial
CMFGUS33, SWIFT-Code für COMMUNITY FEDERAL SAVINGS BANK, NEW YORK
Craigslist Furniture Bedroom Set
Nalley Trailer Sales Photos
Bowfa Ge
Jesus Revolution Showtimes Near Amc Classic Findlay 12
Dr Frobish Possesses A
Monster Hunter Rise Steam Unlocked
Allen Kessler Twitter
Standard Page Field
Guadalajara Taqueria Cisco Menu
What Does Code 898 Mean On Irs Transcript
Smp Vs Cbpc
Kelly Motorcycle Blue Book
Black Panther 2 Showtimes Near Epic Theatres Of Palm Coast
Tj Musas
Wall Street Institute
Sailboat - sailing yacht - for sale
Police bust global cyber gang accused of industrial-scale fraud
Bailu Game8
Cloche Minecraft
Power Outage Map Albany Ny
Fv-F Fv-G Pay Scale
Am I Racist ? : le succès de ce film réac à la Borat est un "joli" coup de communication
8774141128
Alylynn
25 Best Things to Do in Bremerton, WA - Travel Lens
Martinsburg (West Virginia) – Travel guide at Wikivoyage
Uncutmazaa
Derpixon Kemono
R+L Carriers Tracking | Instant Shipment Information.
Latest Posts
Article information

Author: Domingo Moore

Last Updated:

Views: 5579

Rating: 4.2 / 5 (73 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Domingo Moore

Birthday: 1997-05-20

Address: 6485 Kohler Route, Antonioton, VT 77375-0299

Phone: +3213869077934

Job: Sales Analyst

Hobby: Kayaking, Roller skating, Cabaret, Rugby, Homebrewing, Creative writing, amateur radio

Introduction: My name is Domingo Moore, I am a attractive, gorgeous, funny, jolly, spotless, nice, fantastic person who loves writing and wants to share my knowledge and understanding with you.