API Documentation

posts/getContext Beta

This method is currently under development and subject to change.

Returns the hierarchal tree of a post (all parents).

URL

https://disqus.com/api/3.0/posts/getContext.json

Accessibility

public key, secret key

Supported request methods

GET

Supported formats

json, jsonp, rss

Requires authentication

no

Rate limited

inherits global rate limit

Arguments

Required

  • post

    Looks up a post by ID

Optional

  • depth

    Defaults to 10

    Minimum value of 1
    Maximum value of 10

  • related allows multiple

    Defaults to []

    You may specify relations to include with your response.
    Choices: forum, thread

Example Responses

Expand json

GET post=3

{
  "code": 0,
  "response": [
    {
      "isJuliaFlagged": true,
      "isFlagged": false,
      "forum": "bobross",
      "parent": null,
      "author": {
        "username": "disqus_api",
        "about": "",
        "name": "disqus_api",
        "url": "",
        "isFollowing": false,
        "isFollowedBy": false,
        "profileUrl": "http://disqus.com/disqus_api/",
        "emailHash": "67f79ed8e10b74abf07a8dfe101bbab2",
        "avatar": {
          "permalink": "http://disqus.com/api/users/avatars/disqus_api.jpg",
          "cache": "http://mediacdn.disqus.com/1091/images/noavatar92.png"
        },
        "id": "1",
        "isAnonymous": false,
        "email": "example@disqus.com"
      },
      "media": [],
      "isApproved": true,
      "dislikes": 0,
      "raw_message": "\"We want happy paintings. Happy paintings. If you want sad things, watch the news.\"",
      "id": "1",
      "thread": "1",
      "points": 1,
      "createdAt": "2008-06-10T01:32:08",
      "isEdited": false,
      "message": "\"We want happy paintings. Happy paintings. If you want sad things, watch the news.\"",
      "isHighlighted": false,
      "ipAddress": "127.0.0.1",
      "isSpam": false,
      "isDeleted": false,
      "likes": 1
    },
    {
      "isJuliaFlagged": true,
      "isFlagged": false,
      "forum": "bobross",
      "parent": 1,
      "author": {
        "username": "disqus_api",
        "about": "",
        "name": "disqus_api",
        "url": "",
        "isFollowing": false,
        "isFollowedBy": false,
        "profileUrl": "http://disqus.com/disqus_api/",
        "emailHash": "67f79ed8e10b74abf07a8dfe101bbab2",
        "avatar": {
          "permalink": "http://disqus.com/api/users/avatars/disqus_api.jpg",
          "cache": "http://mediacdn.disqus.com/1091/images/noavatar92.png"
        },
        "id": "1",
        "isAnonymous": false,
        "email": "example@disqus.com"
      },
      "media": [],
      "isApproved": true,
      "dislikes": 0,
      "raw_message": "\"Happy little bush.\"",
      "id": "3",
      "thread": "1",
      "points": 0,
      "createdAt": "2008-06-10T01:45:27",
      "isEdited": false,
      "message": "\"Happy little bush.\"",
      "isHighlighted": false,
      "ipAddress": "127.0.0.1",
      "isSpam": false,
      "isDeleted": false,
      "likes": 0
    }
  ]
}
Expand json

GET post=1&related=thread

{
  "code": 0,
  "response": [
    {
      "isJuliaFlagged": true,
      "isFlagged": false,
      "forum": "bobross",
      "parent": null,
      "author": {
        "username": "disqus_api",
        "about": "",
        "name": "disqus_api",
        "url": "",
        "isFollowing": false,
        "isFollowedBy": false,
        "profileUrl": "http://disqus.com/disqus_api/",
        "emailHash": "67f79ed8e10b74abf07a8dfe101bbab2",
        "avatar": {
          "permalink": "http://disqus.com/api/users/avatars/disqus_api.jpg",
          "cache": "http://mediacdn.disqus.com/1091/images/noavatar92.png"
        },
        "id": "1",
        "isAnonymous": false,
        "email": "example@disqus.com"
      },
      "media": [],
      "isApproved": true,
      "dislikes": 0,
      "raw_message": "\"We want happy paintings. Happy paintings. If you want sad things, watch the news.\"",
      "id": "1",
      "thread": {
        "category": "1",
        "reactions": 0,
        "identifiers": [
          "my-identifier"
        ],
        "forum": "bobross",
        "title": "Happy Accidents",
        "dislikes": 0,
        "isDeleted": false,
        "author": "1",
        "userScore": 0,
        "id": "1",
        "isClosed": false,
        "posts": 13,
        "link": null,
        "likes": 0,
        "message": "\"If you've painted before you know that we don't make mistakes -- we have happy accidents.\"",
        "ipAddress": "127.0.0.1",
        "slug": "happy_accidents",
        "createdAt": "2008-06-10T01:31:43"
      },
      "points": 1,
      "createdAt": "2008-06-10T01:32:08",
      "isEdited": false,
      "message": "\"We want happy paintings. Happy paintings. If you want sad things, watch the news.\"",
      "isHighlighted": false,
      "ipAddress": "127.0.0.1",
      "isSpam": false,
      "isDeleted": false,
      "likes": 1
    }
  ]
}