Find target entities related to a source entity
GET {{baseUrl}}/api/relation/:relationName/from/:sourceType/:sourceKey/to/:targetType?sourceStatus=<string>&targetStatus=<string>&sourceVersion=<integer>&targetVersion=<integer>&expand=<string>&expand=<string>&start=0&limit=25
Returns all target entities that have a particular relationship to the source entity. Note, relationships are one way.
For example, the following method finds all content that the current user
has an 'ignore' relationship with:
GET https://your-domain.atlassian.net/wiki/rest/api/relation/ignore/from/user/current/to/content
Note, 'ignore' is an example custom relationship type.
Permissions required: Permission to view both the target entity and source entity.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
sourceStatus | string | The status of the source. This parameter is only used when the | |
sourceType is 'content'. | |||
targetStatus | string | The status of the target. This parameter is only used when the | |
targetType is 'content'. | |||
sourceVersion | string | The version of the source. This parameter is only used when the | |
sourceType is 'content' and the sourceStatus is 'historical'. | |||
targetVersion | string | The version of the target. This parameter is only used when the | |
targetType is 'content' and the targetStatus is 'historical'. | |||
expand | string | A multi-value parameter indicating which properties of the response | |
object to expand. |
-
relationData
returns information about the relationship, such as who created it and when it was created. -
source
returns the source entity. -
target
returns the target entity. | |expand
| string | | A multi-value parameter indicating which properties of the response object to expand. -
relationData
returns information about the relationship, such as who created it and when it was created. -
source
returns the source entity. -
target
returns the target entity. | |start
| number | | The starting index of the returned relationships. | |limit
| number | | The maximum number of relationships to return per page. Note, this may be restricted by fixed system limits. |
RESPONSES
status: OK
{"results":[{"name":"eiusmod dolore","_expandable":{"relationData":"officia","source":"ut aliqua mollit in laboris","target":"voluptate"},"_links":{},"relationData":{"createdBy":{"type":"user","accountId":"proident nisi","accountType":"app (if this user is a bot user created on behalf of an Atlassian app)","email":"officia sit","publicName":"culpa","profilePicture":{"path":"nulla eiusmod","width":57363774,"height":-21452074,"isDefault":true},"displayName":"laborum officia","_expandable":{"operations":"aliqua elit","details":"sed ex commodo ullamco","personalSpace":"est ut in ad"},"_links":{},"username":"Excepteur proident","userKey":"voluptate fugiat nostrud laboris mollit","operations":[{"operation":"copy","targetType":"blogpost"},{"operation":"export","targetType":"space"}],"details":{"business":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"personal":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"personalSpace":{"id":30176725,"key":"qui culpa sit officia irure","name":"mollit","type":"qui dolor consectetur et","status":"exercitation est magna in","_expandable":{"settings":"id incididunt magna","metadata":"minim qui consectetur","operations":"eu est i","lookAndFeel":"deserunt quis","permissions":"aliquip ut magna","icon":"non","description":"irure aute occaecat","theme":"officia","history":"pariatur Ut dolore adipisicing magna","homepage":"sit sint magna cillum"},"_links":{},"icon":{"path":"est culpa consequ","width":28391664,"height":6678264,"isDefault":true},"description":{"plain":{"value":"ad incididunt ex","representation":"view","embeddedContent":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}]},"view":{"value":"magna aliqua exe","representation":"plain","embeddedContent":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}]}},"homepage":{"value":"\u003cCircular reference to #/components/schemas/Content detected\u003e"},"metadata":{"labels":{"results":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"start":-68962586,"limit":86790834,"size":-46961334,"_links":{}}},"operations":[{"operation":"create","targetType":"space"},{"operation":"move","targetType":"space"}],"permissions":[{"subjects":{"_expandable":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"user":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"group":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"operation":{"operation":"export","targetType":"blogpost"},"anonymousAccess":false,"unlicensedAccess":false},{"subjects":{"_expandable":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"user":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"group":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"operation":{"operation":"purge_version","targetType":"space"},"anonymousAccess":false,"unlicensedAccess":false}],"settings":{"routeOverrideEnabled":false,"_links":{}},"theme":{},"lookAndFeel":{"headings":{"color":"qui magna sint"},"links":{"color":"tempor in aliqua"},"menus":{"hoverOrFocus":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"color":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"header":{"backgroundColor":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"button":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"primaryNavigation":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"secondaryNavigation":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"search":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"content":{"screen":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"container":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"header":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"body":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"bordersAndDividers":{"color":"ipsum cillum elit"}},"history":{"createdDate":"2019-06-08T15:36:45.578Z"}}},"createdDate":"1942-04-10T17:03:01.544Z","friendlyCreatedDate":"mollit v"},"source":{},"target":{}},{"name":"dolor quis in","_expandable":{"relationData":"cillum in","source":"irure","target":"do in"},"_links":{},"relationData":{"createdBy":{"type":"anonymous","accountId":"laboris reprehenderit Ut","accountType":"atlassian","email":"dolor","publicName":"Lorem sit ad","profilePicture":{"path":"in","width":79807980,"height":-29772365,"isDefault":false},"displayName":"fugiat consectetur et","_expandable":{"operations":"est eu","details":"in adipisicing","personalSpace":"adipisicing in et id"},"_links":{},"username":"tempor consequat deserunt aliqua","userKey":"dolore officia","operations":[{"operation":"use","targetType":"attachment"},{"operation":"copy","targetType":"space"}],"details":{"business":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"personal":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"personalSpace":{"id":46964980,"key":"cillum adipisicing","name":"nulla laboris","type":"proident","status":"dolor","_expandable":{"settings":"ad Lorem anim dolore","metadata":"non ipsum","operations":"ea aliqua sint","lookAndFeel":"irure minim voluptate sed","permissions":"ullamco ","icon":"aliquip in et irure","description":"ad sed","theme":"minim occaecat cillum","history":"cupidatat aute ad","homepage":"ex aliquip"},"_links":{},"icon":{"path":"sed dolor eiusmod sit","width":-41978384,"height":66964221,"isDefault":true},"description":{"plain":{"value":"velit sit fugiat in","representation":"plain","embeddedContent":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}]},"view":{"value":"non est","representation":"plain","embeddedContent":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}]}},"homepage":{"value":"\u003cCircular reference to #/components/schemas/Content detected\u003e"},"metadata":{"labels":{"results":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"start":8721050,"limit":-31508499,"size":-70758219,"_links":{}}},"operations":[{"operation":"purge_version","targetType":"page"},{"operation":"administer","targetType":"comment"}],"permissions":[{"subjects":{"_expandable":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"user":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"group":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"operation":{"operation":"update","targetType":"application"},"anonymousAccess":false,"unlicensedAccess":false},{"subjects":{"_expandable":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"user":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"group":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"operation":{"operation":"move","targetType":"blogpost"},"anonymousAccess":false,"unlicensedAccess":false}],"settings":{"routeOverrideEnabled":false,"_links":{}},"theme":{},"lookAndFeel":{"headings":{"color":"aute proident"},"links":{"color":"u"},"menus":{"hoverOrFocus":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"color":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"header":{"backgroundColor":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"button":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"primaryNavigation":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"secondaryNavigation":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"search":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"content":{"screen":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"container":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"header":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"body":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"bordersAndDividers":{"color":"amet"}},"history":{"createdDate":"1959-02-24T05:04:21.176Z"}}},"createdDate":"1955-10-26T09:32:56.560Z","friendlyCreatedDate":"amet "},"source":{},"target":{}}],"start":-92854805,"limit":-69118531,"size":3210316,"_links":{}}