1Z0-900 · Question #16
Which URL represents an invalid approach to pass a parameter to a REST resource?
The correct answer is D. <base-url>/Employees;value=1. Option D uses a semicolon (;) to pass a parameter, which is not a recognized convention in REST API design. While semicolons appear in some obscure URI matrix parameter proposals, they are not supported by standard REST frameworks or HTTP specifications as a parameter-passing…
Question
Which URL represents an invalid approach to pass a parameter to a REST resource?
Options
- A<base-url>/Employees?value=1
- B<base-url>/Employees&value=1
- C<base-url>/Employees/1
- D<base-url>/Employees;value=1
How the community answered
(28 responses)- A4% (1)
- B7% (2)
- D89% (25)
Explanation
Option D uses a semicolon (;) to pass a parameter, which is not a recognized convention in REST API design. While semicolons appear in some obscure URI matrix parameter proposals, they are not supported by standard REST frameworks or HTTP specifications as a parameter-passing mechanism.
Option A is valid - the ? character begins a query string, the standard way to pass optional parameters. Option B, while unconventional (the & separator normally joins additional query params after a ?), still represents a recognizable (if malformed) query-string attempt and is closer to a known pattern. Option C is valid - appending /1 directly to the path is the standard REST approach for a path parameter (e.g., fetching employee with ID 1).
Memory tip: Think of the three valid REST parameter styles as the "Three P's" - Path (/1), Query (?value=1), and Payload (request body). The semicolon in option D fits none of these, making it the odd one out.
Topics
Community Discussion
No community discussion yet for this question.