Get started now
GET

GET posts

https://yourdomain.com/api/v1/posts

Headers

KeyValueDescription
Content-Typeapplication/json

Query

FieldsTypeDescriptionRequired
statusArrayStatus of the post (planned / in progress / completed)false
sortStringSort type (latest / oldest / top / trending)false

Example

https://yourdomain.com/api/v1/posts?status=planned&sort=oldest

Response

FieldsTypeDescription
status.codeIntegerResponse code from server
status.typeStringResponse status type (success/fail)
postsArrayArray of object with filtered posts

You can see post data object in createPost.

Example

{
  "status": {
    "code": 200,
    "type": "success"
  },
  "posts": [
    {
      // post data oboject
    },
    {
      // post data oboject
    }
  ]
}