Update a Collection

put

/content/management/api/v1.1/repositories/{id}/collections/{collectionId}

Update a collection with the given payload.

Request

Supported Media Types
Path Parameters
Query Parameters
Header Parameters
Body ()
Updates a collection with the given information in the payload. The fields createdBy, createdDate, updatedBy, updatedDate and links will be ignored even if given in the payload.
Root Schema : Collection
Type: object
Collection
Show Source
Nested Schema : channels
Type: array
Channels associated with the collection.
Show Source
Nested Schema : date
Type: object
date
Show Source
Nested Schema : RepositoryIdentifier
Type: object
RepositoryIdentifier
Show Source
Nested Schema : ruleGroups
Type: array
Show Source
Nested Schema : ChannelInCollections
Type: object
ChannelInCollections
Show Source
Nested Schema : RuleGroup
Type: object
rule group definition
Show Source
Nested Schema : ruleSet
Type: array
set of rules associated with the rule group
Show Source
Nested Schema : RuleSet
Type: object
Set of rules or conditions
Show Source
Nested Schema : Rule
Type: object
Show Source
Nested Schema : ruleSet
Type: array
The child or sub rule set associated with the given rule set
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : Collection
Type: object
Collection
Show Source
Nested Schema : channels
Type: array
Channels associated with the collection.
Show Source
Nested Schema : date
Type: object
date
Show Source
Nested Schema : RepositoryIdentifier
Type: object
RepositoryIdentifier
Show Source
Nested Schema : ruleGroups
Type: array
Show Source
Nested Schema : ChannelInCollections
Type: object
ChannelInCollections
Show Source
Nested Schema : RuleGroup
Type: object
rule group definition
Show Source
Nested Schema : ruleSet
Type: array
set of rules associated with the rule group
Show Source
Nested Schema : RuleSet
Type: object
Set of rules or conditions
Show Source
Nested Schema : Rule
Type: object
Show Source
Nested Schema : ruleSet
Type: array
The child or sub rule set associated with the given rule set
Show Source

400 Response

Bad request.

403 Response

Forbidden.

404 Response

Not found.

500 Response

Internal server error.
Back to Top

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"
    }
    ]
    }
Back to Top