Hook before posting via JSON REST API

I have been testing out the JSON REST API the past few days with some pretty good results however I have run into a bit of a barrier when making a post.

I need to hook into the post call before the post is made, however I can’t for the life of me find any way to do this. It’s fairly important that this is possible, otherwise I may well have to come up with my own solution (which isn’t ideal!).

The nearest I have come to being able to do this is by using the following action:

add_action('json_prepare_post', 'receive_post_data');

However this is called after the post has been made.

Does anyone have any ideas or is it simply not possible? This gitHub thread pretty much says it isn’t possible.


Solutions Collecting From Web of "Hook before posting via JSON REST API"