{ "opencollection": "1.0.0", "info": { "name": "Atlassian Admin Account Relation API", "version": "1.0.0" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Relation", "type": "folder" }, "items": [ { "info": { "name": "Atlassian Find Target Entities Related to a Source Entity", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/wiki/rest/api/relation/:relationName/from/:sourceType/:sourceKey/to/:targetType", "params": [ { "name": "relationName", "value": "", "type": "path", "description": "The name of the relationship. This method supports relationships created via\n[Create relationship](#api-wiki-rest-api-relation-relationname-from-sourcetype-sourcekey-to-targettype-targetkey-put).\nNote, this method does not support 'like' or 'favourite' relationships." }, { "name": "sourceType", "value": "", "type": "path", "description": "The source entity type of the relationship." }, { "name": "sourceKey", "value": "", "type": "path", "description": "The identifier for the source entity:\n\n- If `sourceType` is `user`, then specify either `current` (logged-in user), the user key of the user, or\nthe account ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See the\n[migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/)\nfor details.\n- If `sourceType` is 'content', then specify the content ID.\n- If `sourceType` is 'space', then specify the space key." }, { "name": "targetType", "value": "", "type": "path", "description": "The target entity type of the relationship." }, { "name": "sourceStatus", "value": "", "type": "query", "description": "The status of the source. This parameter is only used when the\n`sourceType` is 'content'." }, { "name": "targetStatus", "value": "", "type": "query", "description": "The status of the target. This parameter is only used when the\n`targetType` is 'content'." }, { "name": "sourceVersion", "value": "", "type": "query", "description": "The version of the source. This parameter is only used when the\n`sourceType` is 'content' and the `sourceStatus` is 'historical'." }, { "name": "targetVersion", "value": "", "type": "query", "description": "The version of the target. This parameter is only used when the\n`targetType` is 'content' and the `targetStatus` is 'historical'." }, { "name": "expand", "value": "", "type": "query", "description": "A multi-value parameter indicating which properties of the response\nobject to expand.\n\n- `relationData` returns information about the relationship, such as\nwho created it and when it was created.\n- `source` returns the source entity.\n- `target` returns the target entity." }, { "name": "start", "value": "", "type": "query", "description": "The starting index of the returned relationships." }, { "name": "limit", "value": "", "type": "query", "description": "The maximum number of relationships to return per page.\nNote, this may be restricted by fixed system limits." } ] }, "docs": "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 /wiki/rest/api/relation/ignore/from/user/current/to/content`
Note, 'ignore' is an example custom relationship type.

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
Permission to view both the target entity and sourc" }, { "info": { "name": "Atlassian Find Relationship From Source to Target", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/wiki/rest/api/relation/:relationName/from/:sourceType/:sourceKey/to/:targetType/:targetKey", "params": [ { "name": "relationName", "value": "", "type": "path", "description": "The name of the relationship. This method supports the 'favourite'\n(i.e. 'save for later') relationship as well as any other relationship\ntypes created via [Create relationship](#api-wiki-rest-api-relation-relationname-from-sourcetype-sourcekey-to-targettype-targetkey-put)." }, { "name": "sourceType", "value": "", "type": "path", "description": "The source entity type of the relationship. This must be 'user', if\nthe `relationName` is 'favourite'." }, { "name": "sourceKey", "value": "", "type": "path", "description": "- The identifier for the source entity:\n\n- If `sourceType` is `user`, then specify either `current` (logged-in user), the user key of the user, or\nthe account ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See the\n[migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/)\nfor details.\n- If `sourceType` is 'content', then specify the content ID.\n- If `sourceType` is 'space', then specify the space key." }, { "name": "targetType", "value": "", "type": "path", "description": "The target entity type of the relationship. This must be 'space' or\n'content', if the `relationName` is 'favourite'." }, { "name": "targetKey", "value": "", "type": "path", "description": "The identifier for the target entity:\n\n- If `targetType` is `user`, then specify either `current` (logged-in user), the user key of the user, or\nthe account ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See the\n[migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/)\nfor details.\n- If `targetType` is 'content', then specify the content ID.\n- If `targetType` is 'space', then specify the space key." }, { "name": "sourceStatus", "value": "", "type": "query", "description": "The status of the source. This parameter is only used when the\n`sourceType` is 'content'." }, { "name": "targetStatus", "value": "", "type": "query", "description": "The status of the target. This parameter is only used when the\n`targetType` is 'content'." }, { "name": "sourceVersion", "value": "", "type": "query", "description": "The version of the source. This parameter is only used when the\n`sourceType` is 'content' and the `sourceStatus` is 'historical'." }, { "name": "targetVersion", "value": "", "type": "query", "description": "The version of the target. This parameter is only used when the\n`targetType` is 'content' and the `targetStatus` is 'historical'." }, { "name": "expand", "value": "", "type": "query", "description": "A multi-value parameter indicating which properties of the response\nobject to expand.\n\n- `relationData` returns information about the relationship, such as\nwho created it and when it was created.\n- `source` returns the source entity.\n- `target` returns the target entity." } ] }, "docs": "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 /wiki/rest/api/relation/favourite/from/user/current/to/content/123`

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
Permission to view both the target entity and source entity." }, { "info": { "name": "Atlassian Create Relationship", "type": "http" }, "http": { "method": "PUT", "url": "https://api.atlassian.com/wiki/rest/api/relation/:relationName/from/:sourceType/:sourceKey/to/:targetType/:targetKey", "params": [ { "name": "relationName", "value": "", "type": "path", "description": "The name of the relationship. This method supports the 'favourite'\n(i.e. 'save for later') relationship. You can also specify any other\nvalue for this parameter to create a custom relationship type." }, { "name": "sourceType", "value": "", "type": "path", "description": "The source entity type of the relationship. This must be 'user', if\nthe `relationName` is 'favourite'." }, { "name": "sourceKey", "value": "", "type": "path", "description": "- The identifier for the source entity:\n\n- If `sourceType` is 'user', then specify either 'current' (logged-in\n user) or the user key.\n- If `sourceType` is 'content', then specify the content ID.\n- If `sourceType` is 'space', then specify the space key." }, { "name": "targetType", "value": "", "type": "path", "description": "The target entity type of the relationship. This must be 'space' or\n'content', if the `relationName` is 'favourite'." }, { "name": "targetKey", "value": "", "type": "path", "description": "- The identifier for the target entity:\n\n- If `sourceType` is 'user', then specify either 'current' (logged-in\n user) or the user key.\n- If `sourceType` is 'content', then specify the content ID.\n- If `sourceType` is 'space', then specify the space key." }, { "name": "sourceStatus", "value": "", "type": "query", "description": "The status of the source. This parameter is only used when the\n`sourceType` is 'content'." }, { "name": "targetStatus", "value": "", "type": "query", "description": "The status of the target. This parameter is only used when the\n`targetType` is 'content'." }, { "name": "sourceVersion", "value": "", "type": "query", "description": "The version of the source. This parameter is only used when the\n`sourceType` is 'content' and the `sourceStatus` is 'historical'." }, { "name": "targetVersion", "value": "", "type": "query", "description": "The version of the target. This parameter is only used when the\n`targetType` is 'content' and the `targetStatus` is 'historical'." } ] }, "docs": "Creates a relationship between two entities (user, space, content). The
'favourite' relationship is supported by default, but you can use this method
to create any type of relationship between two entities.

For example, the following method creates a 'sibling' relationship between
two pieces of content:
`GET /wiki/rest/api/relation/sibling/from/content/123/to/content/456`

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
Permission to access the " }, { "info": { "name": "Atlassian Delete Relationship", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.atlassian.com/wiki/rest/api/relation/:relationName/from/:sourceType/:sourceKey/to/:targetType/:targetKey", "params": [ { "name": "relationName", "value": "", "type": "path", "description": "The name of the relationship." }, { "name": "sourceType", "value": "", "type": "path", "description": "The source entity type of the relationship. This must be 'user', if\nthe `relationName` is 'favourite'." }, { "name": "sourceKey", "value": "", "type": "path", "description": "- The identifier for the source entity:\n\n- If `sourceType` is 'user', then specify either 'current' (logged-in\n user) or the user key.\n- If `sourceType` is 'content', then specify the content ID.\n- If `sourceType` is 'space', then specify the space key." }, { "name": "targetType", "value": "", "type": "path", "description": "The target entity type of the relationship. This must be 'space' or\n'content', if the `relationName` is 'favourite'." }, { "name": "targetKey", "value": "", "type": "path", "description": "- The identifier for the target entity:\n\n- If `sourceType` is 'user', then specify either 'current' (logged-in\n user) or the user key.\n- If `sourceType` is 'content', then specify the content ID.\n- If `sourceType` is 'space', then specify the space key." }, { "name": "sourceStatus", "value": "", "type": "query", "description": "The status of the source. This parameter is only used when the\n`sourceType` is 'content'." }, { "name": "targetStatus", "value": "", "type": "query", "description": "The status of the target. This parameter is only used when the\n`targetType` is 'content'." }, { "name": "sourceVersion", "value": "", "type": "query", "description": "The version of the source. This parameter is only used when the\n`sourceType` is 'content' and the `sourceStatus` is 'historical'." }, { "name": "targetVersion", "value": "", "type": "query", "description": "The version of the target. This parameter is only used when the\n`targetType` is 'content' and the `targetStatus` is 'historical'." } ] }, "docs": "Deletes a relationship between two entities (user, space, content).

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
Permission to access the Confluence site ('Can use' global permission).
For favourite relationships, the current user can only delete their own
favourite relationships. A space administrator can delete favourite
relationships for any user." }, { "info": { "name": "Atlassian Find Source Entities Related to a Target Entity", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/wiki/rest/api/relation/:relationName/to/:targetType/:targetKey/from/:sourceType", "params": [ { "name": "relationName", "value": "", "type": "path", "description": "The name of the relationship. This method supports relationships created via\n[Create relationship](#api-wiki-rest-api-relation-relationname-from-sourcetype-sourcekey-to-targettype-targetkey-put).\nNote, this method does not support 'like' or 'favourite' relationships." }, { "name": "sourceType", "value": "", "type": "path", "description": "The source entity type of the relationship." }, { "name": "targetType", "value": "", "type": "path", "description": "The target entity type of the relationship." }, { "name": "targetKey", "value": "", "type": "path", "description": "The identifier for the target entity:\n\n- If `targetType` is `user`, then specify either `current` (logged-in user), the user key of the user, or\nthe account ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See the\n[migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/)\nfor details.\n- If `targetType` is 'content', then specify the content ID.\n- If `targetType` is 'space', then specify the space key." }, { "name": "sourceStatus", "value": "", "type": "query", "description": "The status of the source. This parameter is only used when the\n`sourceType` is 'content'." }, { "name": "targetStatus", "value": "", "type": "query", "description": "The status of the target. This parameter is only used when the\n`targetType` is 'content'." }, { "name": "sourceVersion", "value": "", "type": "query", "description": "The version of the source. This parameter is only used when the\n`sourceType` is 'content' and the `sourceStatus` is 'historical'." }, { "name": "targetVersion", "value": "", "type": "query", "description": "The version of the target. This parameter is only used when the\n`targetType` is 'content' and the `targetStatus` is 'historical'." }, { "name": "expand", "value": "", "type": "query", "description": "A multi-value parameter indicating which properties of the response\nobject to expand.\n\n- `relationData` returns information about the relationship, such as\nwho created it and when it was created.\n- `source` returns the source entity.\n- `target` returns the target entity." }, { "name": "start", "value": "", "type": "query", "description": "The starting index of the returned relationships." }, { "name": "limit", "value": "", "type": "query", "description": "The maximum number of relationships to return per page.\nNote, this may be restricted by fixed system limits." } ] }, "docs": "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 /wiki/rest/api/relation/collaborator/to/content/1234/from/user`
Note, 'collaborator' is an example custom relationship type.

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
Permission to vie" } ] } ], "bundled": true }