Does trac have remote API?
Asked Answered
M

3

8

I know there is xmlrpc plugin for trac. But I is not my trac site nor do I have admin rights. I just have a normal user account with limited priviledges.

Beside the obvious low level of doing things (submitting requests by emulating web browser), is there a better way to do this?

I'm interested mainly in these:

  • View wiki page
  • Edit wiki page
  • Submit new ticket
  • View Ticket
  • Add comment to ticket
Monition answered 21/2, 2010 at 3:39 Comment(0)
Y
3

If you look at the "functional testing" in the Trac source, you'll find that we have code that exercises Trac using twill. You might find that to be a useful starting point for doing this sort of thing.

Yocum answered 16/3, 2010 at 14:36 Comment(0)
B
2

Trac does not provide an API by default. You might install the XmlRpcPlugin. Trac then provides anonymous and authenticated access to an API via two protocols: XML-RPC and JSON-RPC.

A helper library for easier access is https://github.com/jakoch/PHPTracRPC

Barm answered 22/11, 2014 at 21:36 Comment(0)
M
0

Seems the only way to do this would be to emulate browser.

Monition answered 26/2, 2010 at 16:53 Comment(2)
I'd be interested to know what you mean by "emulate browser" since I'm not familiar with what you are referring to.Industrials
You would need to gather exact names of the form fields, then forge a POST request using those fields (including hidden ones). Then the html page comes back and you would need to parse it for the information needed. Not very elegant. It's called webscraping.Monition

© 2022 - 2024 — McMap. All rights reserved.