_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

API debugging: kompletní toolkit

26. 12. 2022 1 min read intermediate

API nefunguje? Tady je kompletní sada nástrojů pro debugging REST API.

1. curl

curl -v https://api.example.com/users
curl -X POST -H “Content-Type: application/json” -d ‘{“name”:”John”}’ api.example.com/users
curl -o /dev/null -s -w “TTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n” URL

2. HTTPie

http GET api.example.com/users
http POST api.example.com/users name=John

3. Postman / Insomnia

GUI pro komplexní testování. Collections, environments, pre-request scripts.

4. mitmproxy

mitmproxy # interaktivní proxy na :8080

5. ngrok

ngrok http 3000

6. jq pro responses

curl -s api.example.com/users | jq ‘.[] | {id, name}’

7. Watch

watch -n 5 “curl -s api.example.com/health | jq .”

8. Load testing

hey -n 1000 -c 50 https://api.example.com/users

HTTP status codes

  • 200 OK
  • 201 Created
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 429 Rate Limit
  • 500 Server Error
  • 502 Bad Gateway
  • 503 Unavailable

Workflow

curl -v → zkontrolujte status code → jq pro response → mitmproxy pro hlubší analýzu.

apidebugginghttp
Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.