Skip to content

Monitoring glossary

What is API testing?

API testing sends requests to your API and checks the responses: status, body, headers and timing. It is faster and more stable than testing through a UI.

3 min read11 sectionsUpdated

On this page

Key points

  • Assert on content, not only status codes.
  • Contract tests catch breaking changes between services.
  • Load tests find limits before traffic does.
  • The same checks become monitoring when run on a schedule in production.

Types of API tests

TypeChecksWhen
FunctionalCorrect responses for valid and invalid inputEvery change
ContractProvider still matches what consumers expectEvery change to provider or consumer
IntegrationCalls across real services and databasesBefore deploy
Load / performanceLatency and errors under trafficBefore launches, periodically
SecurityAuth, input validation, rate limitsRegularly and before releases
Monitoring (synthetic)Key endpoints work in productionContinuously

What to assert

plaintext
POST /api/orders          body {"sku":"TEST-1","qty":1}
expect status             = 201
expect header             content-type contains application/json
expect json $.id          exists
expect json $.total       > 0
expect time               < 800 ms

Multi-step flows

Real use is a sequence: sign in, capture a token, create something, read it back, delete it. Chaining requests and passing values between steps tests the flow, not just single endpoints. Clean up test data at the end.

In VitalRix

Multi-step API monitors chain calls in order, each with its own assertions, and pass values (such as tokens or ids) to the next step; they support multi-region confirmation. See API monitoring and GraphQL API monitoring.

Contract testing in brief

In consumer-driven contract testing, each consumer records the requests it makes and the responses it relies on. The provider's build then verifies it still satisfies every consumer's contract. It catches breaking changes, such as a renamed field, before deploy, without running every service together.

API testing in production vs before release

KindWhenWhat it checks
Unit and contract testsBefore mergeEach endpoint returns the agreed schema and status codes
Integration testsIn CI against real dependenciesEndpoints work together with the database and queues
Load testsBefore launches and big changesLatency and errors under expected peak traffic
Synthetic API checksContinuously in productionThe live API answers correctly from several regions
Multi-step API checksContinuously in productionA real flow: log in, create, read back, delete

What a good production API check asserts

yaml
# a multi-step check: values from one step are reused in the next
- name: create order
  request: POST https://api.example.com/v1/orders
  body: { "sku": "test-sku", "quantity": 1 }
  expect:
    status: 201
    response_time_ms: { lt: 800 }
    json: { "$.status": "pending" }
  save: { orderId: "$.id" }
- name: read it back
  request: GET https://api.example.com/v1/orders/{{orderId}}
  expect:
    status: 200
    json: { "$.id": "{{orderId}}" }
AssertionWhy
Status codeA 200 with an error body is still an error, so check both
Response timeSlow is the first sign of a coming outage
Body fieldsCatches empty results and wrong data
HeadersContent type, caching and security headers drift over time

Frequently asked questions

Postman or code for API tests?

Both work. Postman collections are quick to share; tests in code live with the service and run in CI easily.

How is API testing different from API monitoring?

Testing usually runs before deploy against test environments; monitoring runs the same kind of checks continuously against production.

  • What is synthetic monitoring?: Synthetic monitoring explained: scheduled, scripted checks that test your site, APIs and jobs before users do. Types, assertions, a checkout example, pitfalls.
  • Best synthetic monitoring tools: Choose a synthetic monitoring tool in 2026: API and browser checks, scripting, locations, private networks and CI use, with well-known options compared.
  • A Checkly alternative: VitalRix vs Checkly: VitalRix vs Checkly: synthetic API and browser checks compared, monitoring as code versus in-app setup, plus APM, real-user data and on-call.
  • VitalRix and Opsgenie: Connect VitalRix to Opsgenie with the Alert API: create alerts from uptime, APM and SLO rules, acknowledge and close them on recovery, in the US or EU region.
  • VitalRix and PagerDuty: Connect VitalRix to PagerDuty with Events API v2: trigger incidents from uptime, APM and SLO alerts and resolve them on recovery.
  • VitalRix and Google Cloud Monitoring: Pull Google Cloud Monitoring time series for Cloud Run, Compute Engine, Cloud SQL and more into VitalRix with a Monitoring Viewer service account.

Watch your own site and services with VitalRix

Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.