Mujeres Testing Latam
Back to Knowledge
APISeptember 2025·Mujeres Testing Latam

API Testing

Quick REST API guide: what an API is, types (REST, SOAP, GraphQL, gRPC), relevant tests, HTTP codes, methods, endpoints and metadata.

An API (Application Programming Interface) is a set of rules and protocols that lets two different applications communicate. It is like a bridge connecting systems to exchange information or trigger actions.

  • Connect systems.
  • Ease integration between applications, services or devices.
  • Reuse functionality without reprogramming it from scratch.
  • Standardize communication between software.

API types

FeatureRESTSOAPGraphQLgRPC
ModelResources and HTTP methodsXML messages with rigid contracts (WSDL)Client-defined queries and mutationsRemote procedure calls (RPC)
FormatUsually JSONXML onlyJSONProtocol Buffers (binary)
FlexibilityMedium: returns the full resourceLow: fixed, strict structureVery high: client asks only for what it needsMedium: contracts in .proto files
Ease of testingHigh: Postman, Playwright, curlMedium: validate XML and WSDLMedium-high: build queriesMedium-low: needs special tooling

Most relevant tests

  • Validate HTTP status codes.
  • Check the response body: data types, consistent structure, required fields.
  • Confirm input validation with invalid, incomplete or overly long data.
  • Test security: authenticated endpoints, expired or invalid tokens.
  • Evaluate error message consistency: clear and without exposing sensitive information.
  • Check headers and metadata: Authorization, Content-Type, Cache-Control.
  • Test performance and limits under many requests.
  • Validate compatibility and versioning: changes should not break old clients.

HTTP status codes

CodeMeaningDescription
200OKSuccessful request.
201CreatedResource created successfully.
400Bad RequestMalformed request or invalid data.
401UnauthorizedMissing authentication (invalid token/API key).
403ForbiddenAuthenticated, but without permission.
404Not FoundThe resource does not exist.
500Internal Server ErrorGeneric server error.
503Service UnavailableService unavailable (maintenance or overload).

Base URL and endpoints

The base URL is the API’s entry point; endpoints are built from it by adding resource-specific paths. Defining it once provides consistency, eases configuration (Postman, Playwright) and enables versioning without breaking compatibility.

https://api.example.com/v1            ← base URL (protocol + domain + version)
https://api.example.com/v1/users      ← endpoint: list of users
https://api.example.com/v1/users/123  ← endpoint: user 123

HTTP methods

GET — Retrieve data

Retrieves information without modifying it. Idempotent, safe and bodyless.

POST — Create resources

Creates new resources or processes data. Not idempotent, not safe, with a body.

PUT — Full update

Completely replaces an existing resource. Idempotent; may create if it does not exist.

PATCH — Partial update

Modifies only the sent fields. More efficient for minor changes.

DELETE — Delete

Removes a resource from the server. Idempotent, bodyless and destructive.

Metadata (headers)

HeaderFunction
AuthorizationSends credentials for authentication (token, Basic Auth).
Cache-ControlIndicates how to handle the cache.
Content-Type / AcceptDefine the content type sent and accepted (e.g. application/json).
HostSpecifies the server domain the request targets.
User-AgentIdentifies the client making the request.

Testing tools

Manual and automated: Postman (with JavaScript) and Playwright (with TypeScript). Tip: define the base URL in one place (variable {{URL}} or playwright.config.ts) and reuse it in every endpoint.

Save or share this content

Download it as PDF or Markdown to save or share it.