addLabelsToSpace method
Adds labels to a piece of content. Does not modify the existing labels.
Notes:
- Labels can also be added when creating content (Create content).
- Labels can be updated when updating content (Update content). This will delete the existing labels and replace them with the labels in the request.
Permissions required: Permission to update the content.
Implementation
Future<LabelArray> addLabelsToSpace(
{required String spaceKey, required List<LabelCreate> body}) async {
return LabelArray.fromJson(await _client.send(
'post',
'wiki/rest/api/space/{spaceKey}/label',
pathParameters: {
'spaceKey': spaceKey,
},
body: body.map((i) => i.toJson()).toList(),
));
}