wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Parishkaar API Questions

Total questions: 20

Worksheet time: 20mins

Name
Class
Date
1.

What is the purpose of a REST API?

a)

To provide a simple URL for web services

b)

To support XML-based web service protocols

c)

To allow for the use of HTTP requests to GET, PUT, POST and DELETE data

d)

To only support mobile apps and websites

2.

What is the main characteristic of a RESTful API?

a)

Use of SOAP and WSDL

b)

Use of a simple URL

c)

Use of XML-based web service protocols

d)

Use of only GET requests

3.

Which HTTP request is used to retrieve data from a server in a REST API?

a)

PUT

b)

POST

c)

DELETE

d)

GET

4.

Which HTTP request is used to submit data to the server for a new resource in a REST API?

a)

GET

b)

POST

c)

PUT

d)

DELETE

5.

What architectural style and approach to communications is a RESTful API based on?

a)

SOAP

b)

WSDL

c)

Representational State Transfer technology

d)

XML

6.

Which HTTP request is used to delete a resource in a REST API?

a)

PUT

b)

POST

c)

DELETE

d)

GET

7.

What are query parameters in a REST API?

a)

A way to add a new resource

b)

A way to update an existing resource

c)

Additional information included in the endpoint URL to narrow down or filter the result

d)

A way to delete a resource

8.

Which of the following is an example of a path parameter in a RESTful API endpoint?

a)

?sort=ascending

b)

/users/{id}

c)

?query=searchterm

d)

/users?id=5

9.

What is the purpose of a body parameter in a RESTful API?

a)

To specify the sort order of the response

b)

To specify the resource being requested

c)

To send additional data in the request body

d)

To specify query parameters

10.

Which of the following is the correct syntax for sending a body parameter in a RESTful API?

a)

?param=value

b)

/resource?body=data

c)

/resource/param=value

d)

{ "param": "value" }

11.

What is the purpose of a header parameter in a RESTful API?

a)

To specify the sort order of the response

b)

To specify the resource being requested

c)

To send additional data in the request body

d)

To provide metadata for the request such as authentication information, or information about the body of the request.

12.

Which of the following is a common use case for a header parameter in a RESTful API?

a)

Setting the response format

b)

Specifying the resource to be deleted

c)

Including an API key for authentication

d)

Indicating the type of data being sent in the request body

13.

How is a header parameter typically included in a RESTful API request?

a)

As a query parameter in the URL

b)

As a key-value pair in the request body

c)

As a key-value pair in the request header

d)

As a path parameter in the endpoint URL

14.

What is the standard format for a RESTful API response?

a)

CSV

b)

XML

c)

JSON

d)

HTML

15.

What is the standard HTTP status code for a successful response in a RESTful API?

a)

200

b)

300

c)

400

d)

500

16.

How should errors be handled in a RESTful API response?

a)

Return a 200 status code with an error message in the response body

b)

Return a 500 status code with an error message in the response body

c)

Return a non-200 status code with an error message in the response body and include an error code in the header

d)

Return a 200 status code with an error message in the header

17.

What is the purpose of authentication in a RESTful API?

a)

To identify the user making a request

b)

To encrypt the data sent in the request

c)

To ensure the integrity of the data sent in the request

d)

To authorize the user to access certain resources

18.

What is Postman?

a)

A tool for creating and managing API documentation

b)

A tool for creating and testing API requests and responses

c)

A tool for monitoring and analyzing API performance

d)

A tool for visualizing API data

19.

What are some of the features of Postman?

a)

The ability to create and save collections of API requests

b)

The ability to generate code snippets for various programming languages

c)

The ability to record and analyze API performance over time

d)

All of the above

20.

How can you use Postman to test an API?

a)

By sending requests to the API and comparing the results to expected outcomes

b)

By sending requests to the API and analyzing the response time

c)

By sending requests to the API and visualizing the data returned

d)

By sending requests to the API and generating code snippets