Validate Editorial Role
/content/management/api/v1.1/repositories/{id}/assignRoleValidate
Request
- application/json
-
id: string
id of the repository.
-
links(optional): string
This parameter accepts a comma-separated list of link names. By default, this parameter gives all the links applicable. Possible values are: self, canonical, describedby
-
X-Requested-With: string
A custom header to mitigate CSRF attacks.Allowed Values:
[ "XMLHttpRequest" ]
object
-
description(optional):
string
Description of a custom editorial role.
-
id:
string
ID of a custom editorial role.
-
name(optional):
string
Name of a custom editorial role.
Response
- application/json
200 Response
object
-
contentPrivileges(optional):
array contentPrivileges
The privileges of asset type defined by a custom editorial role.
-
createdBy(optional):
string
Created by user of a custom editorial role.
-
createdDate(optional):
object date
date
-
description(optional):
string
Description of a custom editorial role.
-
hasPrivilegeGranted(optional):
boolean
Whether a custom editorial role grants any privilege under the context of a given repository.
-
id(optional):
string
ID of a custom editorial role.
-
isUsed(optional):
boolean
Whether a custom editorial role is being used by a given repository.
-
links(optional):
array links
Links of a custom editorial role resource.
-
name(optional):
string
Name of a custom editorial role.
-
roleName(optional):
string
Name of the user's role on a custom editorial role.
-
taxonomyPrivileges(optional):
array taxonomyPrivileges
The privileges of taxonomy defined by a custom editorial role.
-
updatedBy(optional):
string
Updated by user of a custom editorial role.
-
updatedDate(optional):
object date
date
array
-
Array of:
object ContentPrivilege
ContentPrivilege
array
-
Array of:
object Link
Link of the resource.
array
-
Array of:
object TaxonomyPrivilege
TaxonomyPrivilege
object
-
isEnabled(optional):
boolean
Whether the privilege is enabled under the context of a repository.
-
isValid(optional):
boolean
The validness of the privilege.
-
operations(optional):
array operations
Operations.
-
typeDisplayName(optional):
string
The display name of the content type.
-
typeId(optional):
string
The id of the content type.
-
typeName(optional):
string
The name of the content type.
array
-
Array of:
string
Allowed Values:
[ "view", "update", "create", "delete" ]
object
-
href(optional):
string
The target resource's URI. It could be template URI. It is a required property in the get response.
-
mediaType(optional):
string
Media type.
-
method(optional):
string
What HTTP method can be used to access the target resource.
-
profile(optional):
string
Link to the metadata that describes the target resource.
-
rel(optional):
string
Relation type. It is a required property in the get response.
-
templated(optional):
boolean
Whether the URI is a template.
object
-
categoryId(optional):
string
The id of the category.
-
isEnabled(optional):
boolean
Whether the privilege is enabled under the context of a repository.
-
isForSiteManagement(optional):
boolean
Whether the taxonomy is for site management.
-
isSiteCategory(optional):
boolean
Whether the category is a site category.
-
isValid(optional):
boolean
The validness of the privilege.
-
nodes(optional):
array nodes
The path of the category.
-
operations(optional):
array operations
Operations.
-
taxonomyId(optional):
string
The id of the taxonomy.
-
taxonomyShortName(optional):
string
The short name of the taxonomy.
array
-
Array of:
string
Allowed Values:
[ "view", "categorize", "createsite" ]
object
-
apiName(optional):
string
The apiName of the Category node.
-
id(optional):
string
The id of the Category node.
-
name(optional):
string
The name of the Category node.
400 Response
403 Response
404 Response
500 Response
Examples
The following example shows how to validate a custom editorial role for assigning to a repository by submitting a POST request using cURL.
curl -X POST -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' 'https://host:port/content/management/api/v1.1/repositories/{id}/assignRoleValidate'
Example
/content/management/api/v1.1/repositories/7F289D0F4FD44C0382A83EFD44A355C0/assignRoleValidate
This validates the custom editorial role with id 76F2903A0C8E48BCA222E68264BE1E05 for assigning to repository with id 7F289D0F4FD44C0382A83EFD44A355C0. Request payload should define the id and optionally the name and the description of the editorial role to validate. Replace payload with your own data. For the editorial role in the response, if a type rule has a type that is not assigned to the repository, or a taxonomy rule has a taxonomy that is not assigned to the repository, that rule is marked as disabled.
Request Payload
{ "id": "76F2903A0C8E48BCA222E68264BE1E05", "name": "Role 1019B" }
Response Body
{ "id": "76F2903A0C8E48BCA222E68264BE1E05", "name": "Role 1019B", "description": "desc", "createdBy": "cecuser1", "createdDate": { "value": "2021-10-19T18:51:24.223Z", "timezone": "UTC" }, "updatedBy": "cecuser1", "updatedDate": { "value": "2021-10-19T18:51:24.223Z", "timezone": "UTC" }, "isUsed": false, "hasPrivilegeGranted": true, "contentPrivileges": [ { "typeId": "", "typeName": null, "typeDisplayName": null, "isValid": true, "isEnabled": true, "operations": [ "view" ] }, { "typeId": "EF4C64E6BF81419F9743A8A4348A69EB", "typeName": "Image", "typeDisplayName": "Image", "isValid": true, "isEnabled": true, "operations": [ "view", "update", "create", "delete" ] }, { "typeId": "49B267B515C84AD7903C5B9C34EDB09E", "typeName": "TypeAAA", "typeDisplayName": "TypeAAA", "isValid": true, "isEnabled": true, "operations": [ "view", "update", "create", "delete" ] }, { "typeId": "8CB7D974CBB74923BF40A6CA68BED145", "typeName": "TypeBBB", "typeDisplayName": "TypeBBB", "isValid": true, "isEnabled": true, "operations": [] }, { "typeId": "B228AE0D8E2E41B8924C5B9FFBCAF039", "typeName": "TypeCCC", "typeDisplayName": "TypeCCC", "isValid": true, "isEnabled": false, "operations": [ "view", "update", "create", "delete" ] } ], "taxonomyPrivileges": [ { "taxonomyId": null, "taxonomyShortName": null, "isForSiteManagement": false, "categoryId": "", "nodes": null, "isSiteCategory": false, "isValid": true, "isEnabled": true, "operations": [ "view" ] } ], "links": [ { "href": "http://<hostname>/content/management/api/v1.1/repositories/7F289D0F4FD44C0382A83EFD44A355C0/assignRoleValidate", "rel": "self", "method": "POST", "mediaType": "application/json" }, { "href": "http://<hostname>/content/management/api/v1.1/repositories/7F289D0F4FD44C0382A83EFD44A355C0/assignRoleValidate", "rel": "canonical", "method": "POST", "mediaType": "application/json" }, { "href": "http://<hostname>/content/management/api/v1.1/metadata-catalog/repositories/7F289D0F4FD44C0382A83EFD44A355C0/assignRoleValidate", "rel": "describedby", "method": "GET", "mediaType": "application/json" } ] }