Blog Post
Blog posts can be created for any realm.
Fields
Section titled “Fields”| Field | Name | Description | Type |
|---|---|---|---|
title* |
Title | The post title. | string |
body |
Post body | The post body. Rendered as HTML — line breaks need a <br />. |
string |
* = Required
GET {realm}/posts
Section titled “GET {realm}/posts”View a list of posts (paged)
Return A list of post objects
{ "post": [ { "id": "5615055", "title": "PHP meetup", "body": "Let's meet and chat about PHP", "created": 1386886391, "links": { "self": "http:\/\/...\/posts\/5615055" } }, { "id": "5615045", "title": "REST API meetup", "body": "Let's meet and chat about REST API", "created": 1386886221, "links": { "self": "http:\/\/...\/posts\/5615045" } } ]}<?xml version="1.0" encoding="utf-8" ?><result> <post> <id>5615055</id> <title>PHP meetup</title> <body>Let's meet and chat about PHP</body> <created>1386886391</created> <links> <self>http://.../5615055</self> </links> </post> <post> <id>5615045</id> <title>REST API meetup</title> <body>Let's meet and chat about REST API</body> <created>1386886221</created> <links> <self>http://.../5615045</self> </links> </post></result>GET {realm}/posts/{id}
Section titled “GET {realm}/posts/{id}”View a specified blog post
Return A post
{ "id": "5615045", "title": "REST API meetup", "body": "Let's meet and chat about REST API", "created": 1386886221}<?xml version="1.0" encoding="utf-8" ?><result> <id>5615045</id> <title>REST API meetup</title> <body>Let's meet and chat about REST API</body> <created>1386886221</created></result>POST {realm}/posts
Section titled “POST {realm}/posts”Create a blog post
Content A post
{ "title": "My first blog", "body": "<strong>my blog content<\/strong>"}<body> <title>My first blog</title> <body><strong>my blog content</strong></body></body>Return A post
{ "id": "5615045", "title": "REST API meetup", "body": "Let's meet and chat about REST API", "created": 1386886221, "links": { "self": "http:\/\/...\/posts\/5615045" }}<?xml version="1.0" encoding="utf-8" ?><result> <id>5615045</id> <title>REST API meetup</title> <body>Let's meet and chat about REST API</body> <created>1386886221</created> <links> <self>http://.../5615045</self> </links></result>PUT {realm}/posts/{id}
Section titled “PUT {realm}/posts/{id}”Modify a blog post
Content An object containing blog post fields
{ "title": "My new blog title"}<body> <title>My new blog title</title></body>DELETE {realm}/posts/{id}
Section titled “DELETE {realm}/posts/{id}”Delete a blog post (cannot be undone)