Quiz 2

A visually appealing illustration depicting REST API concepts like endpoints, JSON data format, and HTTP methods, with a modern technology background.

REST API Knowledge Quiz

Test your understanding of REST APIs with this engaging quiz designed for developers and tech enthusiasts. Dive into questions about RESTful architecture, JSON format, HTTP methods, and more!

  • 10 challenging questions
  • Multiple-choice format
  • Instant feedback on your answers
10 Questions2 MinutesCreated by CodingGuru321
Which of the following best describes the purpose of using path variables in a REST API endpoint?
Filter results by specific parameters
To specify unique identifier for a resource
To specify HTTP method to be used
To specify desired format for response body
What is one difference between query parameters and path variables?
Path variables are part of path and always madatory. Query parameters are optional or mandatory.
Query parameters are always part of path and mandatory but Path variables can be optional or mandatory.
Path variables are part of path and mandatory. Query parameters are also mandatory.
Query parameters are part of path and always mandatory. Path variables are always mandatory.
The following is an example of how to use a specific endpoint of the API. Inspect the URL and identify the path variable. https://api.vdespa.com/profiles/jamie
Vdespa, profiles, jamie
Api, profiles, jamie
Profiles, jamie
Jamie
How can you represent an empty list in JSON?
{}
[]
All of above
None of above
The following is an example of how to use a specific endpoint of the API. Inspect the URL and identify the path variables. https://api.example.com/users/jamie/lists/6xlglibyla?fields=all
Jamie, 6xlglibyla
Jamie,6xlglibyla,fields
Users,lists,fields
Jamie,6xlglibyla,all
Jamie
Which of the following is a valid reason for using JSON for sending and retrieving data when using APIs?
JSON is a lightweight and humanly readable data format.
JSON is natively supported by all programming languages.
JSON allows for incompatible IT systems to exchange data.
All of above
None of above
Which of the following options represents valid JSON?
{'name': 'Jamie' 'email': 'jamie@example.com' }
{'name': 'Jamie' , 'email': 'jamie@example.com' }
{"name": "Jamie" , "email": "jamie@example.com" }
{ name= 'Jamie' , email= 'jamie@example.com' }
You create a new resource using the POST request of a REST API. Which status code would indicate that the resource has been successfully created?
200
201
Both 200 OK and 201 Created. Which code is returned depends on the API design.
None of the above
You want to set the property isMarried as a boolean in the following JSON: { "name": "Jamie", "isMarried": ___________ } Which of the following options is correct?
{ "name": "Jamie", "isMarried": true }
{ "name": "Jamie", "isMarried": "true"}
Both way
None
What are the differences between a GET request and a POST request in REST APIs?
GET are used to retrieve data while POST is used to create data.
GET can be used with both HTTP or HTTPS while POST can be used with only HTTPS.
POST do not support query params as it only sends data in the request body.
All of the above
{"name":"Quiz 2", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your understanding of REST APIs with this engaging quiz designed for developers and tech enthusiasts. Dive into questions about RESTful architecture, JSON format, HTTP methods, and more!10 challenging questionsMultiple-choice formatInstant feedback on your answers","img":"https:/images/course1.png"}
Powered by: Quiz Maker