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
New York Times: Insurers are using driving information collected by OEMs
Diabetic wounds that won’t heal? Learn why you may be healing slowly and how to speed up the process.
Lairson Enterprises Rv Sales
Njdep Org Chart
Police in Germany arrest 25 people allegedly planning to overthrow the government
What Times What Equals 86
Parent Portal Pat Med
Ky Cna Validation
Walmart Takes on Abercrombie with Relaunch of No Boundaries
Dass Slumber Party Pt1
Lbl A-Z
צפייה ומעקב אחר תוצאות בדיקות ואבחונים
Fireboy And Watergirl Advanced Method
Hewn New Bedford
Www Craigslist Springfield Missouri
Studentvue Calexico
La Varita De Emilio Link
Crafts & Hobbies: Fabrics & Crafts Supplies - JOANN
„The Boogeyman“: Kritik zum Kinostart
Snohomish Hairmasters
Summit University Ceu 360
Evo Unblocked
Merrick Rv Loans
Docent Edelsteenkunde & Studieloopbaan begeleider | Schoonhoven | Stichting voor Educatie en Beroepsonderwijs Zadkine
Missouri Highway Patrol Crash
Is Mcdonald's Open 24/7 Near Me
Rs3 F2P Money Making
S2Dfree.dc
Splunk If Command
Nch Naples Patient Portal Login
Lucki White House Lyrics
Njdep Org Chart
Marie Temara Feet Pics
Student Registration / Overview
Thankathon
Trumbull County Jail Commissary
149 Capstone Project Ideas & Examples – 2024
Craigslist Edmond
The Outdoorsman Arroyo Grande
Cocaine Bear Showtimes Near Phoenix Theatres Laurel Park
Ups Drop Off Near By
He bought a cruise ship on Craigslist and spent over $1 million restoring it. Then his dream sank
Noaa Weather Forecast Pittsburgh
Sapphire Community Portal Southwestern
American Pie Band Camp Parents Guide
Millie Bobby Brown Tied Up
Shane Gillis Girlfriend: All About His Dating History, Career & More |Pudelek
2005 Chevrolet Silverado Radio Wiring Diagram
Hapi Burkett
Gle Outage Map
Apartments / Housing For Rent near Brooksville, FL - craigslist
Does Gamestop Take Airpods
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.