Update a Collection
/content/management/api/v1.1/repositories/{id}/collections/{collectionId}
Request
- application/json
-
collectionId: string
id of the collection.
-
id: string
Repository id parameter for collections.
-
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
-
channels(optional):
array channels
Channels associated with the collection.
-
createdBy(optional):
string
createdBy user of the Collection.
-
createdDate(optional):
object date
date
-
description(optional):
string
Description of the collection.
-
id(optional):
string
id of the collection. It is a required property in the get response and put request whereas it is not required in the post request.
-
isDynamic(optional):
boolean
true
-
links(optional):
array links
Links
-
name(optional):
string
Name of the collection. It is a required property in the get response and post/put request.
-
repository(optional):
object RepositoryIdentifier
RepositoryIdentifier
-
roleName(optional):
string
Name of the user's role on the collection.
-
ruleGroups(optional):
array ruleGroups
-
updatedBy(optional):
string
updatedBy user of the Collection.
-
updatedDate(optional):
object date
date
array
-
Array of:
object ChannelInCollections
ChannelInCollections
object
-
id(optional):
string
id of the collection repository. It is a required property in the get response.
-
name(optional):
string
Name of the collection repository. It is a required property in the get response.
-
role(optional):
string
Role on the collection repository.
object
-
id(optional):
string
id of the channel.
-
name(optional):
string
Name of the channel.
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
-
assetType(optional):
string
asset type associated with the rule group, all rules within the rule group are based on properties related to this asset typeExample:
File
-
conjunction(optional):
string
the operator to be used while joining this rule group with a previous groupExample:
OR
-
ruleSet(optional):
array ruleSet
set of rules associated with the rule group
array
-
Array of:
object RuleSet
Set of rules or conditions
object
-
conjunction(optional):
string
The operator to be used when combining this rule set with an existing rule setExample:
and
-
rule(optional):
object Rule
-
ruleSet(optional):
array ruleSet
The child or sub rule set associated with the given rule set
array
-
Array of:
object RuleSet
Set of rules or conditions
Response
- application/json
200 Response
object
-
channels(optional):
array channels
Channels associated with the collection.
-
createdBy(optional):
string
createdBy user of the Collection.
-
createdDate(optional):
object date
date
-
description(optional):
string
Description of the collection.
-
id(optional):
string
id of the collection. It is a required property in the get response and put request whereas it is not required in the post request.
-
isDynamic(optional):
boolean
true
-
links(optional):
array links
Links
-
name(optional):
string
Name of the collection. It is a required property in the get response and post/put request.
-
repository(optional):
object RepositoryIdentifier
RepositoryIdentifier
-
roleName(optional):
string
Name of the user's role on the collection.
-
ruleGroups(optional):
array ruleGroups
-
updatedBy(optional):
string
updatedBy user of the Collection.
-
updatedDate(optional):
object date
date
array
-
Array of:
object ChannelInCollections
ChannelInCollections
object
-
id(optional):
string
id of the collection repository. It is a required property in the get response.
-
name(optional):
string
Name of the collection repository. It is a required property in the get response.
-
role(optional):
string
Role on the collection repository.
object
-
id(optional):
string
id of the channel.
-
name(optional):
string
Name of the channel.
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
-
assetType(optional):
string
asset type associated with the rule group, all rules within the rule group are based on properties related to this asset typeExample:
File
-
conjunction(optional):
string
the operator to be used while joining this rule group with a previous groupExample:
OR
-
ruleSet(optional):
array ruleSet
set of rules associated with the rule group
array
-
Array of:
object RuleSet
Set of rules or conditions
object
-
conjunction(optional):
string
The operator to be used when combining this rule set with an existing rule setExample:
and
-
rule(optional):
object Rule
-
ruleSet(optional):
array ruleSet
The child or sub rule set associated with the given rule set
array
-
Array of:
object RuleSet
Set of rules or conditions
400 Response
403 Response
404 Response
500 Response
Examples
The following example shows how to search all items by submitting a GET request on the REST resource using cURL.
curl -X PUT -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' 'http://host:port/content/management/api/v1.1/repositories/{id}/collections/{collectionId}'
Example 1:
This updates an existing collection with name or its description in an existing repository. Where F264EF72737B35991E381047D5B43D87656640771B3C is an id of existing repository and O9F1CD681C619D182B27A9FA3154E81BEEA1E8587407 is an id of existing collection associated with the repository. Replace payload with your own data.
/content/management/api/v1.1/repositories/{id}/collections/O9F1CD681C619D182B27A9FA3154E81BEEA1E8587407
Response Body
{ "id": "O9F1CD681C619D182B27A9FA3154E81BEEA1E8587407", "name": "Collection1_updatedName", "description": "Collection1 description_ some Update." }
Example 2:
This updates a collection by adding a list of channels in an existing repository. Where F264EF72737B35991E381047D5B43D87656640771B3C is an id of existing repository, O9F1CD681C619D182B27A9FA3154E81BEEA1E8587407 is an id of existing collection associated with repository and CC03EC1531E0E39F6D6BA75CEE430DDBEA79EDD5F5B0, CCB59F44D5015819EBC0F86A2B3133B22638AF433F1E,CCB70F44D5015819EBC0F86A2B3133B22638AF123V8A are id's of an existing channel associated to the repository. Replace payload with your own data.
/content/management/api/v1.1/repositories/{id}/collections/O9F1CD681C619D182B27A9FA3154E81BEEA1E8587407
Response Body
{ "id": "O9F1CD681C619D182B27A9FA3154E81BEEA1E8587407", "name": "Collection2", "description": "Collection2 description.", "channels": [ { "id": "CCB59F44D5015819EBC0F86A2B3133B22638AF433F1E" }, { "id": "CCB70F44D5015819EBC0F86A2B3133B22638AF123V8A" }, { "id": "CC03EC1531E0E39F6D6BA75CEE430DDBEA79EDD5F5B0" } ] }