# Build an API Status Checker Agent with Postman (Full Tutorial)

Source: https://www.youtube.com/watch?v=V_ukc_dLB3w
Recap page: https://rapidrecap.app/video/V_ukc_dLB3w
Generated: 2025-11-10T15:40:14.937+00:00

---
## Quick Overview

The tutorial successfully demonstrates how to build an AI Agent using Postman Flows to automatically check the status of all APIs within a Postman collection against a production environment, reporting successes and failures, which is then deployed as an MCP server agent callable via a URL.

**Key Points:**
- The tutorial builds a Postman Flow to act as an AI Agent that checks the status of all APIs in a Postman collection against a production environment.
- The flow successfully retrieves the collection details using the 'Get Postman Collection' API, extracts the base URL and API key, and flattens the nested list of APIs using `collection.flatMap()` in an 'Evaluate' block.
- The agent uses the 'API Status Checker' tool (which relies on a specific production URL) to check the status of 25 endpoints, reporting 21 successful and 4 failed (all 404 errors on authentication endpoints).
- The final step involves deploying the Postman Flow as an MCP server agent, accessible via a specific URL, which can then be called by the AI Agent tool within the flow.
- The resulting agent summarizes the health check, noting that most services are healthy but identifying four specific endpoints (auth login, auth/logout, control/users, control/powerservers) returned 404 errors, likely due to incorrect HTTP methods (GET instead of POST) or missing configurations.

![Screenshot at 02:02: The initial setup in Postman Flows shows the 'Start' block receiving inputs for the Postman collection URL and API key, connecting to an 'Evaluate' block to process the collection structure for iteration.](https://ss.rapidrecap.app/screens/V_ukc_dLB3w/00-02-02.png)

**Context:** This video is part two of a tutorial series focused on leveraging Postman Flows to create custom, automated AI Agents capable of interacting with Postman APIs. The presenter, Sterling Chin (Sr. Developer Advocate at Postman), constructs a flow designed to iterate through all requests in a specific Postman collection, execute them against a defined production environment, and summarize the success or failure status of each endpoint, effectively creating an automated API status checker agent.

## Detailed Analysis

The tutorial builds a complex Postman Flow designed to function as an automated API status checker agent. The process begins by defining inputs in the 'Start' block: `postman_collection_url`, `postman_api_key`, and `base_url` (the production endpoint URL). An 'Evaluate' block then uses JavaScript (`collection.flatMap()`) to process the list of endpoints fetched from the Postman API, flattening the nested structure into a simple list of URLs. This flattened list is fed into a 'For' loop block, which iterates over each API endpoint URL. Inside the loop, an HTTP Request block calls the 'API Status Checker' tool using the production base URL and the Postman API key (retrieved from configurations or environment variables) to check the endpoint status. The results from the HTTP Request are collected, and a final 'Evaluate' block summarizes the findings, noting 21 successful checks and 4 failures (all 404 errors related to authentication/control endpoints). The presenter then configures the flow's output and deploys the flow as an agent on an MCP server, accessible via a specific URL, which confirms the tool is working as expected by successfully checking the API statuses.

### Flow Setup & Input Variables

- Defined inputs for Postman collection URL, API key, and base URL (production environment) in the 'Start' block
- Used 'Evaluate' block with JavaScript's `collection.flatMap()` to flatten the nested collection structure from the 'Get Postman Collection' step.

### Iteration and Status Checking

- Implemented a 'For' loop to iterate over the flattened list of APIs, feeding each URL into an 'HTTP Request' block configured to use the 'API Status Checker' tool.

### Data Collection and Output

- Used two 'Collect' blocks to gather results from both the success and failure paths of the HTTP Request, followed by a final 'Evaluate' block to generate the summary report.

### AI Agent Configuration

- Added an 'AI Agent' block using the 'OpenAI GPT-4' model, providing a prompt that instructs the AI to act as an SRE, check the status of APIs, and report findings including proposed solutions.

### Deployment and Verification

- Deployed the completed flow as an agent on an MCP server, confirmed by checking the deployment URL and running a final test which successfully generated the status report summary from the AI Agent.

![Screenshot at 00:00: Viewing the 'API Status Checker - Complete Collection' overview in Postman before starting flow creation.](https://ss.rapidrecap.app/screens/V_ukc_dLB3w/00-00-00.png)
![Screenshot at 00:02: Executing a GET request to retrieve collection details within the Postman interface.](https://ss.rapidrecap.app/screens/V_ukc_dLB3w/00-00-02.png)
![Screenshot at 00:02: Initial setup of the Postman Flow canvas showing the connection between the 'Get Postman Collection' block and the next step.](https://ss.rapidrecap.app/screens/V_ukc_dLB3w/00-00-02.png)
![Screenshot at 00:04: The flow diagram beginning to take shape with the 'AI Agent' block connected to the response path of an earlier step.](https://ss.rapidrecap.app/screens/V_ukc_dLB3w/00-00-04.png)
![Screenshot at 00:17: The speaker pointing out the collection structure in the Postman sidebar, emphasizing the organizational aspect.](https://ss.rapidrecap.app/screens/V_ukc_dLB3w/00-00-17.png)
![Screenshot at 00:35: The initial Postman collection structure visible on the left pane, showing the scope of the status check.](https://ss.rapidrecap.app/screens/V_ukc_dLB3w/00-00-35.png)
![Screenshot at 01:11: Inspecting the OpenAPI specification for the 'API Status Checker' collection to understand its structure.](https://ss.rapidrecap.app/screens/V_ukc_dLB3w/00-01-11.png)
![Screenshot at 01:48: Navigating to the 'Flows' section in Postman to begin building the automation.](https://ss.rapidrecap.app/screens/V_ukc_dLB3w/00-01-48.png)
![Screenshot at 01:56: Creating a 'New flow module' in Postman Flows, which sets up the initial canvas.](https://ss.rapidrecap.app/screens/V_ukc_dLB3w/00-01-56.png)
![Screenshot at 02:48: The flow structure showing the initial 'Start' block connected to an 'Evaluate' block, which is connected to a 'Get Postman Collection' block, demonstrating the initial data processing steps before the AI Agent call.](https://ss.rapidrecap.app/screens/V_ukc_dLB3w/00-02-48.png)
