Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 36 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Postman SDK

![Version](https://img.shields.io/badge/version-0.8.2-blue)
![Version](https://img.shields.io/badge/version-0.8.4-blue)
[![All Tests](https://github.com/bidnessforb/postman-sdk/workflows/Postman%20SDK%20-%20All%20Tests/badge.svg)](https://github.com/bidnessforb/postman-sdk/actions/workflows/all-tests.yml)
[![Unit Tests](https://github.com/bidnessforb/postman-sdk/workflows/Postman%20SDK%20-%20Unit%20Tests/badge.svg)](https://github.com/bidnessforb/postman-sdk/actions/workflows/unit-tests.yml)
[![Functional Tests](https://github.com/bidnessforb/postman-sdk/workflows/Postman%20SDK%20-%20Functional%20Tests%20%26%20Coverage/badge.svg)](https://github.com/bidnessforb/postman-sdk/actions/workflows/functional-tests.yml)
[![codecov](https://codecov.io/gh/bidnessforb/postman-sdk/branch/main/graph/badge.svg?token=XBROJOTUS4)](https://codecov.io/gh/bidnessforb/postman-sdk)
![Modules](https://img.shields.io/badge/modules-12-blue)
![Endpoints](https://img.shields.io/badge/endpoints-102%2F161%20(63.35%25)-yellow)
![Modules](https://img.shields.io/badge/modules-13-blue)
![Endpoints](https://img.shields.io/badge/endpoints-112%2F161%20(69.57%25)-yellow)
![License](https://img.shields.io/badge/license-ISC-blue)
![Status](https://img.shields.io/badge/status-alpha-orange)

Expand Down Expand Up @@ -90,7 +90,7 @@ process.env.POSTMAN_API_KEY = 'your_api_key_here';
### Basic Example

```javascript
const { collections, workspaces, specs, requests, responses } = require('@bidnessforb/postman-sdk');
const { collections, workspaces, specs, monitors, requests, responses } = require('@bidnessforb/postman-sdk');

// Make sure your API key is set
process.env.POSTMAN_API_KEY = 'your_api_key_here';
Expand All @@ -108,6 +108,19 @@ async function example() {
const specsResponse = await specs.getSpecs();
console.log('Specs:', specsResponse.data);

// Create a monitor for a collection
const collectionUid = collectionsResponse.data.collections[0].uid;
const workspaceId = workspacesResponse.data.workspaces[0].id;
const monitorResponse = await monitors.createMonitor({
name: 'API Monitor',
collection: collectionUid,
schedule: {
cron: '0 0 * * *',
timezone: 'UTC'
}
}, workspaceId);
console.log('Created Monitor:', monitorResponse.data);

// Create a request in a collection
const collectionId = collectionsResponse.data.collections[0].id;
const requestResponse = await requests.createRequest(collectionId, {
Expand Down Expand Up @@ -196,13 +209,15 @@ postman-sdk/

The SDK is organized by resource groups:

- **collections**: Endpoints for managing Postman Collections, folders, comments, forks, and pull requests (41/64 endpoints - 64.1%)
- **collections**: Endpoints for managing Postman Collections, folders, comments, forks, and pull requests (43/64 endpoints - 67.2%)
- **requests**: Endpoints for managing requests and comments within collections (8/8 endpoints - 100% ✅)
- **responses**: Endpoints for managing responses and comments within collections (8/8 endpoints - 100% ✅)
- **workspaces**: Endpoints for managing Postman Workspaces and tags (7/14 endpoints - 50%)
- **specs**: Endpoints for managing Postman API Specifications and generations (15/15 endpoints - 100% ✅)
- **environments**: Endpoints for managing Postman Environments and forks (9/10 endpoints - 90%)
- **mocks**: Endpoints for managing mock servers, responses, and call logs (13/13 endpoints - 100% ✅)
- **groups**: Endpoints for retrieving team groups (2/2 endpoints - 100% ✅)
- **monitors**: Endpoints for managing monitors and running monitor executions (6/6 endpoints - 100% ✅)
- **tags**: Endpoints for retrieving entities by tag (1/1 endpoint - 100% ✅)
- **transformations**: Endpoints for bi-directional sync between specs and collections (2/2 endpoints - 100% ✅)
- **users**: Endpoints for user information and authentication (1/3 endpoints - 33.3%)
Expand Down Expand Up @@ -249,19 +264,22 @@ npm run test:all-up

This orchestrates all functional tests in sequence:
1. Workspaces (create/test workspace)
2. Environments (create/test environments in workspace)
3. Collections (create/test collection in workspace)
4. Collection Comments (create/test comments on collection)
5. Folders (create/test folder in collection)
6. Folder Comments (create/test comments on folder)
7. Requests (create/test requests in collections and folders)
8. Responses (create/test responses on requests)
9. Mocks (create/test mock servers)
10. Specs (create/test API specs in workspace)
11. Transformations (test bidirectional sync between specs and collections)
12. Tags (test tagging and entity retrieval)
13. Forks (test collection and environment forking operations)
14. Pull Requests (test PR creation, update, and review)
2. Groups (retrieve and persist team groups)
3. Environments (create/test environments in workspace)
4. Collections (create/test collection in workspace)
5. Collection Roles (test collection access control with user and group roles)
6. Collection Comments (create/test comments on collection)
7. Folders (create/test folder in collection)
8. Folder Comments (create/test comments on folder)
9. Requests (create/test requests in collections and folders)
10. Responses (create/test responses on requests)
11. Mocks (create/test mock servers)
12. Monitors (create/test monitors for collections)
13. Specs (create/test API specs in workspace)
14. Transformations (test bidirectional sync between specs and collections)
15. Tags (test tagging and entity retrieval)
16. Forks (test collection and environment forking operations)
17. Pull Requests (test PR creation, update, and review)

**Note**: Functional tests make real API calls and create actual resources. Test IDs are persisted to `test-ids.json` for reuse across test runs. Resources are NOT automatically deleted after the test.

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ We release patches for security vulnerabilities. Currently supported versions:

| Version | Supported |
| ------- | ------------------ |
| 0.8.2 | :white_check_mark: |
| 0.8.4 | :white_check_mark: |
| < 0.8.0 | :x: |

**Note:** This project is in alpha stage. The API may change between minor versions until 1.0.0 is released.
Expand Down
36 changes: 18 additions & 18 deletions docs/API-ENDPOINTS-TODO.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Postman API SDK - Endpoint Implementation Status

**SDK Version**: 0.8.2
**Last Updated**: December 27, 2025
**SDK Version**: 0.8.4
**Last Updated**: January 3, 2026
**Jest Version**: 30.2.0

## Overview
Expand All @@ -12,8 +12,8 @@ This document tracks the implementation status of all Postman API endpoints in t

- **Total Endpoints**: 88 unique paths
- **Total Operations**: 161 HTTP method operations
- **Implemented**: 102 operations (63.35%)
- **Not Implemented**: 59 operations (36.65%)
- **Implemented**: 112 operations (69.57%)
- **Not Implemented**: 49 operations (30.43%)

### Legend

Expand Down Expand Up @@ -49,7 +49,7 @@ This document tracks the implementation status of all Postman API endpoints in t
---

<details>
<summary><strong>Collections Module (41/64 completed - 64.1%)</strong></summary>
<summary><strong>Collections Module (43/64 completed - 67.2%)</strong></summary>

### Core Collection Operations

Expand Down Expand Up @@ -130,8 +130,8 @@ This document tracks the implementation status of all Postman API endpoints in t

| Method | Endpoint | Description | Function | Implemented | Tests |
|--------|----------|-------------|----------|-------------|-------|
| GET | `/collections/{collectionId}/roles` | Get collection roles | - | | ❌ None |
| PATCH | `/collections/{collectionId}/roles` | Update collection roles | - | | ❌ None |
| GET | `/collections/{collectionId}/roles` | Get collection roles | `getCollectionRoles()` | | ✅ Passing |
| PATCH | `/collections/{collectionId}/roles` | Update collection roles | `modifyCollectionRoles()` | | ✅ Passing |
| GET | `/collections/{collectionUid}/tags` | Get collection tags | `getCollectionTags()` | ✅ | ✅ Passing |
| PUT | `/collections/{collectionUid}/tags` | Update collection tags | `updateCollectionTags()` | ✅ | ✅ Passing |

Expand Down Expand Up @@ -337,17 +337,17 @@ This document tracks the implementation status of all Postman API endpoints in t

---

<details>
<summary><strong>Monitors Module (0/6 completed - 0%)</strong></summary>
<details open>
<summary><strong>Monitors Module (6/6 completed - 100%) ✅</strong></summary>

| Method | Endpoint | Description | Function | Implemented | Tests |
|--------|----------|-------------|----------|-------------|-------|
| GET | `/monitors` | Get all monitors | - | | ❌ None |
| POST | `/monitors` | Create a monitor | - | | ❌ None |
| GET | `/monitors/{monitorId}` | Get a monitor | - | | ❌ None |
| PUT | `/monitors/{monitorId}` | Update a monitor | - | | ❌ None |
| DELETE | `/monitors/{monitorId}` | Delete a monitor | - | | ❌ None |
| POST | `/monitors/{monitorId}/run` | Run a monitor | - | | ❌ None |
| GET | `/monitors` | Get all monitors | `getMonitors()` | | ✅ Passing |
| POST | `/monitors` | Create a monitor | `createMonitor()` | | ✅ Passing |
| GET | `/monitors/{monitorId}` | Get a monitor | `getMonitor()` | | ✅ Passing |
| PUT | `/monitors/{monitorId}` | Update a monitor | `updateMonitor()` | | ✅ Passing |
| DELETE | `/monitors/{monitorId}` | Delete a monitor | `deleteMonitor()` | | ✅ Passing |
| POST | `/monitors/{monitorId}/run` | Run a monitor | `runMonitor()` | | ✅ Passing |

</details>

Expand Down Expand Up @@ -448,12 +448,12 @@ This document tracks the implementation status of all Postman API endpoints in t
---

<details>
<summary><strong>Groups Module (0/2 completed - 0%)</strong></summary>
<summary><strong>Groups Module (2/2 completed - 100%) ✅</strong></summary>

| Method | Endpoint | Description | Function | Implemented | Tests |
|--------|----------|-------------|----------|-------------|-------|
| GET | `/groups` | Get all groups | - | | ❌ None |
| GET | `/groups/{groupId}` | Get a group | - | | ❌ None |
| GET | `/groups` | Get all groups | `getGroups()` | | ✅ Passing |
| GET | `/groups/{groupId}` | Get a group | `getGroup()` | | ✅ Passing |

</details>

Expand Down
9 changes: 5 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ The documentation is organized by module:
5. **Specs** - Manage API specifications (OpenAPI, AsyncAPI) and generations
6. **Environments** - Manage environment variables and forks
7. **Mocks** - Manage mock servers, responses, and call logs
8. **Tags** - Query entities by tag
9. **Transformations** - Bi-directional sync between specs and collections
10. **Users** - Get authenticated user information
11. **Pull Requests** - Manage pull requests (get, update, review)
8. **Monitors** - Manage monitors and monitor executions
9. **Tags** - Query entities by tag
10. **Transformations** - Bi-directional sync between specs and collections
11. **Users** - Get authenticated user information
12. **Pull Requests** - Manage pull requests (get, update, review)

## Updating Documentation

Expand Down
Loading