0% found this document useful (0 votes)
2 views3 pages

API Interview Questions

The document provides an overview of APIs, including definitions, testing capabilities, content types, and status codes. It distinguishes between REST and SOAP web services, outlining their characteristics and differences. Additionally, it describes the structure of HTTP requests and responses, as well as the characteristics of JSON and XML.

Uploaded by

vaaghdevim
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

API Interview Questions

The document provides an overview of APIs, including definitions, testing capabilities, content types, and status codes. It distinguishes between REST and SOAP web services, outlining their characteristics and differences. Additionally, it describes the structure of HTTP requests and responses, as well as the characteristics of JSON and XML.

Uploaded by

vaaghdevim
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1. What is API ?

API stands for Application Programming Interface where acts as a bridge between Two
servers or the UI and the Server

2. Can we do testing without application UI?


Yes, we can do the testing with the help of API’s provided by the Application

3. Can we do Manual or Automation Testing without the application UI?


No, we can’t perform Manual or Automation Testing without the application UI.

4. How the Content-Type with in the API will look?


 application/json
 application/xml
 text/csv
 multipart/form-data
 application/octet-stream
 text/plain
 text/html
5. For which language Post Man generates Snippets ?
 Python
 Java
 Nodejs
 JS
 .net
 Php
6. What are the different Status Codes?
Status Code - Meaning
200 - Successful OK
201 - Content Created
204 - Deleted content Successfully
301 - Moved Permanently
307 - Temporary redirect
400 - Bad Request
401 - No permission to perform
403 - Forbidden - Bearer Token needed
404 - Context not found
405 - Method not allowed
409 - Conflict
413 - Pay load too large
415 - Unsupported media type
422 - Un processable Entity
500 - Internal Server Error
502 - Bad Gateway (URL Wrong)
7. What is REST API?
REST stands for Representational State Transfer where it is an architectural style.
These APIs follow specific designs
With the help of API’s Webservices can be exposed where these will be used to perform
testing.
8. HTTP Request and Response Structure?

HTTP Request
HTTP Method
URL
Cookies
Content Type

Raw Data

HTTP Response :

Status code
Response Time
Cookies
Content Type

Actual Data

9. Characteristics of JSON.
 JSON stands for Java Script Object Notation.
 Used to store and transfer the data between 2 different applications
 JSON is very light weight when compare to XML
 It has more datatypes and is an extension of Java Script.
 It is designed in the form of MAP Structure and it will be in terms of Key
(always enclosed in “ “) and Value (based on datatypes) Pairs.
 It is very easy to Parse (Convert).
 The filename extension of JSON is .json and the content type is
application/json.
 Key value pairs are separated by ‘,’ (coma).

10. Characteristics of XML :


 Stands for Extensible Markup Language.
 This is the extended version of the HTML.
 Used to Store and transport the data between 2 applications.
 It is a collection of customised or user defined tags.
 It is a very strictly typed language and also case sensitive.
 It is Platform and Technology independent.
 XML is an extension of HTML and Hence looks similar to HTML.
 In XML it has one root element (Open tag, value, close tag).
 In XML it has one root element which is the parent of all Child elements (Attribute -
written in name and value pair inside start tag as an element.)
 The child element can have sub- child element which follows Tree Structure.
 Filename extension is .xml and content type is application/xml
 Opening and Closing Tags should of same case type.
11. Difference between SOAP and REST Web service.

SOAP Web Service REST Web Service

Simple Object Access Protocol Representational State Transfer

It is a Protocol It is an Architectural Style

It supports XML It supports XML, HTML, JS, JSON, Text

It uses SOAP as a Protocol It uses HTTP as a Protocol

Its exposed via .wsdl files Its exposed via URI

SOAP Services are exposed as a REST Services are exposed as a get individual API’s for each
Package features

Its designed using too many It doesn’t define too many standards.
standards

It defines its own security It inherits security measures like Basic Auth / Bearer Token /
O Auth 1 / O Auth 2 etc…

SOAP is less preferred REST is most Preferred

Parser tools Used are JAX-B Parser Tools Used are Jackson and JSON Module
and Requestor

You might also like