Find source entities related to a target entity
GET {{baseUrl}}/api/relation/:relationName/to/:targetType/:targetKey/from/:sourceType?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 users that have a 'collaborator'
relationship to a piece of content with an ID of '1234':
GET https://your-domain.atlassian.net/wiki/rest/api/relation/collaborator/to/content/1234/from/user
Note, 'collaborator' 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 sunt laboris","_expandable":{"relationData":"velit veniam","source":"eiusmod","target":"ea consectetur cupidatat ad adipisicing"},"_links":{},"relationData":{"createdBy":{"type":"user","accountId":"velit in exercitation laboris","accountType":"atlassian","email":"id voluptate","publicName":"deserunt","profilePicture":{"path":"ut fugiat","width":-38683687,"height":65248683,"isDefault":true},"displayName":"velit commodo ullamco ipsum","_expandable":{"operations":"id veniam","details":"pariatur","personalSpace":"enim nostrud exercitation consequat"},"_links":{},"username":"sed ullamco","userKey":"esse quis elit","operations":[{"operation":"read","targetType":"attachment"},{"operation":"read","targetType":"page"}],"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":-57606158,"key":"sunt cillum aute","name":"dolore elit ea in","type":"non in","status":"aliquip et anim","_expandable":{"settings":"ex dolor deserunt anim","metadata":"dolore qui officia Duis","operations":"sed laboris","lookAndFeel":"Duis elit dolore veniam","permissions":"dolor dolore in","icon":"reprehenderit pariatur magna labore irure","description":"Duis aute est fugiat laborum","theme":"qui nulla est","history":"non fugiat do","homepage":"nisi"},"_links":{},"icon":{"path":"est labore","width":-327281,"height":-79671930,"isDefault":false},"description":{"plain":{"value":"esse dolore","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":"commodo","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"}]}},"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":-56637757,"limit":1062771,"size":37957067,"_links":{}}},"operations":[{"operation":"update","targetType":"page"},{"operation":"move","targetType":"attachment"}],"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":"purge_version","targetType":"page"},"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","targetType":"page"},"anonymousAccess":false,"unlicensedAccess":false}],"settings":{"routeOverrideEnabled":true,"_links":{}},"theme":{},"lookAndFeel":{"headings":{"color":"se"},"links":{"color":"sit"},"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":"magna consequat"}},"history":{"createdDate":"1951-04-28T13:26:19.420Z"}}},"createdDate":"1945-06-14T04:34:24.316Z","friendlyCreatedDate":"reprehenderit "},"source":{},"target":{}},{"name":"consectetur Ut enim occaec","_expandable":{"relationData":"in est qui","source":"incididunt","target":"laborum magna proident amet aliquip"},"_links":{},"relationData":{"createdBy":{"type":"user","accountId":"cillu","accountType":"app (if this user is a bot user created on behalf of an Atlassian app)","email":"enim eu","publicName":"eu aute in","profilePicture":{"path":"non","width":-48499479,"height":87770702,"isDefault":true},"displayName":"dolore ut","_expandable":{"operations":"magna pariatur eiusmod nisi","details":"non consectetur","personalSpace":"nostrud"},"_links":{},"username":"anim aliquip eu amet","userKey":"dolore ullamco nostrud laboris","operations":[{"operation":"administer","targetType":"comment"},{"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":96005227,"key":"elit eiusmod ad","name":"in tempor ad","type":"et elit officia","status":"dolore","_expandable":{"settings":"ad aliquip nisi sed","metadata":"ut cupidatat","operations":"veniam sit","lookAndFeel":"anim ex","permissions":"mollit qui Lorem nulla quis","icon":"amet fugiat dolor cupidatat","description":"consequat anim","theme":"ipsum","history":"aliqua Dui","homepage":"voluptate consectetur do Ut ut"},"_links":{},"icon":{"path":"ex minim consectetur","width":-35571565,"height":-58278363,"isDefault":false},"description":{"plain":{"value":"dolor exercitation","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":"velit irure laborum id nostrud","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"}]}},"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":36294069,"limit":-28282967,"size":56940014,"_links":{}}},"operations":[{"operation":"administer","targetType":"blogpost"},{"operation":"read","targetType":"application"}],"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":"purge","targetType":"attachment"},"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":"create","targetType":"space"},"anonymousAccess":false,"unlicensedAccess":false}],"settings":{"routeOverrideEnabled":false,"_links":{}},"theme":{},"lookAndFeel":{"headings":{"color":"dolore consequat occaeca"},"links":{"color":"occaecat ut sit"},"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":"deserunt Duis laborum ad"}},"history":{"createdDate":"1977-01-29T01:15:06.769Z"}}},"createdDate":"2018-11-14T12:56:13.456Z","friendlyCreatedDate":"reprehenderit laborum"},"source":{},"target":{}}],"start":-48357202,"limit":5335291,"size":43833338,"_links":{}}