api-testing-rest

A guide to testing REST APIs, which are web services that communicate through standard HTTP requests and responses. It covers request methods, response codes, data formats, authentication, errors, and contract checks.

In plain words
What is it for?
It helps write or review tests for creating, reading, updating, and deleting data; checking status codes and JSON responses; testing authentication and errors; and verifying API contracts.
Why use it?
It provides a consistent way to check both successful requests and invalid or unusual ones, including whether responses follow the agreed API format.

Skill for Claude CodeCodex

Part of the qa-essentials plugin — 10 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pramoddutta/qaskills/api-testing-rest
Any agent
npx skills add PramodDutta/qaskills --skill api-testing-rest
Clone the repo
git clone --depth 1 https://github.com/PramodDutta/qaskills

Made for: Claude Code, Codex.

Or install qa-essentials, the plugin that ships this one along with the rest of its 10 skills.

Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,538 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.04538
Opus 5 $0.00016 $0.02269
Sonnet 5 $0.00006 $0.00908
Haiku 4.5 $0.00003 $0.00454

Measured 3d ago against content hash 302a291d8302, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-testing-rest scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const response = await axios.get(`${this.baseURL}${endpoint}`, {
packs/qa-essentials/skills/api-testing-rest/SKILL.md · 645 lines

How it starts

The opening of the file, as written. The whole thing — 645 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API Testing REST Skill

You are an expert QA engineer specializing in REST API testing. When the user asks you to write, review, or design API tests, follow these detailed instructions.

Core Principles

  1. Test the contract, not the implementation -- Focus on request/response format, not server internals.
  2. Cover all HTTP methods -- GET, POST, PUT, PATCH, DELETE each have different semantics.
  3. Validate status codes -- Correct status codes are part of the API contract.
  4. Test error paths -- Bad requests and edge cases are as important as happy paths.
  5. Assert on response structure -- JSON schema validation ensures consistency.

REST API Fundamentals

HTTP Methods and Their Semantics

GET     - Retrieve resource(s), safe and idempotent
POST    - Create new resource, not idempotent
PUT     - Replace entire resource, idempotent
PATCH   - Partial update, idempotent
DELETE  - Remove resource, idempotent
HEAD    - Same as GET but no response body
OPTIONS - Get supported methods for resource

HTTP Status Codes

Success (2xx):
  200 OK              - Successful GET, PUT, PATCH, DELETE
  201 Created         - Successful POST, resource created
  204 No Content      - Successful DELETE (no body returned)

Client Error (4xx):
  400 Bad Request     - Invalid request body or parameters
  401 Unauthorized    - Missing or invalid authentication
  403 Forbidden       - Authenticated but not authorized
  404 Not Found       - Resource doesn't exist
  409 Conflict        - Resource conflict (duplicate email)
  422 Unprocessable   - Validation error

Server Error (5xx):
  500 Internal Error  - Server error
  503 Service Unavailable - Service down or overloaded

Testing Patterns with Different Tools

1. JavaScript/TypeScript with Axios/Fetch

// api-client.ts
import axios from 'axios';

export class ApiClient {
  private baseURL = 'https://api.example.com';
  private authToken: string | null = null;

  setAuthToken(token: string) {
    this.authToken = token;
  }

  private getHeaders() {
    return {
      'Content-Type': 'application/json',
      ...(this.authToken && { Authorization: `Bearer ${this.authToken}` }),
    };
  }

  async get(endpoint: string, params = {}) {
    const response = await axios.get(`${this.baseURL}${endpoint}`, {
      headers: this.getHeaders(),
      params,
    });
    return response;
  }

  async post(endpoint: string, data: any) {
    const response = await axios.post(`${this.baseURL}${endpoint}`, data, {
      headers: this.getHeaders(),
    });
    return response;
  }

  async put(endpoint: string, data: any) {
    const response = await axios.put(`${this.baseURL}${endpoint}`, data, {
      headers: this.getHeaders(),
    });
    return response;
  }

  async delete(endpoint: string) {
    const response = await axios.delete(`${this.baseURL}${endpoint}`, {
      headers: this.getHeaders(),
    });
    return response;
  }
}

Read the full file on GitHub · 645 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 645 lines · 32 tokens per session scan A 302a291d8302

Subscribe to this mod's changes

api-testing-rest is a skill published in the GitHub repository PramodDutta/qaskills (214 stars, last pushed 3d ago), licensed MIT. It adds 32 tokens to every session and 4,538 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

aginxbrowser

Browser engine for AI agents: fetch JS-rendered and Cloudflare-protected pages as clean markdown, run 5-engine aggregated web search (Baidu, Bing, Sogou, WeChat, Google), take screenshots as visual input, extract structured data from SPAs, and drive multi-step interactions (click, type, fill forms, login, paginate)…

yinnho/aginxbrowser · 297 tokens

test-case-to-katalon-studio

Convert Katalon True Platform/TestOps manual test cases into Katalon Studio automation inside a local Studio Test Project checkout. Use when you need to author or extend a .tc test case file and its paired Groovy script under Scripts/, keep test case variable GUIDs consistent with the .ts test suite bindings that read…

katalon-labs/true-skills · 204 tokens

exploratory-charter

Write, run, and debrief exploratory testing charters against Katalon True Platform/TestOps when there is no script to follow. Use when you need to turn a vague area into a charter (mission, areas, oracles, timebox), run a timeboxed unscripted session, log what you find as session notes, judge which findings are real…

katalon-labs/true-skills · 156 tokens

test-data

Design, source, seed, and tear down the test data a Katalon True Platform test case or an automated suite runs on. Use when the steps are already settled and the blocker is the values, for example which data classes a case needs, which records must exist before a run, how to keep literals out of the step text and into…

katalon-labs/true-skills · 182 tokens

test-estimation

Estimate testing effort, duration, and resourcing for a Katalon True Platform/TestOps cycle. Use when the question is how long testing will take, how many testers it needs, whether the scope fits the sprint window, or what a scope change costs in person-hours. Sizes design, manual execution, automated execution and…

katalon-labs/true-skills · 198 tokens

test-reporting

Report Katalon True Platform/TestOps quality metrics to people outside QA. Use when you need to answer a stakeholder question with testing data, choose the few metrics that actually answer it, trend coverage, execution health, defect risk and stability across several releases, sprints, or iterations rather than inside…

katalon-labs/true-skills · 181 tokens