Return a post

GET /posts/{id}

Return a post with postId equals to id.

Path parameters

  • id string Required

    The postId requested by user.

Responses

  • 200

    A blog posts in JSON format

    Hide response attributes Show response attributes 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/{id}
curl \
 -X GET https://api.example.com/v1/posts/{id}
Response examples (200)
{
  "userId": 1,
  "id": 1,
  "title": "The First Post",
  "body": "we are building a blog post API using OpenAPI Specification."
}
Response examples (200)
{
  "id": 1,
  "body": "we are building a blog post API using OpenAPI Specification.",
  "title": "The First Post",
  "userId": 1
}