Postman Client
@theholocron/postman-client is a typed wrapper around the Postman API for managing collections, environments, workspaces, and API specs.
Installation
Section titled “Installation”pnpm add @theholocron/postman-clientimport { createPostmanClient } from "@theholocron/postman-client";
const client = createPostmanClient({ token: process.env.POSTMAN_API_KEY });
const workspaces = await client.workspaces.list();const collections = await client.collections.list({ workspaceId: "ws-123" });await client.import.openapi({ workspaceId: "ws-123", spec: myOpenApiSpec });Namespaces
Section titled “Namespaces”| Namespace | Covers |
|---|---|
collections |
Collections |
environments |
Environments |
import |
Importing an OpenAPI definition |
me |
The authenticated user |
specs |
API specs and their files |
workspaces |
Workspaces |
The full API reference is generated from the package’s TSDoc comments.