Skip to content
atlassian-dc-mcp
Esc
↑↓navigate↵open⌘Jpreview

Get Descendants

Returns a map of the descendants of a piece of Content. Content can have multiple types of descendants - for example a Page can have descendants that are also Pages, but it can also have Comments and Attachments.

The ContentType(s) of the descendants returned is specified by the expand query parameter in the request - this parameter can include expands for multiple descendant types. If no types are included in the expand parameter, the map returned will just list the descendant types that are available to be expanded for the Content referenced by the id path parameter.

Currently the only supported descendants are comment descendants of non-comment Content.

Example request URI(s):

http://example.com/confluence/rest/api/content/1234/descendant

http://example.com/confluence/rest/api/content/1234/descendant?expand=comment.body.VIEW

http://example.com/confluence/rest/api/content/1234/descendant?expand=comment

GET/rest/api/content/{id}/descendant
Path parameters
idstringrequired

the ID of the Content the User is attempting to view the descendants for.

Query parameters
expandstring

a comma separated list of properties to expand on the descendants.

Responses
200

Returns a JSON map representing multiple ordered collections of content descendants,keyed by content type.

resultsContent[]
Show properties
Array of Content
idstring
typestring
statusstring
titlestring
linksobject
spaceSpace
Show properties
idinteger<int64>
keystring
namestring
statusstring
iconReferenceIcon
Show properties
expandedboolean
idPropertiesobject
descriptionobject
homepageReferenceContent
Show properties
expandedboolean
idPropertiesobject
linksobject
typestring
metadataobject
retentionPolicyReferenceSpaceRetentionPolicy
Show properties
expandedboolean
idPropertiesobject
historyHistory
Show properties
previousVersionReferenceVersion
Show properties
expandedboolean
idPropertiesobject
nextVersionReferenceVersion
Show properties
expandedboolean
idPropertiesobject
lastUpdatedReferenceVersion
Show properties
expandedboolean
idPropertiesobject
latestboolean
createdByPerson
Show properties
profilePictureIcon
Show properties
pathstring
widthinteger<int32>
heightinteger<int32>
isDefaultboolean
displayNamestring
typestring
createdDatestring<date-time>
contributorsReferenceContributors
Show properties
expandedboolean
idPropertiesobject
lastUpdatedRefReferenceVersion
Show properties
expandedboolean
idPropertiesobject
nextVersionRefReferenceVersion
Show properties
expandedboolean
idPropertiesobject
previousVersionRefReferenceVersion
Show properties
expandedboolean
idPropertiesobject
contentParentRefReferenceContent
Show properties
expandedboolean
idPropertiesobject
versionVersion
Show properties
byPerson
Show properties
profilePictureIcon
displayNamestring
typestring
whenstring<date-time>
messagestring
numberinteger<int32>
minorEditboolean
hiddenboolean
syncRevstring
contentReferenceContent
Show properties
expandedboolean
idPropertiesobject
contentRefReferenceContent
Show properties
expandedboolean
idPropertiesobject
ancestorsContent[]
Show properties
Array of Content
Circular reference to Content.
positioninteger<int32>
operationsOperationCheckResult[]
Show properties
Array of OperationCheckResult
operationstring
targetTypestring
childrenobject
descendantsobject
containerContainer
bodyobject
metadataobject
extensionsobject
restrictionsobject
historyRefReferenceHistory
Show properties
expandedboolean
idPropertiesobject
spaceRefReferenceSpace
Show properties
expandedboolean
idPropertiesobject
containerRefReferenceContainer
Show properties
expandedboolean
idPropertiesobject
versionRefReferenceVersion
Show properties
expandedboolean
idPropertiesobject
startnumber
limitnumber
sizenumber
_linksobject
Show properties
basestring
selfstring
contextstring
nextstring
prevstring
404

Returned if there is no content with the given id, or if the calling user does not have permission to view the content.

statusCodeinteger<int32>
dataValidationResult
Show properties
authorizedboolean
validboolean
errorsobject
successfulboolean
allowedInReadOnlyModeboolean
messagestring
reasonstring
Try it
Server
Parameters
Request
curl -X GET 'http://example.com:7990/confluence/rest/api/content/string/descendant' \
  -H 'Accept: application/json'
Response
{
  "results": [
    {
      "id": "123456",
      "type": "page",
      "status": "current",
      "title": "My Page",
      "links": {},
      "space": {
        "id": 123456,
        "key": "TEST",
        "name": "Test Space",
        "status": "current",
        "icon": {
          "expanded": true,
          "idProperties": {}
        },
        "description": {},
        "homepage": {
          "expanded": true,
          "idProperties": {}
        },
        "links": {},
        "type": "global",
        "metadata": {
          "labels": [
            "label1",
            "label2"
          ]
        },
        "retentionPolicy": {
          "expanded": true,
          "idProperties": {}
        }
      },
      "history": {
        "previousVersion": {
          "expanded": true,
          "idProperties": {}
        },
        "nextVersion": {
          "expanded": true,
          "idProperties": {}
        },
        "lastUpdated": {
          "expanded": true,
          "idProperties": {}
        },
        "latest": true,
        "createdBy": {
          "profilePicture": {
            "path": "http://www.example.com/path/to/image.png",
            "width": 16,
            "height": 16,
            "isDefault": true
          },
          "displayName": "Joe Smith",
          "type": "string"
        },
        "createdDate": "2020-01-01T00:00:00Z",
        "contributors": {
          "expanded": true,
          "idProperties": {}
        },
        "lastUpdatedRef": {
          "expanded": true,
          "idProperties": {}
        },
        "nextVersionRef": {
          "expanded": true,
          "idProperties": {}
        },
        "previousVersionRef": {
          "expanded": true,
          "idProperties": {}
        },
        "contentParentRef": {
          "expanded": true,
          "idProperties": {}
        }
      },
      "version": {
        "by": {
          "profilePicture": {
            "path": "http://www.example.com/path/to/image.png",
            "width": 16,
            "height": 16,
            "isDefault": true
          },
          "displayName": "Joe Smith",
          "type": "string"
        },
        "when": "2020-01-01T00:00:00Z",
        "message": "A message",
        "number": 1,
        "minorEdit": true,
        "hidden": true,
        "syncRev": "123456",
        "content": {
          "expanded": true,
          "idProperties": {}
        },
        "contentRef": {
          "expanded": true,
          "idProperties": {}
        }
      },
      "ancestors": [
        {}
      ],
      "position": 1,
      "operations": [
        {
          "operation": "read",
          "targetType": "page"
        }
      ],
      "children": {},
      "descendants": {},
      "container": null,
      "body": {},
      "metadata": {
        "key": "value"
      },
      "extensions": {
        "key": "value"
      },
      "restrictions": {
        "use": {
          "operation": "use",
          "restrictions": []
        }
      },
      "historyRef": {
        "expanded": true,
        "idProperties": {}
      },
      "spaceRef": {
        "expanded": true,
        "idProperties": {}
      },
      "containerRef": {
        "expanded": true,
        "idProperties": {}
      },
      "versionRef": {
        "expanded": true,
        "idProperties": {}
      }
    }
  ],
  "start": 25,
  "limit": 25,
  "size": 25,
  "_links": {
    "base": "http://localhost:8085/rest/api",
    "self": "http://localhost:8085/rest/api",
    "context": "http://localhost:8085/rest/api",
    "next": "http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50",
    "prev": "http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"
  }
}

Was this page helpful?