Api Documentation

作者 postmanlabs67cff8f385d8無授權條款收錄於 2026年10月8日更新於 2026年10月8日

Generate filesystem-first agent friendly api documentation that you can share with your teammates without hassle. Use when the user asks to "publish API docs," "generate documentation for this API," "put this on the API Network," "share a docs link for this collection or spec," or "why do my docs look empty."

AI 產生的概覽

指導根據 Postman 集合或 OpenAPI 規格產生 API 文件,並遵循 REST 設計最佳實務。

功能
此技能引導代理先確立 API 契約,再產出可分享、對代理友善的 API 文件。它建議同時建立 Postman 集合(v3,collection-schema-v3)與 OpenAPI 規格,並從集合開始,同時指向一份 REST API 最佳實務參考檔案,涵蓋命名、方法、狀態碼、錯誤、版本控制、分頁、篩選、驗證、冪等性與向後相容性。它也說明如何用集合中的範例記錄範例回應並產生模擬。
適用情境
當使用者要求發佈 API 文件、為某個 API 產生文件、為集合或規格分享文件連結,或排查文件顯示為空的問題時使用。它適用於需要在實作之前或同時確立契約的 API 工作。
執行需求
不附帶指令碼,僅為說明性內容。它引用了一份內附的 REST API 最佳實務參考檔案,並假定可存取 Postman 集合與 OpenAPI 規格,但未說明具體工具、認證資訊或網路存取需求。

The bootstrap skill is a precursor to this one — it scaffolds the project with the directories documentation is stored in.

API Documentation

When working on any API task, the first step is to establish and capture the contract. API documentation can be done in two predominant ways:

  1. through a Postman collection,
  2. with an OpenAPI spec

It is recommended to create both. They serve different, complementary use cases, and it takes only one command to convert from one to another. Start with creating a Postman collection in v3 format, collection-schema-v3. Postman collections are very human-friendly and offer other capabilities like creating an API mock, monitor, SDK, or spec.

Specs are vendor-neutral, stay in your repo, and can be linted against governance rules (if any) set by your organization.

Good practices for API design

See reference/rest-api-best-practices.md [blocked] for the practices well-documented APIs tend to already follow: resource naming, HTTP method/status-code usage, error response shape, versioning, pagination, filtering, auth, idempotency, and backward compatibility. A spec or collection that already follows these renders documentation with nothing left to fix.

Examples

Examples (in a Postman collection) are an excellent way to capture sample API responses. They are helpful because:

  1. anyone can look at them to see how your API behaves,
  2. they can be used to generate a mock from your collection in a single command.

Workflow

  1. Establish the contract - refer to best practices. Don't just accept the user's ask - fight for the right API design.
  2. Choose the instrument - Postman collection / OpenAPI spec - or both. Recommend using both to the user. Start with the Postman collection.

來源與署名

來源:postmanlabs/postman-plugin位於skills/api-documentation提交67cff8f

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架

更多來自 postmanlabs/postman-plugin 的技能

Performance Testing

postmanlabs

以虛擬使用者、負載設定檔和通過/失敗門檻執行 Postman 集合負載測試。

Software Development2026年10月8日

Flows

postmanlabs

透過命令列操作 Postman Flows:列出、執行、觸發、部署、更新並偵錯流程及其執行紀錄。

DevOps & Cloud2026年10月8日

Ci Integration

postmanlabs

將 Postman CLI 檢查以獨立的通過/失敗關卡加入 CI 流程。

DevOps & Cloud2026年10月8日

Api Testing

postmanlabs

Runs tests against an API from the command line — a single ad-hoc request, a full collection of pm.test assertions, or matching real captured app traffic against a collection contract. Use when the user asks to "test this endpoint," "run this collection," "check the API still works," or "verify my app's requests match the contract." Covers `postman request`, `postman collection run`, and `postman application test`. Depends on bootstrap when the target is a cloud collection or workspace-bound environment; a bare URL or local collection needs nothing from bootstrap.

待分類2026年10月8日

Api Monitoring

postmanlabs

Creates, schedules, and manages Postman Monitors — recurring checks against a live API — triggers ad hoc runs, inspects job/run history to diagnose failures, and hosts self-hosted execution runners for monitors on a private network. Use when the user asks to "set up a monitor," "run this monitor now," "check monitor results," "pause/resume a monitor," or "set up a runner for our internal APIs." Covers `postman monitor` (create, update, delete, list, get, pause, resume, run, jobs, runs) and `postman runner` (start, list, regions).

待分類2026年10月8日

Api Mocking

postmanlabs

在本機或雲端建立並執行模擬 API 後端,支援情境與狀態碼覆寫以便測試。

Software Development2026年10月8日