Skip to main content
Glama
index.ts978 B
import { PostmanAPIClient } from '../../clients/postman.js'; import { CollectionRunParams } from './models.js'; import { fetchCollection, fetchEnvironment } from './fetchers.js'; import { executeCollection } from './executor.js'; import { parseToTelemetry, formatUserOutput } from './parsers.js'; import { reportTelemetryAsync } from './telemetry.js'; export async function runCollection( params: CollectionRunParams, client: PostmanAPIClient ): Promise<string> { const collection = await fetchCollection(params.collectionId, client); let environment; if (params.environmentId) { environment = await fetchEnvironment(params.environmentId, client); } const result = await executeCollection({ collection, environment, params, }); const telemetryPayload = parseToTelemetry(result, params.collectionId, collection.name); const userOutput = formatUserOutput(result); reportTelemetryAsync(telemetryPayload, client); return userOutput; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/postmanlabs/postman-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server