| title |
|---|
Trac / Remote API |
Trac / Remote API
- TracDev/ApiDocs – The Trac Project 這裡是 Trac 自身開發會用到的 API,跟 Remote API 無關。
- Does trac have remote API? - Stack Overflow Jens A. Koch: Trac 對外沒有提供 API,可以安裝 Trac XML-RPC Plugin,提供 XML-RPC 與 JSON-RPC 兩種 access。
- REST API for Trac.Wiki - Super User David Roussel: XmlRpcPlugin 提供 RPC interface,但不是 REST。
- #217 (XML-RPC/SOAP/etc. interface) – The Trac Project (2004-04-01) #ril
-
XmlRpcPlugin – Trac Hacks - Plugins Macros etc.
-
This plugin allows Trac plugins to export SELECT PARTS of their interface via XML-RPC and JSON-RPC (if
jsonorsimplejsonis available). Latest trunk version includes a pluggable API for EXTENDING PROTOCOLS, and see for instance TracRpcProtocolsPlugin for more protocols.所謂 "extending protocols" 指的是像 JSON-RPC 這類不同的 RPC 管道。
-
The BROWSABLE XML-RPC URI suffix is
/rpc, but most XML-RPC clients should use the authenticated URL suffix/login/rpcas this will provide AUTHENTICATED REQUESTS through Trac.The
XML_RPCpermission is used to grant users access to using the RPC interface. If you do want to use/rpcand UNAUTHENTICATED ACCESS, you must grant theXML_RPCpermission to theanonymoususer.$TRAC_HOST/rpc可以看 RPC API 文件,如果沒有權限,存取/rpc會看到 "XML_RPC privileges are required to perform this operation. You don't have the required permissions." 的提示。/login/rpc才是給程式走的,API 文件裡會標示每個 function 的權限要求 (permission required),有XML_RPC、TICKET_VIEW、TICKET_CREATE、By resource 等。為什麼下面 Python End-User Usage 的範例都用
/xmlrpc而非/login/rpc? 按照 Remote Procedure Call (RPC) – Trac Hacks 的說法,/rpc//login/rpc走 JSON-RPC,而/xmlrpc//login/xmlrpc則是 XML-RPC,其中/login/...都是 authenticated access。 -
Method status:
- Ticket API is also complete, with the following types exported: component, version, milestone, type, status, resolution, priority and severity.
- The WikiRPC API ?? is complete, mostly thanks to mgood.
-
Protocol and method documentation for the latest version of the plugin can be found here. 註冊帳號後就能存取
-
- Remote Procedure Call (RPC) – Trac Hacks - Plugins Macros etc. #ril
- Python End-User Usage - XmlRpcPlugin – Trac Hacks - Plugins Macros etc. #ril
- Django: Access Trac from Your Webapp Using XML-RPC (2012-05-31) #ril
-
trac.web.auth – Trac Authentication — Trac branches-1.2-stable-r16563 documentation #ril
- 只支援 HTTP Basic 與 Digest;這好像是供 server-side 實作參考的?
-
Using Digest Authentication in Python - XmlRpcPlugin – Trac Hacks - Plugins Macros etc. #ril
-
Problems with Digest HTTP authentication - XmlRpcPlugin – Trac Hacks - Plugins Macros etc. #ril
相關:
手冊: