Epistlee = 100% RESTful Blogging Platform
Epistlee is pure RESTful service with very simple implementation. Even our webapp uses the Epistlee API directly.
Every request requries you to send Username and Password in the Authorization header (i.e. by doing Basic Authentication).
You also need to send the Accept header as application/json.
PS - If you are just looking to implement your Epistlee blog on your website, then you can have a look at our Epistlee's PHP Library which will make the job easier for you by making all the request calls.
Get Blog Entries |
Get the blog entries of a user. You can also define whether you want to list drafts. With this you can also define the page number and apply filters.
Request
URL - http://username.epistlee.com
Optional GET Variables - drafts, year, month, day, date, p
For example...
http://username.epistlee.com/?drafts=true&year=2012&p=2
Method - GET
Authentication - Optional. Required to see drafts.
Response
A 200 OK status code will be returned with a JSON body with following elements...
id (string)
title (string)
body (string)
baseurl (string)
date (string)
draft (boolean)
comments (boolean)
disqusShortname (string) (if comments are enabled)
attachments (array) (if any)
Sample Response
Get Blog Entry |
Get blog entry via its baseurl.
Request
URL - http://username.epistlee.com/baseurl
If you want to see non-parsed raw entries that were orginally written by the user, then send your request with Accept header as text/x-markdown. This requires authentication.
Method - GET
Authentication - Optional. Required to see drafts and/or non-parsed raw entries.
Response
A 200 OK status code will be returned with a JSON body with following elements...
id (string)
title (string)
body (string)
baseurl (string)
date (string)
draft (boolean)
comments (boolean)
disqusShortname (string) (if comments are enabled)
attachments (array) (if any)
NOTE - Epistlee DOES NOT uses the base URL of the post to show comments. Instead it uses the ID of the post as its Disqus Identifier.
Sample Response
New Blog Entry |
Create a new blog post. Optionally attach files (maximum 5). A maximum of 5 MB per file.
Request
URL - http://epistlee.com/new
Method - POST
Authentication - Required.
Required POST Variables - content
Please note that first line of content variable is always the blog post title.
To upload files you need to encode files into Base64 and send that in POST variables from a1 to a5.
For example you have two files. You will keep the encoded data of files into variables a1 and a2. And you will keep the name of files in variables a1name and a2name.
Response
A 201 Created status code will be returned on success with a JSON body with following elements...
id (string)
title (string)
body (string)
baseurl (string)
date (string)
draft (boolean)
comments (boolean)
disqusShortname (string) (if comments are enabled)
attachments (array) (if any)
Update Blog Entry |
Update a blog entry via its base URL.
Request
URL - http://username.epistlee.com/baseurl
Method - POST
Authentication - Required.
Required POST Variables - content
First line of content variable is always the blog post title.
To upload files you need to encode files into Base64 and send that in POST variables from a1 to a5.
For example you have two files. You will keep the encoded data of files into variables a1 and a2. And you will keep the name of files in variables a1name and a2name.
Response
A 200 OK status code will be returned.
Delete Blog Entry |
Delete a blog entry.
Request
URL - http://username.epistlee.com/baseurl
Method - DELETE
Authentication - Required.
Response
A 200 OK status code will be returned.
Create New Blog |
Register a new account (AKA create a new blog).
Request
URL - http://epistlee.com/register
Method - POST
You need to pass on the Username and Password for the new account in the Authorization header.
Required POST Variables - email
Optional POST Variables - name, site_title
Response
A 201 Created status code will be returned on success...
Get Account Details |
Get account details of a user.
Request
URL - http://epistlee.com/a
Method - GET
Authentication - Required.
Response
A 200 OK status code will be returned with a JSON body with following elements...
username (string)
name (string)
email (string)
sitetitle (string)
status (string) (paid or unpaid)
domain (string) (if set)
disqusShortname (string) (if set)
nullable (string) (if set)
Change Account Settings |
Change account settings of a user.
Request
URL - http://epistlee.com/a
Method - POST
Authentication - Required.
POST Variables - name, email, sitetitle, password, disqusShortname, domain
(only send the ones you want to change)
Response
A 200 OK status code will be returned on success.
Delete Attachment |
Delete a attachment uploaded by a user.
Request
URL - URL of Attachment
Method - DELETE
Authentication - Required.
Response
A 200 OK status code will be returned on success.
