Resource 123
has a current configuration state and a default configuration state, and both of these configuration states can be represented by JSON.
A GET
request to http://example.com/123/config
will return the current configuration state, and a GET
request to http://example.com/123/config?reset=true
will return the default configuration state.
How should an API interpret boolean values? For instance:
http://example.com/123/config?reset=true
http://example.com/123/config?reset=blablabla
http://example.com/123/config?reset=false
http://example.com/123/config?reset=1
http://example.com/123/config?reset=0
http://example.com/123/config?reset=
http://example.com/123/config?reset
Whichever way you want it to, it's completely up to you as the architect/designer. true/false
is the most syntactically correct version, make sure that one works and add the other options as sugar if you want.