Revoke "publish" on all parent records?

Hey. We are revalidating NextJS routes on a web hook trigger setup inside DatoCMS. The revalidate API is called when a record get’s republished. The problem we are having is that this does not work when a linked records are updated.

Is there a way to revoke “re-publish” on all parent record? Example - let’s say we have two content types: Product page and FAQ. Product page has a link field to FAQ. Now lets say I do this

  1. Product page A
  2. Product page B
  3. Product page C
  4. FAQ record X

FAQ record X is linked on Product page A and C. So, is there a way to automatically republish Product page A and C if FAQ X is updated? Or somehow setup a web hook that would let us know parent records of linked records?


Hello @primoz.rome, the way to do so would be to get all records linking to it through unpublish them with Unpublish items in bulk - Record - Content Management API and then re-publish tem with Publish items in bulk - Record - Content Management API

So no way to do it automatically without API calls?

Will doing it like you described, invoike my web hook triggers setup in the Dashboard?

@primoz.rome , the only way to “re-publish” a record would be so, but can you share with us the use-case for the re-publishing of the parent records?