REST API Quiz - Multiple Choice Questions

This post contains a few useful REST API multiple-choice questions (quiz) to self-test your knowledge of REST API development.

The answers to each question have been given at end of this post.

Q1. What does the Acronym REST Stand for?

  1. Representational State Transform
  2. Representational State Transfer
  3. Represent State Transform
  4. Represent State Transfer

Q2. What is the protocol used in REST?

  1. FTP
  2. HTTP
  3. JMX
  4. SOAP

Q3. What is the HTTP Status Code Related to Page Not Found?

  1. 402
  2. 404
  3. 403
  4. 401

Q4. What is the HTTP Code Related to Internal Server Error?

  1. 500
  2. 501
  3. 504
  4. 502

Q5. What is the HTTP Code 200 Indicate?

  1. Error
  2. Completed
  3. Success
  4. Warning

Q6. Which HTTP method do we use to make an HTTP request to create a new resource?

  1. POST
  2. PUT
  3. GET
  4. CREATE

Q7. Which HTTP method do we use to make an HTTP request to update an existing resource?

  1. POST
  2. PUT
  3. UPDATE
  4. DELETE

Q8. Choose the correct URI format to get a sub-resource by resource id and sub-resource id

  1. /{resource}/{resource-id}/{sub-resource}/{sub-resource-id}
  2. /{resource}/{sub-resource}/{sub-resource-id}
  3. {sub-resource}/{sub-resource-id}/{resource}/{resource-id}
  4. /{resource}/{resource-id}/{sub-resource-id}/{sub-resource}

Q9. Which is not REST Architectural Constraints?

  1. Client-Server
  2. Stateless
  3. Cacheable
  4. Service orchestration

Q10. What is the HTTP status code 201 indicate?

  1. OK
  2. Created
  3. Accepted
  4. No Content

Answers

Q1

2. Representational State Transfer

Q2

2. HTTP

Q3

2. 404

Q4

1. 500

Q5

3. Success

Q6

1. POST

Q7

2. PUT

Q8

1. /{resource}/{resource-id}/{sub-resource}/{sub-resource-id}

Q9

4. Service orchestration

Q10

2. Created

Free Spring Boot Tutorial | Full In-depth Course | Learn Spring Boot in 10 Hours


Watch this course on YouTube at Spring Boot Tutorial | Fee 10 Hours Full Course

Comments