API Interview Questions LMS 15 Flashcards
What is an API?
(Application Programming Interface)
API acts as an interface between two software applications and allows the two software applications to communicate with each other.
What does the API acronym stand for?
Application Programming Interface. An API is a set of routines, protocols, and tools for building Software Applications.
APIs specify how one software program should interact with another software program.
What is API Testing?
Testing that involves testing APIs directly.
Is part of integration testing, to check whether the API meets expectations in terms of functionality, reliability, performance and security of an application.
What is the main focus of API testing?
The business logic layer of the software architecture.
API testing can be performed on any software system which contains multiple APIs.
What does REST in REST API stand for?
Representational State Transfer
It is a set of functions helping developers in performing requests and receiving responses.
How is interaction made through in REST API?
Made through the HTTP Protocol
What are the common tests that are performed on APIs?
- Verify whether the return value is based on the input condition.
The response of the APIs should be verified based on the request. - Verify whether the system is authenticating the outcome. (when the API is updating any data structure.)
- Verify whether the API triggers another event or request from some other API.
- Verify the behavior of the API
(when there is no return value.)
What exactly needs to be verified in API Testing?
(HINT* There are 6 needs)
- Data accuracy;
- HTTP status codes;
- Response time;
- Error codes in case API returns any errors;
- Authorization checks;
- Non-functional testing such as performance testing and security testing.
Name some tools used for API Testing?
Postman, Katalon
Name some of the API examples which are quite popular.
- Google Maps API
- YouTube
- Amazon Advertising API
Name some of the most commonly used HTTP methods?
GET: It enables you to retrieve data from a server
POST: It enables you to add data to an existing file or resource in a server
PUT: It lets you replace an existing file or resource in a server
DELETE: It lets you delete data from a server
PATCH: It is used to apply partial modifications to a resource
What is the API test environment?
Setting up an API test environment is a complex method where the configuration of the server and database is done as per the requirements of the software application. Graphical User Interface (GUI) is not available in this form of testing.
After installation, the API is verified for its proper functioning. In this process, the initial environment that invokes API is being set up with a defined set of parameters so that test results can be examined.
What is an API collection?
The definition of Collections is confined to a grouping of requests.
What is the Environment in Postman?
An environment in Postman is a set of key-value pairs.
we can change the value of the key value pairs and the changes are reflected in our requests.
This environment helps us to differentiate between the requests when we create an environment inside Postman.
The environment just provides boundaries to variables.
What is a Token?
Key created upon login which authorizes your information.
or
Login Key