Module Quiz: Introduction to REST APIs :Working with Data in iOS (Meta iOS Developer Professional Certificate) Answers 2026
Question 1
Which of the following is a recommended best practice when naming the URI for a REST API endpoints?
✅ Do not use camelCase, PascalCase or Title case.
❌ Use special characters in the endpoint URLs.
❌ Use abridged, or shortened, words in your URI.
❌ Use HTTPS to encrypt API communications.
Explanation:
REST URI naming me lowercase letters aur hyphen use karna best practice hota hai. HTTPS security se related hai, naming se nahi.
Question 2
What is the benefit of using a query string for data filtering in API design?
✅ It provides a standardized way of specifying filtering parameters.
❌ It allows for more complex filtering options than other approaches.
❌ It improves the security of the API by limiting access to certain data.
❌ It reduces the amount of data transmitted between the client and server.
Explanation:
Query strings (?status=active) ek standard aur readable tareeka dete hain filtering specify karne ka.
Question 3
When would you use the HTTP PUT method over the HTTP PATCH method?
❌ When creating a new resource.
❌ When updating a small portion of a resource.
❌ When updating multiple resources at once.
✅ When updating a large portion of a resource.
Explanation:
-
PUT → poora ya major resource update
-
PATCH → partial update
Question 4
Which of the following best illustrates the difference between authentication and authorization?
❌ Authentication is allowing access, authorization is identity verification.
❌ Authentication verifies identity, authorization allows file upload only.
✅ Authentication is verifying a user’s identity, while authorization allows access to specific features.
Explanation:
-
Authentication = Who are you?
-
Authorization = What are you allowed to do?
Question 5
Which of the following HTTP status codes are used to indicate client-side and server-side errors? (Select all that apply)
❌ 201 – Created
✅ 503 – Service unavailable
✅ 404 – Not found
❌ 301 – Moved permanently
✅ 403 – Forbidden
Explanation:
-
4xx → Client errors (404, 403)
-
5xx → Server errors (503)
Question 6
Which of the following are valid Accept headers for requesting XML content? (Select all that apply)
✅ application/xml
✅ text/xml
❌ code/xml
❌ application/x-xml
❌ application/xml-content
Explanation:
Standard MIME types for XML: application/xml aur text/xml.
Question 7
Which of the following statements about Insomnia is true?
❌ Insomnia is a programming language.
✅ Insomnia is a REST API client used to test and debug RESTful APIs.
❌ Insomnia is a RESTful web service.
❌ Insomnia is a browser extension.
Explanation:
Insomnia ek API testing tool hai (Postman jaisa).
Question 8
What is the primary purpose of authentication in a REST API?
❌ To establish a secure connection.
❌ To encrypt data in transit.
❌ To store client state information.
✅ To verify the identity of the client and provide access to protected resources.
Explanation:
Authentication ka main goal identity verification hota hai.
Question 9
What are the primary benefits of using a REST API?
❌ REST API promotes a highly-coupled system design.
✅ REST API provides a uniform interface using standard HTTP methods.
❌ REST API requires a specific programming language.
Explanation:
REST loosely coupled, scalable aur HTTP standards par based hota hai.
Question 10
What’s the semantic meaning of the 403 status code?
❌ Bad request
❌ Unauthorized
✅ Forbidden
Explanation:
403 ka matlab: User authenticated ho sakta hai, par access allowed nahi hai.
🧾 Summary Table
| Question | Correct Answer |
|---|---|
| Q1 | Do not use camelCase / PascalCase |
| Q2 | Standardized filtering via query string |
| Q3 | PUT for large/full updates |
| Q4 | Auth = identity, Authorization = access |
| Q5 | 503, 404, 403 |
| Q6 | application/xml, text/xml |
| Q7 | Insomnia = REST API client |
| Q8 | Verify client identity |
| Q9 | Uniform HTTP-based interface |
| Q10 | Forbidden |