Create a Collection

post

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

Creates a collection with the given payload.

Request

Supported Media Types
Path Parameters
Query Parameters
Header Parameters
Body ()
Creates a collection with the given information in the payload. The fields id, 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

201 Response

Created.
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.

409 Response

Conflict.

500 Response

Internal server error.
Back to Top

Examples

The following example shows how to create a new collection by submitting a POST request on the REST resource 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}/collections'

Example:

This creates a simple collection with name, description and a list of channels in an existing repository. Where F264EF72737B35991E381047D5B43D87656640771B3C is id of existing repository and CCB59F44D5015819EBC0F86A2B3133B22638AF433F1E, CCB70F44D5015819EBC0F86A2B3133B22638AF123V8A are id's of existing channel associated to the repository. Replace payload with your own data.

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

Request Body

{
    "name": "Collection2",
    "description": "Collection2 description.",
    "channels": [
    {
      "id": "CCB59F44D5015819EBC0F86A2B3133B22638AF433F1E"
    },
    {
      "id": "CCB70F44D5015819EBC0F86A2B3133B22638AF123V8A"
    }
    ]
    }
Back to Top