Copy Editorial Role
post
/content/management/api/v1.1/editorialRoles/{roleId}/copy
Copy a custom editorial role.
Request
Supported Media Types
- application/json
Path Parameters
-
roleId: string
id of the custom editorial role.
Query Parameters
-
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
Header Parameters
-
X-Requested-With: string
A custom header to mitigate CSRF attacks.Allowed Values:
[ "XMLHttpRequest" ]
bean of the request payload to copy a custom editorial role.
Root Schema : EditorialRoleOperation
Type:
object
EditorialRoleOperation
Show Source
-
description(optional):
string
Description of the custom editorial role to be created by this operation.
-
name:
string
Name of the custom editorial role to be created by this operation.
Response
Supported Media Types
- application/json
201 Response
Created.
Root Schema : EditorialRole
Type:
object
EditorialRole
Show Source
-
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
Nested Schema : contentPrivileges
Type:
array
The privileges of asset type defined by a custom editorial role.
Show Source
-
Array of:
object ContentPrivilege
ContentPrivilege
Nested Schema : links
Type:
array
Links of a custom editorial role resource.
Show Source
-
Array of:
object Link
Link of the resource.
Nested Schema : taxonomyPrivileges
Type:
array
The privileges of taxonomy defined by a custom editorial role.
Show Source
-
Array of:
object TaxonomyPrivilege
TaxonomyPrivilege
Nested Schema : ContentPrivilege
Type:
object
ContentPrivilege
Show Source
-
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.
Nested Schema : operations
Type:
array
Operations.
Show Source
-
Array of:
string
Allowed Values:
[ "view", "update", "create", "delete" ]
Nested Schema : Link
Type:
object
Link of the resource.
Show Source
-
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.
Nested Schema : TaxonomyPrivilege
Type:
object
TaxonomyPrivilege
Show Source
-
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.
Nested Schema : operations
Type:
array
Operations.
Show Source
-
Array of:
string
Allowed Values:
[ "view", "categorize", "createsite" ]
Nested Schema : CategoryNodeBean
Type:
Show Source
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
Bad request.
403 Response
Forbidden.
404 Response
Not found.
500 Response
Internal server error.
Examples
The following example shows how to copy a custom editorial role 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/editorialRoles/{roleId}/copy'
Example
/content/management/api/v1.1/editorialRoles/8788B03F236340A8A2B7ADB825ED11A9/copy
This makes a copy of the custom editorial role with id 8788B03F236340A8A2B7ADB825ED11A9. Request payload should define the name and optionally the description of the new editorial role. Replace payload with your own data.
Request Payload
{ "name": "Copied Role", "description": "copied role description" }
Request Headers
{ "Content-Type": "application/json", "X-Requested-With": "XMLHttpRequest" }
Response Body
{ "id": "1D05655BD82941009F866832F58FD4CE", "name": "Copied Role", "description": "copied role description", "createdBy": "cecuser1", "createdDate": { "value": "2021-12-14T07:14:21.536Z", "timezone": "UTC" }, "updatedBy": "cecuser1", "updatedDate": { "value": "2021-12-14T07:14:21.536Z", "timezone": "UTC" }, "roleName": "manager", "contentPrivileges": [ { "typeId": "", "typeName": null, "typeDisplayName": null, "isValid": true, "operations": [ "view" ] }, { "typeId": "EF4C64E6BF81419F9743A8A4348A69EB", "typeName": "Image", "typeDisplayName": "Image", "isValid": true, "operations": [ "view", "update", "create" ] } ], "taxonomyPrivileges": [ { "taxonomyId": null, "taxonomyShortName": null, "isForSiteManagement": false, "categoryId": "", "nodes": null, "isSiteCategory": false, "isValid": true, "operations": [ "view" ] } ], "links": [ { "href": "http://<hostname>/content/management/api/v1.1/editorialRoles/8788B03F236340A8A2B7ADB825ED11A9/copy", "rel": "self", "method": "POST", "mediaType": "application/json" }, { "href": "http://<hostname>/content/management/api/v1.1/editorialRoles/8788B03F236340A8A2B7ADB825ED11A9/copy", "rel": "canonical", "method": "POST", "mediaType": "application/json" }, { "href": "http://<hostname>/content/management/api/v1.1/metadata-catalog/editorialRoles/8788B03F236340A8A2B7ADB825ED11A9/copy", "rel": "describedby", "method": "GET", "mediaType": "application/json" } ] }