Mercurial > p > roundup > code
comparison doc/xmlrpc.txt @ 4936:eeb9572b0508
doc: Update XML-RPC documentation with example that points to demo
| author | anatoly techtonik <techtonik@gmail.com> |
|---|---|
| date | Thu, 02 Oct 2014 21:26:37 +0300 |
| parents | f47c35727b3e |
| children | 47cc50617e19 |
comparison
equal
deleted
inserted
replaced
| 4935:adb8b787e157 | 4936:eeb9572b0508 |
|---|---|
| 5 .. contents:: | 5 .. contents:: |
| 6 :local: | 6 :local: |
| 7 | 7 |
| 8 Introduction | 8 Introduction |
| 9 ------------ | 9 ------------ |
| 10 Version 1.4 of Roundup includes an XML-RPC frontend. Some installations find | 10 Version 1.4 of Roundup includes an XML-RPC frontend for remote access. The |
| 11 that roundup-admins requirement of local access to the tracker instance | 11 XML-RPC interface allows a limited subset of commands similar to those found in |
| 12 limiting. The XML-RPC frontend provides the ability to execute a limited subset | 12 local `roundup-admin` tool. |
| 13 of commands similar to those found in roundup-admin from remote machines. | |
| 14 | 13 |
| 15 There are two ways to access the xmlrpc interface: | 14 By default XML-RPC is accessible from ``/xmlrpc`` endpoint: |
| 15 | |
| 16 http://username:password@localhost:8000/xmlrpc | |
| 17 | |
| 18 For demo tracker the URL would be: | |
| 19 | |
| 20 http://localhost:8917/demo/xmlrpc | |
| 21 | |
| 22 There are two ways to run the XML-RPC interface: | |
| 16 | 23 |
| 17 stand alone roundup-xmlrpc-server | 24 stand alone roundup-xmlrpc-server |
| 18 | 25 |
| 19 access via the roundup server | 26 access via the roundup server |
| 20 | 27 |
| 32 ``--port`` switch. | 39 ``--port`` switch. |
| 33 | 40 |
| 34 accessing via roundup server | 41 accessing via roundup server |
| 35 ---------------------------- | 42 ---------------------------- |
| 36 In addition to running a stand alone server described above, the | 43 In addition to running a stand alone server described above, the |
| 37 xmlrpc service is available from the roundup HTTP server. Access it by | 44 XML-RPC service is available from the roundup HTTP server. |
| 38 sending text/xml data to the URL for the roundup tracker with the last | |
| 39 component of the url set to 'xmlrpc'. | |
| 40 | 45 |
| 41 security consideration | 46 security consideration |
| 42 ====================== | 47 ====================== |
| 43 Note that the current ``roundup-xmlrpc-server`` implementation does not | 48 Note that the current ``roundup-xmlrpc-server`` implementation does not |
| 44 support SSL. This means that usernames and passwords will be passed in | 49 support SSL. This means that usernames and passwords will be passed in |
| 101 sample python client | 106 sample python client |
| 102 ==================== | 107 ==================== |
| 103 :: | 108 :: |
| 104 | 109 |
| 105 >>> import xmlrpclib | 110 >>> import xmlrpclib |
| 106 >>> roundup_server = xmlrpclib.ServerProxy('http://username:password@localhost:8000/xmlrpc', allow_none=True) | 111 >>> roundup_server = xmlrpclib.ServerProxy('http://admin:admin@localhost:8917/demo/xmlrpc', allow_none=True) |
| 107 >>> roundup_server.schema() | 112 >>> roundup_server.schema() |
| 108 {'user': [['username', '<roundup.hyperdb.String>'], ...], 'issue': [...]} | 113 {'user': [['username', '<roundup.hyperdb.String>'], ...], 'issue': [...]} |
| 109 >>> roundup_server.list('user') | 114 >>> roundup_server.list('user') |
| 110 ['admin', 'anonymous', 'demo'] | 115 ['admin', 'anonymous', 'demo'] |
| 111 >>> roundup_server.list('issue', 'id') | 116 >>> roundup_server.list('issue', 'id') |
| 127 [] | 132 [] |
| 128 >>> roundup_server.filter('user',[],{'username':'adm'}) | 133 >>> roundup_server.filter('user',[],{'username':'adm'}) |
| 129 [] | 134 [] |
| 130 >>> roundup_server.lookup('user','admin') | 135 >>> roundup_server.lookup('user','admin') |
| 131 '1' | 136 '1' |
| 132 | |
| 133 If you are accessing the interface via the roundup HTTP server, a url | |
| 134 similar to: | |
| 135 | |
| 136 http://username:password@localhost:8000/tracker/xmlrpc | |
| 137 | |
| 138 should be used. |
