API Testing Interview Questions

API Testing Interview Questions

🟢 Basic Level (1–20)

  1. What is API testing?
  2. What is an API?
  3. Difference between API and Web Service?
  4. What is REST API?
  5. What is SOAP API?
  6. Difference between REST and SOAP?
  7. What are HTTP methods?
  8. What is GET method used for?
  9. What is POST method used for?
  10. What is PUT vs PATCH?
  11. What is DELETE method?
  12. What is status code in API?
  13. What is 200 status code?
  14. What is 400 status code?
  15. What is 500 status code?
  16. What is JSON?
  17. What is XML?
  18. Difference between JSON and XML?
  19. What is endpoint in API?
  20. What is request and response?

⚙️ Core Concepts (21–40)

  1. What tools are used for API testing?
  2. What is Postman?
  3. What is Swagger?
  4. What is API automation testing?
  5. What is REST architecture?
  6. What is statelessness in REST?
  7. What is payload in API?
  8. What are headers in API?
  9. What is authentication in API?
  10. What is authorization?
  11. What is Basic Auth?
  12. What is Bearer token?
  13. What is JWT?
  14. What is OAuth?
  15. What is API key?
  16. What is response time?
  17. What is latency?
  18. What is caching in API?
  19. What is throttling?
  20. What is rate limiting?

🧪 Testing Concepts (41–60)

  1. What is functional API testing?
  2. What is load testing in API?
  3. What is performance testing?
  4. What is negative testing?
  5. What is positive testing?
  6. What is boundary testing?
  7. How do you validate API response?
  8. What is schema validation?
  9. What is JSON validation?
  10. What is error handling in API testing?
  11. What is test case design for API?
  12. What is regression testing?
  13. What is smoke testing?
  14. What is sanity testing?
  15. What is mock API?
  16. What is API mocking tool?
  17. What is contract testing?
  18. What is integration testing?
  19. What is end-to-end testing?
  20. What is test automation framework?

⚡ Advanced Level (61–80)

  1. How does API authentication work?
  2. How do you handle dynamic tokens?
  3. What is environment in API testing?
  4. What is staging vs production API?
  5. How do you test API security?
  6. What is SQL injection testing in API?
  7. What is API versioning?
  8. What is backward compatibility?
  9. What is idempotent API?
  10. Which methods are idempotent?
  11. What is async API?
  12. What is webhook?
  13. What is polling in API?
  14. What is GraphQL?
  15. GraphQL vs REST?
  16. What is API gateway?
  17. What is microservices API?
  18. What is service virtualization?
  19. What is API documentation?
  20. What is OpenAPI specification?

🚀 Scenario-Based (81–100)

  1. How do you test a login API?
  2. How do you test a payment API?
  3. How do you validate response data?
  4. How do you handle authentication failures?
  5. How do you test file upload API?
  6. How do you test pagination API?
  7. How do you test sorting and filtering APIs?
  8. How do you test error messages?
  9. How do you automate API testing?
  10. How do you debug API failures?
  11. How do you test third-party APIs?
  12. How do you test API performance?
  13. How do you test data consistency?
  14. How do you test rate limiting?
  15. How do you handle flaky APIs?
  16. How do you validate response schema?
  17. How do you design API test cases?
  18. How do you test microservices APIs?
  19. How do you integrate API tests in CI/CD?
  20. Why is API testing important?

API Testing Answers (1–100)

🟢 Basic (1–20)

  1. Testing APIs for functionality, reliability, and performance
  2. Application Programming Interface
  3. API = interface, Web Service = network-based API
  4. REST is lightweight web API architecture
  5. SOAP is XML-based protocol
  6. REST = simple, SOAP = strict and heavy
  7. GET, POST, PUT, PATCH, DELETE
  8. Retrieve data
  9. Send data to server
  10. PUT replaces full resource, PATCH updates part
  11. Delete resource
  12. Response code from server
  13. OK success response
  14. Client error
  15. Server error
  16. Lightweight data format
  17. Markup data format
  18. JSON is lightweight, XML is verbose
  19. API URL where request is sent
  20. Request = sent data, Response = received data

⚙️ Core (21–40)

  1. Postman, SoapUI, RestAssured
  2. Tool for API testing
  3. API design tool
  4. Automated validation of APIs
  5. REST = Representational State Transfer
  6. No stored session between requests
  7. Data sent in request body
  8. Metadata sent with request
  9. Verifies identity
  10. Defines permissions
  11. Username-password authentication
  12. Token-based authentication
  13. Secure token standard
  14. Authorization framework
  15. API access key
  16. Time taken for response
  17. Delay in request response
  18. Stores frequent responses
  19. Limits number of requests
  20. Controls request rate

🧪 Testing (41–60)

  1. Testing API functions
  2. Testing system under load
  3. Testing speed and stability
  4. Testing invalid inputs
  5. Testing valid inputs
  6. Testing boundary values
  7. Compare expected vs actual response
  8. Validate structure of response
  9. Validate JSON format
  10. Handling API errors properly
  11. Designing API test scenarios
  12. Retesting after changes
  13. Basic verification testing
  14. Detailed verification testing
  15. Simulated API
  16. Tool to simulate APIs
  17. Testing service contracts
  18. Testing combined modules
  19. Full system testing
  20. Framework to automate API tests

⚡ Advanced (61–80)

  1. Token/session verification
  2. Store and reuse tokens
  3. Testing environment setup
  4. Testing vs live environment
  5. Checking API vulnerabilities
  6. Testing malicious SQL input
  7. Different API versions
  8. Old version support
  9. Same result for repeated calls
  10. GET, PUT, DELETE
  11. Async = non-blocking API
  12. Event-based notification
  13. Repeated API calling
  14. Query-based API language
  15. GraphQL = flexible data fetch
  16. API traffic manager
  17. Multiple small services
  18. Simulated service
  19. API usage documentation
  20. API design specification

🚀 Scenario (81–100)

  1. Send login request + validate token
  2. Validate transaction flow + response
  3. Compare response with expected output
  4. Check error code and message
  5. Upload file + verify storage
  6. Check page number response
  7. Validate sorting parameters
  8. Check error message correctness
  9. Use Postman/RestAssured automation
  10. Check logs + response codes
  11. Mock third-party responses
  12. Load testing tools (JMeter, etc.)
  13. Compare DB vs API data
  14. Check request limit behavior
  15. Retry + logging analysis
  16. Schema validation tools
  17. Positive + negative test cases
  18. Microservice integration testing
  19. CI/CD pipeline integration
  20. Ensures system reliability and correctness