Grav and adding XMLRPC

I was wondering if anyone experienced with the Grav structure and framework would know how a developer would go about adding XMLRPC to the Grav Software to post blog and pages remotely? We currently post to wordpress remotely through different programs without having to login to each wordpress website which is great and something we really need.

Would this need to be a core edit or could this be done with a plugin and where would we begin if this is possible?

You’re essentially talking about a content editing API. I am familiar with those in Wordpress and Drupal and I agree it’s a great feature for creating clients like mobile apps.

I am pretty sure this needs development work, but could possibly be done without modifying Grav core within a plugin. There’ll be methods for publishing and editing in Grav Core. You’d need to hook up endpoints to trigger those. Sorry that’s just my initial high level thinking.

I don’t see anything in the Grav 2 roadmap for a content API, so please consider adding that. I’d be keen to hear what other developers think.

Thanks for the reply Hughbris. I think it would be a great addition. Right now we have our developers researching the Grav admin plugin to see if we can modify that and plug it into that code as a solution. This way we just have to update the admin plugin as it is updated without touching the core. Any help would be great with adding this to Grav if you would like to get involved.

Hi, yes I’m quite interested in getting involved though my time is limited for hobby projects right now. After investigating briefly when I originally answered your question, I suspected you may need to modify core. It seems like a good idea to look into whether the Admin plugin can be extended, since this will already contain the API operations. You could write endpoint templates with Twig I guess.

You might find it useful to look at the devtools plugin code for tips on porting some Grav operations for another client environment (command line). Devtools itself would in fact be greatly strengthened by the inclusion of RPC methods, in line with drush for Drupal.

How are you planning to work on this if you find a feasible path? Will you be developing in the open and giving back to the project? I suggest touching base with project lead @rhuk about your interface before going too far down that track, though I am pretty sure he’d be thrilled to have it included.


Hi Hugh, I am not sure, still waiting to hear back from my developers today whether they are able to use the admin plugin or if they will have to write a new plugin. It doesn’t really matter to me whether it is open source, if you want to incorporate it into the release, that would be fine with me. I will get back with you to see what they have found.

We can use the XMLRPC library for this which we have already coded in our own software to post directly to wordpress. It would just be nice to post to grav as well.

Thanks :slight_smile: