Skip to content

Commit 25a9d48

Browse files
committed
How to add dicttoxml at system or tracker level.
1 parent 187aedc commit 25a9d48

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

doc/rest.txt

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,20 @@ If you add the ``dicttoxml.py`` module you can request XML formatted
259259
data using the header ``Accept: application/xml`` in your
260260
request. 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+
262276
The rest interface accepts the http accept header and can include
263277
``q`` values to specify the preferred mechanism. This is the preferred
264278
way to specify alternate acceptable response formats.
@@ -1594,7 +1608,7 @@ structure and implementation.
15941608
Adding 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
15981612
directory.
15991613

16001614
In that file add::
@@ -2154,5 +2168,8 @@ Test Examples
21542168

21552169
Rate 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

Comments
 (0)