Introduction

We are listing the available API endpoints for habitate.io. These can be used to build additional feature and create linked services around your community.

In case you need more help you can get in touch with the team, developer-support at habitate.io

Get a post

Endpoint

GET /api/v1/posts/{post_id}

Url path variables

Possible values Comments
post_id The post_id to be viewed.


Additional Notes

The checks and conditional on who can post in what board, will be evaluated against the API user rather than the author of the post.

Response parameters

{
  "post_id": 163,
  "board_id": 1,
  "headline": "Upgradable secondary concept Mouse",
  "post_short_text": "Delectus aut deserunt in aliquid. Dolorem totam suscipit ab. Veniam saepe sit. Animi totam inventore deserunt",
  "content": "Delectus aut deserunt in aliquid. Dolorem totam suscipit ab. Veniam saepe sit. Animi totam inventore deserunt aut ut ab recusandae facilis reprehenderit. Et qui et debitis itaque odit. Cum animi qui qui sunt. Fish",
  "clean_text": "Delectus aut deserunt in aliquid. Dolorem totam suscipit ab. Veniam saepe sit. Animi totam inventore deserunt aut ut ab recusandae facilis reprehenderit. Et qui et debitis itaque odit. Cum animi qui qui sunt. Fish",
  "post_status": 15,
  "comment_count": 0,
  "reply_count": 0,
  "react_count": 1,
  "reactions": {
    "s2": 1
  },
  "view_count": 1,
  "last_edited_at": "2022-04-21T12:49:20.356592Z",
  "created_at": "2022-04-21T12:49:20.095Z",
  "last_modified_at": "2022-04-21T12:48:41Z",
  "user": {
    "user_id": 146,
    "user_avatar": "https://images.unsplash.com/photo-1558244661-d248897f7bc4",
    "username": "Alexandra",
    "msid": "146.VijCxex1IKckmzUDzYXlQycufs3"
  }
}

user and other user info corresponds to the primary author of the post.

Understanding post_status values

Refer to this section

Understanding reactions object

The object has keys which represents the slots, i.e. the first emoji reaction is considered as slot 1 and the corresponding key is s1. The value of these keys represent the reaction count for the respective emoji(consider here a slot). The reason for considering the emoji reaction as slots is because the icons shown on the ui are configurable.

  "reactions": {
    "s2": 1,
    "s3": 2,
    "s4": 300
  }