The content items in the ready status are published to the delivery system. Content items in the draft status are not published until they are moved to ready status.

Note: Changing the status of a published content item to the retired status does not unpublish it. To unpublish a content item, you must delete it.

You can access the published version of content items by providing the content Item ID in the Delivery content service API. You can find the corresponding API documentation in the Watson Content Hub API documentation.

You can obtain the Item ID from the Watson Content Hub user interface. Open the content that you want and click the API Information icon below the content.

The publishing process does not modify the content Item ID. Therefore, you can also use the Item ID value that is retrieved from the content item JSON on the authoring service to access the published version of that content item. You can access the API information from the Watson Content Hub user interface by clicking the API Information icon from the Information tab of the content form.

For example, assume that you created a content item on the authoring service with the following ID

xxxxxxxx.xxxx.xxxx.xxxxxxxxxxxx

You can access the authoring version of this content item by using the following URL pattern:

https://{API URL}/authoring/v1/content/xxxxxxxx.xxxx.xxxx.xxxxxxxxxxxx

where the API URL is constructed as Domain name/{path} where {path}= api/{Content hub ID}. You can construct the API URL by getting the Domain name and the Content hub ID from the Authoring UI or you can get the {API URL} from WCH Authoring UI. To get the Domain name, Content hub ID, or the API URL, open the User menu by clicking the drop down arrow near the user name and then click Hub information. The Hub Information dialog displays the information.

You can access the published version of this content item by using the following URL pattern:

https://{API URL}/delivery/v1/content/xxxxxxxx.xxxx.xxxx.xxxxxxxxxxxx

where the API URL is constructed as Domain name/{path} where {path}= api/{Content hub ID}. You can construct the API URL by getting the Domain name and the Content hub ID from the Authoring UI or you can get the {API URL} from WCH Authoring UI. To get the Domain name, Content hub ID, or the API URL, open the User menu by clicking the drop down arrow near the user name and then click Hub information. The Hub Information dialog displays the information.
You can use the exact same URL but by replacing the authoring path segment with delivery you can access the published content.

Note: Authentication is not required to access the published version of your content.


Content Publishing Transformations

The published versions of your content items are transformed into a delivery format that is optimized for use in client applications. The following transformations are made:

  1. Asset URL generation
  2. Image rendition URL generation
Asset URL generation

An ‘url’ property is added to the JSON objects that represent references to assets of type video or file. The value of this property is a server relative URL that directly addresses the published version of the referenced image or file asset.

Image rendition URL generation

An ‘url’ property is added to the JSON objects that represent references to image renditions. The value of this property is a server relative URL that directly addresses the published version of the referenced image or image rendition.

2 comments on"Accessing published content"

  1. If you publish a version of some content, and retrieve it via the API e.g. “get all content modified in last 24 hrs” style query, if the content publisher in WCH published a new revision of their content, is there any way to correlate the new content (which from the tests I’ve done, will have a new unique ID) back to the original version of the content so my app consuming the content knows to update old content rather than just creating a new piece?

    I can’t see any correlation ID or other ID which links content across revisions.

    • Michael Burati November 03, 2017

      Geoff,

      – Could you post your question on the WCH Developer Forum here, so that more developers/WCH experts monitoring that forum can see/answer it and others benefit from it? Comments on the documentation go to the tech writers, not directly to WCH Developers.
      https://developer.ibm.com/answers/smart-spaces/301/watson-content-hub.html
      – You can tag your questions there with WCH and “Watson Content Hub” to be sure they’re seen by WCH experts and users also following those tags.
      – You can follow those tags so that you will get notified when new WCH questions and answers come in.

      – As for your specific question, if a Content item is made a draft, then changed, then made ready again, then the content item should have the same unique id as its original copy. If someone deletes the content item and recreates a new one, then the id would be different, as it would be a completely different content item. It is better to create a draft from a content item, change the draft and then make it ready, than to delete and recreate, if you want to continue to have id based links to the content item across changes.

      I hope that info helps.
      ..Mike Burati
      IBM Watson Commerce and DX Tooling
      https://developer.ibm.com/answers/smart-spaces/301/watson-content-hub.html

Join The Discussion

Your email address will not be published. Required fields are marked *