← 返回
未分类 中文

API Tester

API testing and monitoring skill. Test REST and GraphQL APIs, validate responses, and monitor uptime.
API测试与监控技能。测试REST和GraphQL API,验证响应,监控运行时间。
jpengcheng523-netizen jpengcheng523-netizen 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 374
下载
💾 1
安装
1
版本
#latest

概述

API Tester

Test and monitor REST and GraphQL APIs with validation.

When to Use

  • User wants to test an API endpoint
  • Validate API responses
  • Monitor API uptime
  • Run API test suites

Features

  • REST APIs: GET, POST, PUT, DELETE, PATCH
  • GraphQL: Queries and mutations
  • Validation: JSON Schema, assertions
  • Monitoring: Uptime checks, alerts

Usage

Test REST endpoint

python3 scripts/api_test.py \
  --method GET \
  --url "https://api.example.com/users" \
  --expect-status 200

POST with body

python3 scripts/api_test.py \
  --method POST \
  --url "https://api.example.com/users" \
  --header "Content-Type: application/json" \
  --body '{"name": "Alice"}' \
  --expect-status 201

Validate response

python3 scripts/api_test.py \
  --method GET \
  --url "https://api.example.com/users/1" \
  --validate '{
    "type": "object",
    "required": ["id", "name"],
    "properties": {
      "id": {"type": "integer"},
      "name": {"type": "string"}
    }
  }'

Test GraphQL

python3 scripts/api_test.py \
  --graphql \
  --url "https://api.example.com/graphql" \
  --query '{ users { id name } }'

Run test suite

python3 scripts/api_test.py \
  --suite ./tests/api_tests.yaml

Monitor uptime

python3 scripts/api_test.py \
  --monitor \
  --url "https://api.example.com/health" \
  --interval 60

Output

{
  "success": true,
  "status_code": 200,
  "response_time_ms": 145,
  "response": {"id": 1, "name": "Alice"},
  "validation_passed": true
}

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-03 08:40 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 677 📥 326,620
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 195 📥 67,521
ai-agent

Self-Improving Agent (Proactive Self-Reflection)

jpengcheng523-netizen
自我反思、自我批评、自主学习与自组织记忆。智能体能评估自身工作、发现错误并实现永久性改进。
★ 0 📥 1,084