Search code examples
kentico-kontent

How can I retrieve workflow dates from Kentico Kontent's (aka Kentico Cloud) APIs


In Kentico Kontent (used to be called Kentico Cloud), there are APIs such as the Delivery API available to retrieve published content and metadata. However, I can't find any documented way to retrieve details of when an item was published, or any other workflow steps. Is there a way to retrieve metadata about when an item entered or left a workflow step (even just the Published one)?


Solution

  • if an item is published, then you can check the exact time of publishing in deliver API response, in last_modified system field, as the act of publishing is considered the last modification.

    regrettably, the only way to get timestamps of other workflow transitions is using the "compare versions" functionality in Kontent inventory, you can't achieve it through API.

    what you can do however, is set up webhooks on particular workflow steps, which will fire whenever a transition occurs, informing your endpoint of that transition. a timestamp is part of the webhook's payload. for more info on webhooks, check kontent documentation: https://docs.kontent.ai/tutorials/develop-apps/integrate/using-webhooks-for-automatic-updates