Edicy Site API
Access public Edicy site contents through JSON based API. Contents your visitors see on the site can now be read by machines as well.
This API is mostly read-only and can be used to make your sites more dynamic. Creating scroll-on-demand blog pages or searchable product catalogs is now simpler than ever.Making requests
API URLs start with
http://yoursite.com/admin/api/site/
Data will be returned only in JSON format.Example request
Here's a simple example how to load articles on the page dynamically using jQuery:
$.ajax({ url: '/admin/api/site/articles.json', dataType: 'json', success: function(articles) { // Do something with articles } });
Paginating
By default, every resource will return first 30 records. This can be controlled with
per_page
request parameter. Pages of records can be fetched by providing page
request parameter.For example, if you need to fetch the articles 51…100 from the collection, you need to make request to URL
/admin/api/site/articles.json?page=2&per_page=50
But what about JSONP?
JSONP can be used to load contents from your site on another page. Currently, it is not supported but we are considering it.