Skip to content

Function: getRestrictionsByOperation()

ts
function getRestrictionsByOperation(client, parameters): Promise<{
[key: string]: unknown;
  _links?: {
   [key: string]: unknown;
     base?: string;
     byOperation?: string;
     collection?: string;
     context?: string;
     download?: string;
     editui?: string;
     edituiv2?: string;
     next?: string;
     prev?: string;
     self?: string;
     tinyui?: string;
     webui?: string;
  };
  read?: ContentRestriction;
  update?: ContentRestriction;
}>;

Defined in: src/v1/api/contentRestrictions.ts:120

Returns restrictions on a piece of content by operation. This method is similar to Get restrictions except that the operations are properties of the return object, rather than items in a results array.

Permissions required: Permission to view the content.

Parameters

ParameterTypeDescription
clientClient-
parameters{ expand?: ( | "content" | string & object | "restrictions.user" | "restrictions.group")[]; id: string; }-
parameters.expand?( | "content" | string & object | "restrictions.user" | "restrictions.group")[]A multi-value parameter indicating which properties of the content restrictions to expand. - restrictions.user returns the piece of content that the restrictions are applied to. Expanded by default. - restrictions.group returns the piece of content that the restrictions are applied to. Expanded by default. - content returns the piece of content that the restrictions are applied to.
parameters.idstringThe ID of the content to be queried for its restrictions.

Returns

Promise&lt;{ [key: string]: unknown; _links?: { [key: string]: unknown; base?: string; byOperation?: string; collection?: string; context?: string; download?: string; editui?: string; edituiv2?: string; next?: string; prev?: string; self?: string; tinyui?: string; webui?: string; }; read?: ContentRestriction; update?: ContentRestriction; }>