@@ -259,6 +259,20 @@ If you add the ``dicttoxml.py`` module you can request XML formatted
259259data using the header ``Accept: application/xml`` in your
260260request. Both output formats are similar in structure.
261261
262+ ``dicttoxml.py`` should be installed in the Python install directory,
263+ or the file can be added to the Roundup installation directory long
264+ ide ``rest.py``. It can also be enabled on a per tracker basis by
265+ adding ``dicttoxml.py`` to the lib directory in your tracker home (you
266+ may need to create the directory). Then this can be added to
267+ `interfaces.py`_ to enable xml::
268+
269+ from roundup import rest
270+ from dicttoxml import dicttoxml as dtox # from tracker_root/lib directory
271+
272+ rest.dicttoxml = dtox
273+
274+ .. _interfaces.py: customizing.html#interfaces-py-hooking-into-the-core-of-roundup
275+
262276The rest interface accepts the http accept header and can include
263277``q`` values to specify the preferred mechanism. This is the preferred
264278way to specify alternate acceptable response formats.
@@ -1594,7 +1608,7 @@ structure and implementation.
15941608Adding new rest endpoints
15951609=========================
15961610
1597- Add or edit the file interfaces.py at the root of the tracker
1611+ Add or edit the file ` interfaces.py`_ at the root of the tracker
15981612directory.
15991613
16001614In that file add::
@@ -2154,5 +2168,8 @@ Test Examples
21542168
21552169Rate limit tests::
21562170
2157- seq 1 300 | xargs -P 20 -n 1 curl --head -si \
2158- https://.../rest/data/status/new \# | grep Remaining
2171+ seq 1 300 | xargs -P 20 -n 1 curl --head -u user:password -si \
2172+ https://.../rest/data/status/new | grep Remaining
2173+
2174+ will show you the number of remaining requests to the REST interface
2175+ for the user identified by password.
0 commit comments