An article is a single entry in a blog.
Articles appear in reverse chronological order, with the most recent entry at the top of the blog's page. A blog can contain any number of articles.
Authenticated access scopes: com.read_contents, com.write_contents
What you can do with Article
The Haravan API lets you do the following with the Article resource.
- GET https://apis.haravan.com/web/blogs/{blog_id}/articles.json Receive a list of all articles.
- GET https://apis.haravan.com/web/blogs/{blog_id}/articles/count.json Retrieves a count of all articles.
- GET https://apis.haravan.com/web/blogs/{blog_id}/articles/{article_id}.json Retrieves single the article.
- GET https://apis.haravan.com/web/articles/authors.json Retrieves a list of all the authors.
- GET https://apis.haravan.com/web/articles/tags.json Retrieves a list of all the tags.
- POST https://apis.haravan.com/web/blogs/{blog_id}/articles.json Create a new article.
- PUT https://apis.haravan.com/web/blogs/{blog_id}/articles/{article_id}.json Modify an existing article.
- DELETE https://apis.haravan.com/web/blogs/{id}/articles/{article_id}.json Delete an existing article.
Article properties
Endpoints
Retrieves a list of all articles from a certain blog.
limit | Limit of the result. |
page | Page to show the result. |
since_id | Restrict results to after the specified ID |
handle | Filter by Blog handle. |
fields | comma-separated list of fields to include in the response. |
created_at_min | Show products created after the date (format: 2008-12-31T02:01:27.483Z). |
created_at_max | Show products created before date (format: 2008-12-31T02:01:27.483Z). |
updated_at_min | Show products last updated after date (format: 2008-12-31T02:01:27.483Z). |
updated_at_max | Show products last updated before date (format: 2008-12-31T02:01:27.483Z). |
published_at_min | Show products published after the date (format: 2008-12-31T02:01:27.483Z). |
published_at_max | Show products published before date (format: 2008-12-31T02:01:27.483Z). |
published_status |
|
author | Filter by the article author. |
Retrieves a list of all articles from a certain blog by page number. By default, the number of resources on the page is 50.
GET https://apis.haravan.com/web/blogs/24125318/articles.json?page=1
HTTP/1.1 200 OK { "articles": [ { "id": 294160202, "title": "Just us bots here", "created_at": "2013-11-06T19:00:00-05:00Z", "body_html": "beep boop", "blog_id": 241253187, "author": "dennis", "user_id": null, "published_at": null, "updated_at": "2017-07-24T19:09:43-04:00Z", "summary_html": null, "template_suffix": null, "handle": "just-us-bots-here", "tags": "" }, { "id": 989034056, "title": "Some crazy article I'm coming up with", "created_at": "2008-12-31T19:00:00-05:00Z", "body_html": "I have no idea what to write about, but it's going to rock!", "blog_id": 241253187, "author": "John", "user_id": null, "published_at": null, "updated_at": "2009-01-31T19:00:00-05:00Z", "summary_html": null, "template_suffix": null, "handle": "some-crazy-article-im-coming-up-with", "tags": "Mystery" }, { "id": 1051293780, "title": "Welcome to the world of tomorrow!", "created_at": "2013-11-06T19:00:00-05:00Z", "body_html": "Good news, everybody!", "blog_id": 241253187, "author": "dennis", "user_id": null, "published_at": null, "updated_at": "2017-07-24T19:09:43-04:00Z", "summary_html": null, "template_suffix": null, "handle": "welcome-to-the-world-of-tomorrow", "tags": "" } ] }
Retrieves a list of articles from a certain blog by handle.
GET https://apis.haravan.com/web/blogs/241253187/articles.json?author=dennis
HTTP/1.1 200 OK { "articles": [ { "id": 294160202, "title": "Just us bots here", "created_at": "2013-11-06T19:00:00-05:00Z", "body_html": "beep boop", "blog_id": 241253187, "author": "dennis", "user_id": null, "published_at": null, "updated_at": "2017-07-24T19:09:43-04:00Z", "summary_html": null, "template_suffix": null, "handle": "just-us-bots-here", "tags": "" }, { "id": 1051293780, "title": "Welcome to the world of tomorrow!", "created_at": "2013-11-06T19:00:00-05:00Z", "body_html": "Good news, everybody!", "blog_id": 241253187, "author": "dennis", "user_id": null, "published_at": null, "updated_at": "2017-07-24T19:09:43-04:00Z", "summary_html": null, "template_suffix": null, "handle": "welcome-to-the-world-of-tomorrow", "tags": "" } ] }
Retrieves a count of the articles from a certain blog.
Retrieves a count of the articles from a certain blog.
GET https://apis.haravan.com/web/blogs/count.json
HTTP/1.1 200 OK { "count": 20 }
Retrieves a single article by its ID and the ID of the parent blog.
Retrieves a single article by its ID and the ID of the parent blog.
GET https://apis.haravan.com/web/blogs/241253187/articles/134645308.json
HTTP/1.1 200 OK { "article": { "id": 134645308, "title": "get on the train now", "created_at": "2008-07-31T20:00:00-04:00Z", "body_html": "Do you have an IPod yet?
", "blog_id": 241253187, "author": "Dennis", "user_id": 799407056, "published_at": "2008-07-31T20:00:00-04:00Z", "updated_at": "2008-07-31T20:00:00-04:00Z", "summary_html": null, "template_suffix": null, "handle": "get-on-the-train-now", "tags": "Announcing", "image": { "created_at": "2017-07-24T19:09:43-04:00Z", "attachment": null, "filename": null, "src": "https:www.file.hstatic.net/imac.jpg?v=1500937783" } } }
Create a new article with an image that will be downloaded by Haravan.
POST https://apis.haravan.com/web/blogs/{blog_id}/articles.json
{ "article": { "title": "My new Article title", "author": "John Smith", "tags": "This Post, Has Been Tagged", "body_html": "I like articles
Yea, I like posting them through REST.
", "published_at": "2011-03-24T11:45:47-04:00Z", "image": { "src": "http:www.example.com/rails_logo.gif" } } }
HTTP/1.1 201 Created { "article": { "id": 1051293783, "title": "My new Article title", "created_at": "2017-07-24T19:16:23-04:00Z", "body_html": "I like articles
Yea, I like posting them through REST.
", "blog_id": 241253187, "author": "John Smith", "user_id": null, "published_at": "2011-03-24T11:45:47-04:00Z", "updated_at": "2017-07-24T19:16:23-04:00Z", "summary_html": null, "template_suffix": null, "handle": "my-new-article-title", "tags": "Has Been Tagged, This Post", "image": { "created_at": "2017-07-24T19:16:23-04:00Z", "attachment": null, "filename": null, "src": "https:www.file.hstatic.net/rails_logo.gif?v=1500938183" } } }
Create a new article with a base64 encoded image.
POST https://apis.haravan.com/web/blogs/{blog_id}/articles.json
{ "article": { "title": "My new Article title", "author": "John Smith", "tags": "This Post, Has Been Tagged", "body_html": "I like articles
Yea, I like posting them through REST.
", "published_at": "2011-03-24T11:45:47-04:00Z", "image": { "attachment": "R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==\n" } } }
HTTP/1.1 201 Created { "article": { "id": 1051293789, "title": "My new Article title", "created_at": "2017-07-24T19:16:33-04:00Z", "body_html": "I like articles
Yea, I like posting them through REST.
", "blog_id": 241253187, "author": "John Smith", "user_id": null, "published_at": "2011-03-24T11:45:47-04:00Z", "updated_at": "2017-07-24T19:16:33-04:00Z", "summary_html": null, "template_suffix": null, "handle": "my-new-article-title", "tags": "Has Been Tagged, This Post", "image": { "created_at": "2017-07-24T19:16:33-04:00Z", "attachment": null, "filename": null, "src": "https:www.file.hstatic.net/df3e567d6f16d040326c7a0ea29a4f41.gif?v=1500938193" } } }
Update an existing article of a blog.
Update an existing article of a blog.
PUT https://apis.haravan.com/web/blogs/241253187.json
{ "article": { "id": 134645308, "title": "My new Title", "author": "Your name", "tags": "Tags, Will Be, Updated", "body_html": "Look, I can even update through a web service.
", "published_at": "2011-03-24T11:45:47-04:00Z" } }
HTTP/1.1 200 OK { "article": { "id": 134645308, "title": "My new Title", "created_at": "2008-07-31T20:00:00-04:00Z", "body_html": "Look, I can even update through a web service.
", "blog_id": 241253187, "author": "Your name", "user_id": null, "published_at": "2011-03-24T11:45:47-04:00Z", "updated_at": "2017-07-24T19:16:22-04:00Z", "summary_html": null, "template_suffix": null, "handle": "get-on-the-train-now", "tags": "Tags, Updated, Will Be", "image": { "created_at": "2017-07-24T19:09:43-04:00Z", "attachment": null, "filename": null, "src": "https:www.file.hstatic.net/imac.jpg?v=1500937783" } } }
Delete an article of a blog.
Delete an article of a blog.
DELETE https://apis.haravan.com/web/blogs/241253187/articles/134645308.json
{}
HTTP/1.1 200 OK {}