NEW
Font size
WorksheetsParishkaar API Questions
Total questions: 20
Worksheet time: 20mins
What is the purpose of a REST API?
To provide a simple URL for web services
To support XML-based web service protocols
To allow for the use of HTTP requests to GET, PUT, POST and DELETE data
To only support mobile apps and websites
What is the main characteristic of a RESTful API?
Use of SOAP and WSDL
Use of a simple URL
Use of XML-based web service protocols
Use of only GET requests
Which HTTP request is used to retrieve data from a server in a REST API?
PUT
POST
DELETE
GET
Which HTTP request is used to submit data to the server for a new resource in a REST API?
GET
POST
PUT
DELETE
What architectural style and approach to communications is a RESTful API based on?
SOAP
WSDL
Representational State Transfer technology
XML
Which HTTP request is used to delete a resource in a REST API?
PUT
POST
DELETE
GET
What are query parameters in a REST API?
A way to add a new resource
A way to update an existing resource
Additional information included in the endpoint URL to narrow down or filter the result
A way to delete a resource
Which of the following is an example of a path parameter in a RESTful API endpoint?
?sort=ascending
/users/{id}
?query=searchterm
/users?id=5
What is the purpose of a body parameter in a RESTful API?
To specify the sort order of the response
To specify the resource being requested
To send additional data in the request body
To specify query parameters
Which of the following is the correct syntax for sending a body parameter in a RESTful API?
?param=value
/resource?body=data
/resource/param=value
{ "param": "value" }
What is the purpose of a header parameter in a RESTful API?
To specify the sort order of the response
To specify the resource being requested
To send additional data in the request body
To provide metadata for the request such as authentication information, or information about the body of the request.
Which of the following is a common use case for a header parameter in a RESTful API?
Setting the response format
Specifying the resource to be deleted
Including an API key for authentication
Indicating the type of data being sent in the request body
How is a header parameter typically included in a RESTful API request?
As a query parameter in the URL
As a key-value pair in the request body
As a key-value pair in the request header
As a path parameter in the endpoint URL
What is the standard format for a RESTful API response?
CSV
XML
JSON
HTML
What is the standard HTTP status code for a successful response in a RESTful API?
200
300
400
500
How should errors be handled in a RESTful API response?
Return a 200 status code with an error message in the response body
Return a 500 status code with an error message in the response body
Return a non-200 status code with an error message in the response body and include an error code in the header
Return a 200 status code with an error message in the header
What is the purpose of authentication in a RESTful API?
To identify the user making a request
To encrypt the data sent in the request
To ensure the integrity of the data sent in the request
To authorize the user to access certain resources
What is Postman?
A tool for creating and managing API documentation
A tool for creating and testing API requests and responses
A tool for monitoring and analyzing API performance
A tool for visualizing API data
What are some of the features of Postman?
The ability to create and save collections of API requests
The ability to generate code snippets for various programming languages
The ability to record and analyze API performance over time
All of the above
How can you use Postman to test an API?
By sending requests to the API and comparing the results to expected outcomes
By sending requests to the API and analyzing the response time
By sending requests to the API and visualizing the data returned
By sending requests to the API and generating code snippets
