Skip to main content
Skip table of contents

Creating a node link

To create a node link (that is, an entity that allows you to associate multiple nodes with a single editorial content or content group), send a POST request to:

https://<host>:<port>/metadata/content/v1/nodeLinks

A POST request creates a single node link. A PUT request can create multiple node links as a single request.

  • Content-Type: application/json

All of the following arguments are part of the request body:

  • nodeRef – the node the node link applies to. Either:
    • id – the ID of the node, or
    • Both providerId and providerResourceId
  • resourceRef – the entity (editorial or content group) being linked to the node.
    • Either:
      • id – the ID of the editorial/content group, or
      • Both providerId and providerResourceId
    • type – the type of the entity, one of:
      • editorialContent
      • contentGroup

All of the following arguments are part of the request body:

  • Either:
    • id – the ID of the node link, or
    • Both providerId and providerResourceId
  • publishToEndUser – flag to indicate to a client app whether it should display the content to the user or not (true or false)
  • start – node link validity start date
  • end – node link validity end date
  • previewDate – preview date for use by client apps
  • technicalType – the technical type of the node link
  • metadataSet – a set of locale-specific metadata blocks, each of which has:
    • locale* – the locale for the metadata element. If locale is set to none, the metadata block that it applies to is the default – it is the one that is used if there is no metadata block for the user's locale.
    • metadata* – a block containing one or more key/value pairs in the following form:
      [{
      "key": "<key_name>",
      "value": "<value>"
      }]

A POST request with this payload creates a node link that links the specified editorial content to the specified node:

CODE
{
   "nodeRef": {
      "id": "NODE_1"
   },
   "resourceRef": {
      "type": "editorialContent",
      "id": "9462470"
   }
}

A successful request returns an HTTP 200 status.

A bad request returns an HTTP 400 status.

For full details of this API, see Content and Product Manager (CPM) API documentation: content v1.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.