API Interview Questions LMS 15 Flashcards

1
Q

What is an API?
(Application Programming Interface)

A

API acts as an interface between two software applications and allows the two software applications to communicate with each other.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the API acronym stand for?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is API Testing?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the main focus of API testing?

A

The business logic layer of the software architecture.

API testing can be performed on any software system which contains multiple APIs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does REST in REST API stand for?

A

Representational State Transfer

It is a set of functions helping developers in performing requests and receiving responses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How is interaction made through in REST API?

A

Made through the HTTP Protocol

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the common tests that are performed on APIs?

A
  1. Verify whether the return value is based on the input condition.
    The response of the APIs should be verified based on the request.
  2. Verify whether the system is authenticating the outcome. (when the API is updating any data structure.)
  3. Verify whether the API triggers another event or request from some other API.
  4. Verify the behavior of the API
    (when there is no return value.)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What exactly needs to be verified in API Testing?

(HINT* There are 6 needs)

A
  1. Data accuracy;
  2. HTTP status codes;
  3. Response time;
  4. Error codes in case API returns any errors;
  5. Authorization checks;
  6. Non-functional testing such as performance testing and security testing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Name some tools used for API Testing?

A

Postman, Katalon

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Name some of the API examples which are quite popular.

A
  • Google Maps API
  • YouTube
  • Twitter
  • Amazon Advertising API
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Name some of the most commonly used HTTP methods?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the API test environment?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is an API collection?

A

The definition of Collections is confined to a grouping of requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the Environment in Postman?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a Token?

A

Key created upon login which authorizes your information.

or

Login Key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly