Skip to content

Commit 275a30f

Browse files
committed
docs: clarify Api version method priority; payload @Apiver
Define how version is determined when multiple conflicting methods are used. Add doc on use of @Apiver in data payload for PUT/POST (and maybe PATCH). Now that this is defined, sent email to devel list to see if the order should be changed. The url parameter is the lowest priorty setting and will be ignored if any of the 3 higher priority methods are used. However using the url setting is the easiest for testing.
1 parent 73db6d4 commit 275a30f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

doc/rest.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,21 @@ Versioning
222222

223223
Currently there is only one version of the API. Versions are simple
224224
integers. The current version is ``1``. Version selection is
225-
implemented in the server using one of three methods:
225+
implemented in the server using one of four methods (in priority
226+
order, highest first):
226227

227228
1. Explicit version param in accept header:
228229
``application/json; version=1``
229230

230231
2. Version suffix in vendor accept header:
231232
``application/vnd.json.test-v1+json``
232233

233-
3. Adding version specifier in query string: ``@apiver=1``
234+
3. Adding ``@apiver: 1`` in the input data wrapper (for POST, PUT)
235+
236+
4. Adding version specifier in query string: ``@apiver=1`` (for GET).
237+
238+
The highest priority version method will be used if multiple
239+
methods are used.
234240

235241
If an explicit version is not provided, the server default is used.
236242
The server default is reported by querying the ``/rest/`` endpoint as

0 commit comments

Comments
 (0)