Sobes.tech
Middle+

When testing an API without documentation, how to understand if the request result is correct or not?

sobes.tech AI

Answer from AI

If the API lacks documentation to understand the correctness of the request result, the following approaches can be used:

  • Analyze the structure and data types in the response — check if the format matches the expected (e.g., JSON with the required fields).
  • Compare with similar requests — if there are similar endpoints or previous API versions, compare the results.
  • Check HTTP status codes — successful responses usually have 2xx, errors have 4xx or 5xx.
  • Use logs and traces — if server logs are accessible, verify what happened during the request.
  • Consult developers or colleagues — clarify the expected behavior.
  • Conduct testing with different input data — to identify patterns in responses.

For example, if a request returns a list of users, check that each element contains fields like id, name, email, and that the data looks realistic. If the response is empty or contains an error, it may indicate a problem.

Thus, without documentation, it is important to use an empirical approach, analyze data, and interact with the team to verify results.

When testing an API without documentation, how to… - sobes.tech