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

Article properties

author

"author": "John"

The name of the author of this article.

blog_id

"blog_id": 241253187

A unique numeric identifier for the blog containing the article.

body_html

"body_html": "I have no idea what to write about!"

The text of the body of the article, complete with HTML markup.

created_at

"created_at": "2021-05-13T07:29:20.808Z"

The date and time (ISO 8601 format) when the article was created.

id

"id": 989034056

A unique numeric identifier for the article.

handle

"handle": "apple-blog"

A human-friendly unique string for an article is automatically generated from its title. It is used in the article's URL.

image

"image": null

The article image.

published

"published" : false

States whether or not the article is visible. Valid values are "true" for published or "false" for hidden.

published_at

"published_at": "2021-05-06T10:27:33.385Z"

The date and time (ISO 8601 format) when the article was published.

summary_html

"summary_html": null

The text of the summary of the article, complete with HTML markup.

tags

"tags": "tagsational"

Tags are additional short descriptors formatted as a string of comma-separated values. For example, if an article has three tags: tag1, tag2, tag3.

template_suffix

"template_suffix": null

States the name of the template an article is using if it is using an alternate template. If an article is using the default article.liquid template, the value returned is "null".

title

"title": "Some crazy article I'm coming up with"

The title of the article.

user_id

"user_id": 799407056

A unique numeric identifier for the author of the article.

updated_at

"updated_at": "2021-05-13T07:29:20.808Z"

The date and time (ISO 8601 format) when the article was last updated.

Endpoints

GET https://apis.haravan.com/web/blogs/{blog_id}/articles.json

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

  • published - Show only published articles
  • unpublished - Show only unpublished articles
  • any - Show all articles (default)

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

View response

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

View response

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": ""
    }
  ]
}
GET https://apis.haravan.com/com/blogs/{blog_id}/articles/count.json

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

View response

HTTP/1.1 200 OK
{
    "count": 20
}
GET https://apis.haravan.com/web/blogs/{blog_id}/articles/{article_id}.json

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

View response

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" } } }
GET https://apis.haravan.com/web/articles/tags.json

Retrieves a list of all the tags of articles.

Retrieves a list of all the tags of articles.

GET https://apis.haravan.com/web/articles/tags.json

View response

HTTP/1.1 200 OK
{
  "tags": [
    "Announcing"
  ]
}
GET https://apis.haravan.com/web/articles/authors.json

Retrieves a list of all the authors of articles.

Retrieves a list of all the authors of articles.

GET https://apis.haravan.com/web/articles/authors.json

View response

HTTP/1.1 200 OK
{
  "authors": [
    "dennis",
    "John",
    "Rob",
    "Dennis"
  ]
}

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" } } }

View response

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" } } }

View response

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.

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" } }

View response

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 https://apis.haravan.com/web/blogs/241253187/articles/134645308.json

{}

View response

HTTP/1.1 200 OK
{}