Quiz 1
Quiz 1
1. FTP
2. HTTP
3. JMX
4. SOAP
3. Which of the following component of HTTP request contains metadata for the
HTTP Request message as key-value pairs?
1. URI
2. VERB
3. HTTP Version
4. Request Header
3
5. What is the HTTP Status Code Related to Page Not Found?
1. 402
2. 404
3. 403
4. 401
1. 500
2. 501
3. 504
4. 502
– 500: Internal Server Error – The server encountered an unexpected condition that
prevented it from fulfilling the request.
– 501: Not Implemented – The server either does not recognize the request method, or
it lacks the ability to fulfill the request.
– 502: Bad Gateway – The server received an invalid response from the upstream
server while trying to fulfill the request.
– 504: Gateway Timeout – The server, while acting as a gateway or proxy, did not
receive a timely response from the upstream server.
7. What does HTTP Code 200 indicate?
1. Error
2. Completed
3. Success
4. Warning
1. CREATE
2. POST
3. PUT
4. OPTION
– PUT: Update or create a resource on the server with the provided data.
– TRACE: Perform a message loop-back test along the path to the target resource.
1. POST
2. PUT
3. UPDATE
4. DELETE
11. 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}
1. OK
2. Created
3. Accepted
4. No Content
13. Which HTTP methods are commonly used in REST API operations?
14. Which of the following HTTP method should be used to delete resource using
RESTful web service?
1. GET
2. DELETE
3. POST
4. OPTIONS
15. What is the recommended method and URL pattern for retrieving a specific
user?
1. GET /users/{id}
2. GET /user/{id}
3. GET /user?id={id}
4. GET /users?id={id}
16. Which of the following HTTP Status code means FORBIDDEN, states that user
is not having access to method being used for example, delete access without
admin rights?
1. 403
2. 404
3. 406
4. 409
406: Not Acceptable – Indicates that the server cannot generate a response that is
acceptable to the client based on the accept headers sent in the request
409: Conflict – Indicates that the request could not be completed due to a conflict with
the current state of the resource, such as a version control conflict.
1. Not Modified
2. User can select among multiple links and go to different page.
3. The resource requested has been found and moved temporarily to new URL
location.
4. The page requested is available only by means of proxy address given in the
response.
1. Redirection
2. Client Error
3. Server Error
4. Informational
19. What is the difference between PUT and PATCH methods in REST API?
1. PUT is used for creating resources, while PATCH is used for updating resources
2. PUT updates the entire resource, while PATCH updates only specific fields of a
resource
3. PUT requires authentication, while PATCH does not
4. PUT is idempotent, while PATCH is not
20. What is the role of the “Content-Type” header in a REST API request?
Answer 2
21. What is the purpose of the “Authorization” header in a REST API request?
Answer 3
Answer 2
23. What is the primary purpose of the HTTP OPTIONS method in REST APIs?
1. To update a resource
2. To retrieve the communication options available on a resource or server
3. To delete a resource
4. To create a resource
Answer 2
1. ssh
2. bash
3. curl
4. powerShell
Answer 3
25. Which of the following directive of Cache Control Header of HTTP response
indicates that resource is not cachable?
1. Public
2. Private
3. max-age
4. no-cache/no-store