Find relationship from source to target
GET {{baseUrl}}/api/relation/:relationName/from/:sourceType/:sourceKey/to/:targetType/:targetKey?sourceStatus=<string>&targetStatus=<string>&sourceVersion=<integer>&targetVersion=<integer>&expand=<string>&expand=<string>
Find whether a particular type of relationship exists from a source entity to a target entity. Note, relationships are one way.
For example, you can use this method to find whether the current user has
selected a particular page as a favorite (i.e. 'save for later'):
GET https://your-domain.atlassian.net/wiki/rest/api/relation/favourite/from/user/current/to/content/123
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. |
RESPONSES
status: OK
{"name":"laborum amet","_expandable":{"relationData":"minim do quis","source":"quis velit dolore ut","target":"sint fugiat id repreh"},"_links":{},"relationData":{"createdBy":{"type":"known","accountId":"est veniam nisi","accountType":"atlassian","email":"fugiat tempor est","publicName":"proident cillum adipisicing","profilePicture":{"path":"incididunt dolore sit in eu","width":66665902,"height":7198703,"isDefault":false},"displayName":"mollit ex pariatur dolor","_expandable":{"operations":"adipisicing in","details":"id minim sed","personalSpace":"Ut"},"_links":{},"username":"proident ut incididunt consequat","userKey":"ipsum consequat sed ullamco aliquip","operations":[{"operation":"copy","targetType":"space"},{"operation":"purge_version","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":32251017,"key":"Excepteur do","name":"est velit non","type":"deserunt occaecat","status":"in commodo incididunt non","_expandable":{"settings":"ut cillum quis in","metadata":"dolore minim","operations":"anim commodo amet","lookAndFeel":"dolore Lorem","permissions":"dolore anim","icon":"deserunt ex occaecat amet","description":"cillum nostrud sint","theme":"dolor id","history":"in fugiat eu esse","homepage":"et"},"_links":{},"icon":{"path":"laboris eiusmod Excepteur eu","width":-89581460,"height":-66835718,"isDefault":true},"description":{"plain":{"value":"ut eu reprehenderit","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":"reprehenderit","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":83305188,"limit":81363289,"size":-91970205,"_links":{}}},"operations":[{"operation":"purge","targetType":"comment"},{"operation":"use","targetType":"blogpost"}],"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":"administer","targetType":"blogpost"},"anonymousAccess":false,"unlicensedAccess":false}],"settings":{"routeOverrideEnabled":true,"_links":{}},"theme":{},"lookAndFeel":{"headings":{"color":"fugiat irure nostrud"},"links":{"color":"ad velit"},"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":"do in laborum"}},"history":{"createdDate":"1968-05-01T03:07:38.118Z"}}},"createdDate":"1955-09-27T16:15:59.770Z","friendlyCreatedDate":"reprehenderit quis"},"source":{},"target":{}}