API Testing Manual Interview Questions

Please find below mostly common API testing interview questions:

API Methods:

API Most Common Methods:

  • GET
  • POST
  • PUT
  • DELETE
  • PATCH

Others Methods:

  • HEAD
  • TRACE

Authentication used in API

  • Basic Authentication
  • API Key
  • Bearer Token
  • OAuth 2.0

HTTP Request:

  • Hyper Text Transfer Protocol
  • Components:
    • Request Method Type – Get, Post, etc.
    • Endpoint
    • Request Headers
    • Request Body – In case of Post, put, etc.

Status codes – All five classes

  • 100 – 199 series – Informational
  • 200 – 299 series – Success
  • 300 – 399 series – Redirection
  • 400 – 499 series – Client Side Error
  • 500 – 599 series – Server Side Error

Difference between POST and PUT API call

  • POST is used to create the data while PUT is used for data update
  • PUT call will create the data if data is not present

Headers in API

  • Content-Type
  • Keep-Alive
  • x-api-key

Common API Status codes:

Status CodesStatus Codes Meaning
200OK
201Created
204No Content
206Partial Content
400Bad Request
401Unauthorized
403Forbidden
404Not Found
500Internal Server Error
502Bad Gateway
503Service Unavailable
Read More Details on Status: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

CRUD Operation: Create Read Update Delete

Cookie:

HTTP and HTTPS requests port number:

  • HTTP – 80 Port
  • HTTPS – 443 Port

Testing Points in an API:

  • Status Code
  • Response Time
  • Authorization
  • Response

Tools that can be used to test API manually:

  • Postman
  • JMeter

Full Form of REST:

REpresentational State Transfer Application Programming Interface

Read this article on security aspect of API testing: https://labs.detectify.com/2021/08/10/how-to-hack-apis-in-2021/