addRestrictions method
Future<ContentRestrictionArray>
addRestrictions({
- required String id,
- List<
String> ? expand, - required ContentRestrictionAddOrUpdateArray body,
Adds restrictions to a piece of content. Note, this does not change any existing restrictions on the content.
Permissions required: Permission to edit the content.
Implementation
Future<ContentRestrictionArray> addRestrictions(
{required String id,
List<String>? expand,
required ContentRestrictionAddOrUpdateArray body}) async {
return ContentRestrictionArray.fromJson(await _client.send(
'post',
'wiki/rest/api/content/{id}/restriction',
pathParameters: {
'id': id,
},
queryParameters: {
if (expand != null) 'expand': expand.map((e) => e).join(','),
},
body: body.toJson(),
));
}