Class ConfluenceRestClientRelationConsumerApi

java.lang.Object
io.github.primelib.confluence4j.rest.v1.client.ConfluenceRestClientRelationConsumerApi

@Generated("io.github.primelib.primecodegen") public class ConfluenceRestClientRelationConsumerApi extends Object
ConfluenceRestClientRelationConsumerApi
  • Constructor Details

  • Method Details

    • GetRelationByRelationNameFromBySourceTypeBySourceKeyToByTargetTypeV1

      public RelationArray GetRelationByRelationNameFromBySourceTypeBySourceKeyToByTargetTypeV1(Consumer<GetRelationByRelationNameFromBySourceTypeBySourceKeyToByTargetTypeV1OperationSpec> spec)
      GetRelationByRelationNameFromBySourceTypeBySourceKeyToByTargetTypeV1 Find target entities related to a source entity 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 source entity.
      Parameters:
      spec - a consumer that creates the payload for this operation. Supports the following properties:
      • relationName: The name of the relationship. This method supports relationships created via [Create relationship](#api-wiki-rest-api-relation-relationname-from-sourcetype-sourcekey-to-targettype-targetkey-put). Note, this method does not support 'like' or 'favourite' relationships.
      • sourceType: The source entity type of the relationship.
      • sourceKey: 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](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - If `sourceType` is 'content', then specify the content ID. - If `sourceType` is 'space', then specify the space key.
      • targetType: The target entity type of the relationship.
      • sourceStatus: The status of the source. This parameter is only used when the `sourceType` is 'content'.
      • targetStatus: The status of the target. This parameter is only used when the `targetType` is 'content'.
      • sourceVersion: The version of the source. This parameter is only used when the `sourceType` is 'content' and the `sourceStatus` is 'historical'.
      • targetVersion: The version of the target. This parameter is only used when the `targetType` is 'content' and the `targetStatus` is 'historical'.
      • expand: 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: The starting index of the returned relationships.
      • limit: The maximum number of relationships to return per page. Note, this may be restricted by fixed system limits.
    • GetRelationByRelationNameFromBySourceTypeBySourceKeyToByTargetTypeByTargetKeyV1

      public Relation GetRelationByRelationNameFromBySourceTypeBySourceKeyToByTargetTypeByTargetKeyV1(Consumer<GetRelationByRelationNameFromBySourceTypeBySourceKeyToByTargetTypeByTargetKeyV1OperationSpec> spec)
      GetRelationByRelationNameFromBySourceTypeBySourceKeyToByTargetTypeByTargetKeyV1 Find relationship from source to target 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.
      Parameters:
      spec - a consumer that creates the payload for this operation. Supports the following properties:
      • relationName: 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](#api-wiki-rest-api-relation-relationname-from-sourcetype-sourcekey-to-targettype-targetkey-put).
      • sourceType: The source entity type of the relationship. This must be 'user', if the `relationName` is 'favourite'.
      • sourceKey: - 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](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - If `sourceType` is 'content', then specify the content ID. - If `sourceType` is 'space', then specify the space key.
      • targetType: The target entity type of the relationship. This must be 'space' or 'content', if the `relationName` is 'favourite'.
      • targetKey: 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](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - If `targetType` is 'content', then specify the content ID. - If `targetType` is 'space', then specify the space key.
      • sourceStatus: The status of the source. This parameter is only used when the `sourceType` is 'content'.
      • targetStatus: The status of the target. This parameter is only used when the `targetType` is 'content'.
      • sourceVersion: The version of the source. This parameter is only used when the `sourceType` is 'content' and the `sourceStatus` is 'historical'.
      • targetVersion: The version of the target. This parameter is only used when the `targetType` is 'content' and the `targetStatus` is 'historical'.
      • expand: 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.
    • PutRelationByRelationNameFromBySourceTypeBySourceKeyToByTargetTypeByTargetKeyV1

      public Relation PutRelationByRelationNameFromBySourceTypeBySourceKeyToByTargetTypeByTargetKeyV1(Consumer<PutRelationByRelationNameFromBySourceTypeBySourceKeyToByTargetTypeByTargetKeyV1OperationSpec> spec)
      PutRelationByRelationNameFromBySourceTypeBySourceKeyToByTargetTypeByTargetKeyV1 Create relationship 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](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can use' global permission).
      Parameters:
      spec - a consumer that creates the payload for this operation. Supports the following properties:
      • relationName: 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.
      • sourceType: The source entity type of the relationship. This must be 'user', if the `relationName` is 'favourite'.
      • sourceKey: - 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](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - If `sourceType` is 'content', then specify the content ID. - If `sourceType` is 'space', then specify the space key.
      • targetType: The target entity type of the relationship. This must be 'space' or 'content', if the `relationName` is 'favourite'.
      • targetKey: - 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](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - If `targetType` is 'content', then specify the content ID. - If `targetType` is 'space', then specify the space key.
      • sourceStatus: The status of the source. This parameter is only used when the `sourceType` is 'content'.
      • targetStatus: The status of the target. This parameter is only used when the `targetType` is 'content'.
      • sourceVersion: The version of the source. This parameter is only used when the `sourceType` is 'content' and the `sourceStatus` is 'historical'.
      • targetVersion: The version of the target. This parameter is only used when the `targetType` is 'content' and the `targetStatus` is 'historical'.
    • DeleteRelationByRelationNameFromBySourceTypeBySourceKeyToByTargetTypeByTargetKeyV1

      public void DeleteRelationByRelationNameFromBySourceTypeBySourceKeyToByTargetTypeByTargetKeyV1(Consumer<DeleteRelationByRelationNameFromBySourceTypeBySourceKeyToByTargetTypeByTargetKeyV1OperationSpec> spec)
      DeleteRelationByRelationNameFromBySourceTypeBySourceKeyToByTargetTypeByTargetKeyV1 Delete relationship 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.
      Parameters:
      spec - a consumer that creates the payload for this operation. Supports the following properties:
      • relationName: The name of the relationship.
      • sourceType: The source entity type of the relationship. This must be 'user', if the `relationName` is 'favourite'.
      • sourceKey: - 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](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - If `sourceType` is 'content', then specify the content ID. - If `sourceType` is 'space', then specify the space key.
      • targetType: The target entity type of the relationship. This must be 'space' or 'content', if the `relationName` is 'favourite'.
      • targetKey: - 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](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - If `targetType` is 'content', then specify the content ID. - If `targetType` is 'space', then specify the space key.
      • sourceStatus: The status of the source. This parameter is only used when the `sourceType` is 'content'.
      • targetStatus: The status of the target. This parameter is only used when the `targetType` is 'content'.
      • sourceVersion: The version of the source. This parameter is only used when the `sourceType` is 'content' and the `sourceStatus` is 'historical'.
      • targetVersion: The version of the target. This parameter is only used when the `targetType` is 'content' and the `targetStatus` is 'historical'.
    • GetRelationByRelationNameToByTargetTypeByTargetKeyFromBySourceTypeV1

      public RelationArray GetRelationByRelationNameToByTargetTypeByTargetKeyFromBySourceTypeV1(Consumer<GetRelationByRelationNameToByTargetTypeByTargetKeyFromBySourceTypeV1OperationSpec> spec)
      GetRelationByRelationNameToByTargetTypeByTargetKeyFromBySourceTypeV1 Find source entities related to a target entity 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 view both the target entity and source entity.
      Parameters:
      spec - a consumer that creates the payload for this operation. Supports the following properties:
      • relationName: The name of the relationship. This method supports relationships created via [Create relationship](#api-wiki-rest-api-relation-relationname-from-sourcetype-sourcekey-to-targettype-targetkey-put). Note, this method does not support 'like' or 'favourite' relationships.
      • sourceType: The source entity type of the relationship.
      • targetType: The target entity type of the relationship.
      • targetKey: 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](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - If `targetType` is 'content', then specify the content ID. - If `targetType` is 'space', then specify the space key.
      • sourceStatus: The status of the source. This parameter is only used when the `sourceType` is 'content'.
      • targetStatus: The status of the target. This parameter is only used when the `targetType` is 'content'.
      • sourceVersion: The version of the source. This parameter is only used when the `sourceType` is 'content' and the `sourceStatus` is 'historical'.
      • targetVersion: The version of the target. This parameter is only used when the `targetType` is 'content' and the `targetStatus` is 'historical'.
      • expand: 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: The starting index of the returned relationships.
      • limit: The maximum number of relationships to return per page. Note, this may be restricted by fixed system limits.