Return all the posts

GET /posts

Return all the posts that are in our blog.

Responses

  • 200

    An array of blog posts in JSON format

    Hide response attributes Show response attributes array[object]
    • id string Required

      The post id.

    • userId string Required

      The post userId.

    • title string Required

      The title of the post

    • body string Required

      The body content of the post

GET /posts
curl \
 -X GET https://api.example.com/v1/posts
Response examples (200)
[
  {
    "userId": 1,
    "id": 1,
    "title": "First post",
    "body": "This is the first post body."
  },
  {
    "userId": 1,
    "id": 2,
    "title": "Second post",
    "body": "The second post content."
  },
  {
    "userId": 1,
    "id": 3,
    "title": "Another post",
    "body": "Other post content"
  }
]
Response examples (200)
[
  {
    "id": 1,
    "body": "This is the first post body.",
    "title": "First post",
    "userId": 1
  },
  {
    "id": 2,
    "body": "The second post content.",
    "title": "Second post",
    "userId": 1
  },
  {
    "id": 3,
    "body": "Other post content",
    "title": "Another post",
    "userId": 1
  }
]