Title: Extend Jetpack Rest API
Last modified: August 20, 2016

---

# Extend Jetpack Rest API

 *  Resolved [exbm](https://wordpress.org/support/users/exbm/)
 * (@exbm)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/extend-jetpack-rest-api/)
 * Is it possible to extend the jetpack RESTful API to work with added functionality
   of custom plugins?
 * [http://wordpress.org/extend/plugins/jetpack/](http://wordpress.org/extend/plugins/jetpack/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [exbm](https://wordpress.org/support/users/exbm/)
 * (@exbm)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/extend-jetpack-rest-api/#post-3492606)
 * I have looked into this: correct me if I am wrong but can I add more Rest endpoints
   by extending the WPCOM_JSON_API_Endpoint class then extending that with a another
   class that defines the callback function. then constructing that class with the
   arguments of my new endpoint.. will this automatically update the url rewrites?
 * I couldn’t find in the code where you define the url_rewrites..
 * As far as I can tell it works like this:
 * XML_RPC method added json_api that initializes the JSON_API class with the url
   used to access the xml method. then that’s passed to the endpoints array and 
   calls the appropriate endpoint callback method? I am assuming that you use url_rewrite
   to change the rest uri to the xmlrpc.php and setting the method json_api?
 *  Plugin Contributor [Beau Lebens](https://wordpress.org/support/users/beaulebens/)
 * (@beaulebens)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/extend-jetpack-rest-api/#post-3492670)
 * Hi exbm: Right now it’s not possible to extend the API, but we’re looking at 
   the best way to allow plugin authors to do that.
 * The reason you can’t find anything about the rewrites in the plugin is that the
   API is actually designed to operate through a central server/host (which is hosted
   by WordPress.com), so all of that information is hosted by us. This makes it 
   easier for people implementing against the API (they only need to point to one
   endpoint), but it means that that server needs to be aware of all possible URLs.
   In your case, if you wanted to write a custom endpoint then the WordPress.com
   server would need to know about it (which it doesn’t) so that it could relay 
   those requests through to your Jetpack site.
 * So API requests are made against public-api.wordpress.com, which then either 
   executes them against a blog hosted on WordPress.com, or relays those requests(
   as XML-RPC) to a Jetpack site. All requests that the Jetpack site sees come in
   as XML-RPC, even if they were actually originally made as REST/JSON.
 * Once we figure out a good way to allow plugins to extend the API, we’ll have 
   documentation up at [http://developer.wordpress.com/](http://developer.wordpress.com/)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Extend Jetpack Rest API’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Beau Lebens](https://wordpress.org/support/users/beaulebens/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/extend-jetpack-rest-api/#post-3492670)
 * Status: resolved