Creating a content group link
Request
To create (or update) one or more content group links (that is, to add one or more resources (editorial contents, editorial channels, or other content groups) to one or more content group), send a PUT request to:
https://<host>:<port>/metadata/content/v1/contentGroupsLinks
CPM also provides endpoints for getting and deleting content group links.
See Content and Product Manager (CPM) API documentation: content v1.
Headers
Content-Type: application/json
Mandatory arguments
The request body consists of a contentGroupLinkSet
block that contains an array of one or more objects, each of which contains:
- A
contentGroupRefSet
block containing an array of one or more blocks, each of which identifies a content group to which the resource is being added. Each one contains either:- An
id
that identifies the content group, or - Both a
providerId
and aproviderResourceId
that identify the content group
- An
- A
resourceRef
block that identifies the resource that is being added to the content group(s). This contains:- Either:
- An
id
that identifies the resource, or - Both a
providerId
and aproviderResourceId
that identify the resource
- An
type
– the type of the resource being added. One of:editorialContent
editorialChannel
contentGroup
- Either:
Example
A PUT request with this payload adds the specified editorial content to the specified content group:
{
"contentGroupLinkSet": [
{
"contentGroupRefSet": [
{
"providerId": "GLOBAL",
"providerResourceId": "cg5"
}
],
"resourceRef": {
"providerId": "GLOBAL",
"providerResourceId": "ech01",
"type": "editorialContent"
}
}
]
}
Response
A successful request returns an HTTP 200 status.
A bad request returns an HTTP 400 status.
See also
For full details of this API, see Content and Product Manager (CPM) API documentation: content v2.