Format: 1A Host: http://blog.acme.com
NOTE: This document is outdated. Refer to the actual API Blueprint examples.
Welcome to the ACME Blog API. This API provides access to the ACME Blog service.
Retrieves ACME Blog posts.
@id = 1234 (number) ... Id of a post to retrieve. If there is no id specified all ACME Blog posts are returned.
X-ACME-API-Ver: 1
Array of ACME Blog posts. Might contain just one item if there is a valid @id specified. Null if there are no posts.
@.author (string) ... Name of ACME Blog author.
@.title (string) ... Title of the blog post.
@.body (string) ... Blog post body.
[
{
"_id" : "1234",
"author" : "Jakub Nesetril",
"body" : "This is a blog entry",
"title" : "This is a blog post title",
"comments" : [
{
"body" : "This is my comment",
"author" : "Jakub Nesetril"
},
{
"body" : "Give me liberty or give me death.",
"author" : "Jan Moravec"
}
],
"date" : "2012-11-10T06:42:55.733Z"
}
]
Creates a new ACME Blog posts. Post can be created either as a copy of an existing post or as a completely new post submitting its body, title and author.
@.source_id (number) ... Id of an existing post to be duplicated.
{ source_id : 1234 }
{
"author" : "Jakub Nesetril",
"body" : "This is a blog entry",
"title" : "This is a blog post title"
}
X-ACME-API-Ver: 1
{ "message" : "created" }
Comments for ACME Blog post of a given @id.
@id = 1234 (number) ... Id of a ACME Blog post.
Retrieves all comments for the given post.
Array of post comments.
[
{
"body" : "This is my comment",
"author" : "Jakub Nesetril"
},
{
"body" : "Give me liberty or give me death.",
"author" : "Jan Moravec"
}
]
Creates new comment on the given post.
{
"body" : "This is my comment",
"author" : "Jakub Nesetril"
}
{ "message" : "created" }