deleteRelationship method
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.
Implementation
Future<void> deleteRelationship(
{required String relationName,
required String sourceType,
required String sourceKey,
required String targetType,
required String targetKey,
String? sourceStatus,
String? targetStatus,
int? sourceVersion,
int? targetVersion}) async {
await _client.send(
'delete',
'wiki/rest/api/relation/{relationName}/from/{sourceType}/{sourceKey}/to/{targetType}/{targetKey}',
pathParameters: {
'relationName': relationName,
'sourceType': sourceType,
'sourceKey': sourceKey,
'targetType': targetType,
'targetKey': targetKey,
},
queryParameters: {
if (sourceStatus != null) 'sourceStatus': sourceStatus,
if (targetStatus != null) 'targetStatus': targetStatus,
if (sourceVersion != null) 'sourceVersion': '$sourceVersion',
if (targetVersion != null) 'targetVersion': '$targetVersion',
},
);
}