InternalCreate a new instance of the service.
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:
PUT /wiki/rest/api/relation/sibling/from/content/123/to/content/456
Permissions required: Permission to access the Confluence site ('Can use' global permission).
The name of the relationship. This method supports the 'favourite' (i.e. 'save for later') relationship. You can also specify any other value for this parameter to create a custom relationship type.
The identifier for the source entity:
If sourceType is user, then specify either current (logged-in user),
the user key of the user, or
the account ID of the user. Note that the user key has been deprecated in favor
of the account ID for this parameter. See the
migration
guide
for details.
If sourceType is 'content', then specify the content ID.
If sourceType is 'space', then specify the space key.
OptionalsourceThe status of the source. This parameter is only used when the
sourceType is 'content'.
The source entity type of the relationship. This must be 'user', if
the relationName is 'favourite'.
OptionalsourceThe version of the source. This parameter is only used when the
sourceType is 'content' and the sourceStatus is 'historical'.
The identifier for the target entity:
If targetType is user, then specify either current (logged-in user),
the user key of the user, or
the account ID of the user. Note that the user key has been deprecated in favor
of the account ID for this parameter. See the
migration
guide
for details.
If targetType is 'content', then specify the content ID.
If targetType is 'space', then specify the space key.
OptionaltargetThe status of the target. This parameter is only used when the
targetType is 'content'.
The target entity type of the relationship. This must be 'space' or
'content', if the relationName is 'favourite'.
OptionaltargetThe version of the target. This parameter is only used when the
targetType is 'content' and the targetStatus is 'historical'.
Returned if the relationship is created.
Deletes a relationship between two entities (user, space, content).
Permissions 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.
The name of the relationship.
The identifier for the source entity:
If sourceType is user, then specify either current (logged-in user),
the user key of the user, or
the account ID of the user. Note that the user key has been deprecated in favor
of the account ID for this parameter. See the
migration
guide
for details.
If sourceType is 'content', then specify the content ID.
If sourceType is 'space', then specify the space key.
OptionalsourceThe status of the source. This parameter is only used when the
sourceType is 'content'.
The source entity type of the relationship. This must be 'user', if
the relationName is 'favourite'.
OptionalsourceThe version of the source. This parameter is only used when the
sourceType is 'content' and the sourceStatus is 'historical'.
The identifier for the target entity:
If targetType is user, then specify either current (logged-in user),
the user key of the user, or
the account ID of the user. Note that the user key has been deprecated in favor
of the account ID for this parameter. See the
migration
guide
for details.
If targetType is 'content', then specify the content ID.
If targetType is 'space', then specify the space key.
OptionaltargetThe status of the target. This parameter is only used when the
targetType is 'content'.
The target entity type of the relationship. This must be 'space' or
'content', if the relationName is 'favourite'.
OptionaltargetThe version of the target. This parameter is only used when the
targetType is 'content' and the targetStatus is 'historical'.
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 required: Permission to view both the target entity and source entity.
Optionalexpand?: ("source" | "target" | "relationData")[]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.Optionallimit?: numberThe maximum number of relationships to return per page. Note, this may be restricted by fixed system limits.
The name of the relationship. This method supports relationships created via Create relationship. Note, this method does not support 'like' or 'favourite' relationships.
OptionalsourceThe status of the source. This parameter is only used when the
sourceType is 'content'.
The source entity type of the relationship.
OptionalsourceThe version of the source. This parameter is only used when the
sourceType is 'content' and the sourceStatus is 'historical'.
Optionalstart?: numberThe starting index of the returned relationships.
The identifier for the target entity:
targetType is user, then specify either current (logged-in user),
the user key of the user, or
the account ID of the user. Note that the user key has been deprecated in favor
of the account ID for this parameter. See the
migration
guide
for details.targetType is 'content', then specify the content ID.targetType is 'space', then specify the space key.OptionaltargetThe status of the target. This parameter is only used when the
targetType is 'content'.
The target entity type of the relationship.
OptionaltargetThe version of the target. This parameter is only used when the
targetType is 'content' and the targetStatus is 'historical'.
Returned if the requested relationships are returned.
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 required: Permission to view both the target entity and source entity.
Optionalexpand?: ("source" | "target" | "relationData")[]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.Optionallimit?: numberThe maximum number of relationships to return per page. Note, this may be restricted by fixed system limits.
The name of the relationship. This method supports relationships created via Create relationship. Note, this method does not support 'like' or 'favourite' relationships.
The identifier for the source entity:
sourceType is user, then specify either current (logged-in user),
the user key of the user, or
the account ID of the user. Note that the user key has been deprecated in favor
of the account ID for this parameter. See the
migration
guide
for details.sourceType is 'content', then specify the content ID.sourceType is 'space', then specify the space key.OptionalsourceThe status of the source. This parameter is only used when the
sourceType is 'content'.
The source entity type of the relationship.
OptionalsourceThe version of the source. This parameter is only used when the
sourceType is 'content' and the sourceStatus is 'historical'.
Optionalstart?: numberThe starting index of the returned relationships.
OptionaltargetThe status of the target. This parameter is only used when the
targetType is 'content'.
The target entity type of the relationship.
OptionaltargetThe version of the target. This parameter is only used when the
targetType is 'content' and the targetStatus is 'historical'.
Returned if the requested relationships are returned.
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 required: Permission to view both the target entity and source entity.
Optionalexpand?: ("source" | "target" | "relationData")[]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.The name of the relationship. This method supports the 'favourite' (i.e. 'save for later') relationship as well as any other relationship types created via Create relationship.
The identifier for the source entity:
If sourceType is user, then specify either current (logged-in user),
the user key of the user, or
the account ID of the user. Note that the user key has been deprecated in favor
of the account ID for this parameter. See the
migration
guide
for details.
If sourceType is 'content', then specify the content ID.
If sourceType is 'space', then specify the space key.
OptionalsourceThe status of the source. This parameter is only used when the
sourceType is 'content'.
The source entity type of the relationship. This must be 'user', if
the relationName is 'favourite'.
OptionalsourceThe version of the source. This parameter is only used when the
sourceType is 'content' and the sourceStatus is 'historical'.
The identifier for the target entity:
targetType is user, then specify either current (logged-in user),
the user key of the user, or
the account ID of the user. Note that the user key has been deprecated in favor
of the account ID for this parameter. See the
migration
guide
for details.targetType is 'content', then specify the content ID.targetType is 'space', then specify the space key.OptionaltargetThe status of the target. This parameter is only used when the
targetType is 'content'.
The target entity type of the relationship. This must be 'space' or
'content', if the relationName is 'favourite'.
OptionaltargetThe version of the target. This parameter is only used when the
targetType is 'content' and the targetStatus is 'historical'.
Returned if the relationship exists.
Protected Staticinitialize
See
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-relation