SpyREST

Supported by Mashape

Home » demo.wp-api.org Versions » v2 Resources » posts » GET /wp-json/wp/v2/posts/{:post-id}

GET /wp-json/wp/v2/posts/{:post-id}

Description

Response Fields

Name Type Description
id Integer
date String (Time ISO8601)
date_gmt String (Time ISO8601)
guid.rendered String
modified String (Time ISO8601)
modified_gmt String (Time ISO8601)
slug String
type String
link String
title.rendered String
content.rendered String
excerpt.rendered String
author Integer
featured_image Integer
comment_status String
ping_status String
sticky Boolean
format String
_links.self Array
_links.self[].href String
_links.collection Array
_links.collection[].href String
_links.author Array
_links.author[].embeddable Boolean
_links.author[].href String
_links.replies Array
_links.replies[].embeddable Boolean
_links.replies[].href String
_links.version-history Array
_links.version-history[].href String
_links.https://api.w.org/featuredmedia Array
_links.https://api.w.org/featuredmedia[].embeddable Boolean
_links.https://api.w.org/featuredmedia[].href String
_links.https://api.w.org/attachment Array
_links.https://api.w.org/attachment[].href String
_links.https://api.w.org/term Array
_links.https://api.w.org/term[].taxonomy String
_links.https://api.w.org/term[].embeddable Boolean
_links.https://api.w.org/term[].href String
_links.https://api.w.org/meta Array
_links.https://api.w.org/meta[].embeddable Boolean
_links.https://api.w.org/meta[].href String
Write
Preview

Examples

Gets a single post

Gets a single post

Recorded at

2015-11-21 23:24:03 UTC

Try with cURL

Request URL

GET /wp-json/wp/v2/posts/36      

Request Headers

proxy-connection: Keep-Alive
accept: */*
user-agent: curl/7.37.1
      

Response Headers

transfer-encoding: chunked
x-amz-cf-id: JqSbGdTTxcNUXAigwPS82v_mt-n_GcXvgExhpIFPae0JSvnDyKhbCA==
via: 1.1 34f77fdb42f2812b05b6efb323f0ea4c.cloudfront.net (CloudFront)
x-cache: Miss from cloudfront
vary: Cookie
x-powered-by: PHP/5.5.9-1ubuntu4.9
x-ec2-instance-id: i-1789a8bd
x-content-type-options: nosniff
x-cached: MISS
x-batcache: MISS
server: nginx/1.4.6 (Ubuntu)
link: <http://demo.wp-api.org/2015/11/20/iste-exercitationem-sint-et-eaque-ad-libero/>; rel="alternate"; type=text/html
date: Sat, 21 Nov 2015 23:24:02 GMT
allow: GET
access-control-expose-headers: X-WP-Total, X-WP-TotalPages
access-control-allow-headers: Authorization
connection: close
content-length: 2708
content-type: application/json; charset=UTF-8
      

Response Body

Shortened for readability

{
  "id": 36,
  "date": "2015-11-20T13:09:26",
  "date_gmt": "2015-11-20T13:09:26",
  "guid": {
    "rendered": "http://wp-api-de-elbinsta-n5pu020s13lb-1748419096.eu-west-1.elb.amazonaws.com/?p=36"
  },
  "modified": "2015-11-20T13:09:26",
  "modified_gmt": "2015-11-20T13:09:26",
  "slug": "iste-exercitationem-sint-et-eaque-ad-libero",
  "type": "post",
  "link": "http://demo.wp-api.org/2015/11/20/iste-exercitationem-sint-et-eaque-ad-libero/",
  "title": {
    "rendered": "Iste exercitationem sint et eaque ad libero"
  },
  "content": {
    "rendered": "<h5>Ut aut quod veritatis quam. Quo assumenda explicabo impedit. Doloremque autem tenetur totam quam aperiam necessitatibus qui</h5>\n<hr>\n<img class=\"alignleft\" alt=\"Dolores id qui ad.\" src=\"http://placehold.it/527x421/\"></p>\n<ol>\n<li>Facere inventore</li>\n<li>Consequatur et et unde dolor</li>\n<li>Omnis quae molestias officiis amet</li>\n<li>Incidunt</li>\n</ol>\n<h3>Dolor quisquam ratione quia velit. Commodi maiores aperiam exercitationem numquam et occaecati. Itaque qui velit vel iste</h3>\n<hr>\n"
  },
  "excerpt": {
    "rendered": "<p>Ut aut quod veritatis quam. Quo assumenda explicabo impedit. Doloremque autem tenetur totam quam aperiam necessitatibus qui Facere inventore Consequatur et et unde dolor Omnis quae molestias officiis amet Incidunt Dolor quisquam ratione quia velit. Commodi maiores aperiam exercitationem numquam et occaecati. Itaque qui velit vel iste</p>\n"
  },
  "author": 41,
  "featured_image": 35,
  "comment_status": "open",
  "ping_status": "open",
  "sticky": false,
  "format": "standard",
  "_links": {
    "self": [
      {
        "href": "http://demo.wp-api.org/wp-json/wp/v2/posts/36"
      }
    ],
    "collection": [
      {
        "href": "http://demo.wp-api.org/wp-json/wp/v2/posts"
      }
    ],
    "author": [
      {
        "embeddable": true,
        "href": "http://demo.wp-api.org/wp-json/wp/v2/users/41"
      }
    ],
    "replies": [
      {
        "embeddable": true,
        "href": "http://demo.wp-api.org/wp-json/wp/v2/comments?post=36"
      }
    ],
    "version-history": [
      {
        "href": "http://demo.wp-api.org/wp-json/wp/v2/posts/36/revisions"
      }
    ],
    "https://api.w.org/featuredmedia": [
      {
        "embeddable": true,
        "href": "http://demo.wp-api.org/wp-json/wp/v2/media/35"
      }
    ],
    "https://api.w.org/attachment": [
      {
        "href": "http://demo.wp-api.org/wp-json/wp/v2/media?post_parent=36"
      }
    ],
    "https://api.w.org/term": [
      {
        "taxonomy": "category",
        "embeddable": true,
        "href": "http://demo.wp-api.org/wp-json/wp/v2/posts/36/terms/category"
      },
      {
        "taxonomy": "post_tag",
        "embeddable": true,
        "href": "http://demo.wp-api.org/wp-json/wp/v2/posts/36/terms/tag"
      }
    ],
    "https://api.w.org/meta": [
      {
        "embeddable": true,
        "href": "http://demo.wp-api.org/wp-json/wp/v2/posts/36/meta"
      }
    ]
  }
}