Cancel Scheduled Publish/Unpublish Activity for Assets

You can cancel any scheduled publishing or unpublishing activity for a specific asset when you no longer wish to publish or unpublish the asset. Subsequently, you can also remove assets from a release that is scheduled for deployment.

Follow the below steps to cancel a scheduled publish or unpublish action for an asset:

  1. Go to your stack, and click on the PUBLISH QUEUE tab on the header.Publish_Queue_Details_for_Asset.png
    You can view the list of historical or current publishing or unpublishing activities on screen.
  2. Under FILTERS, apply the date range filter to refine the publish queue results based on the specific date on which the asset is scheduled for publishing or unpublishing.
    Filter_Assets_Publish_Queue.png
  3. From the refined activity list, click on the Cancel (x) icon beside an asset that needs to be removed from the publish queue.

    Additional Resource: Learn how to cancel scheduled publishing or unpublishing activity for an asset using Contentstack's Content Management API.

Note: You need to cancel scheduled publishing activity by performing the above steps for each individual asset in the publish queue.

Cancel Scheduled Publish/Unpublish Activity Using the Content Management API

To cancel the publishing or unpublishing action for assets using Contentstack’s Content Management API, perform the following steps:

  1. Log in to Contentstack using the Authtoken or use the stack’s Management Token to authorize your API requests.
  2. Make a Content Management API request to retrieve details for publishing or unpublishing activities scheduled on or after a specific date. The API request will look as follows:
    https://api.contentstack.io/v3/publish-queue?query={"scheduled_at": {"$gte": "scheduled_publishing_date" }}

    Note: You need to pass the scheduled publish/unpublish date and time in the ISO format.

  3. From the publish queue details retrieved in the response body of the previous API request, you can access the publish queue UIDs for each activity that you want to remove from the publishing queue.
  4. Make an API request to cancel the scheduled publishing or unpublishing action using each publish queue UID. The API request will look as follows:
    https://api.contentstack.io/v3/publish-queue/{publish_queue_UID}/unschedule
  5. If you need to cancel scheduled actions for multiple assets, you can write a script and fetch the publish queue details from the response body of the API request mentioned in Step 2.

API Reference

To cancel scheduled publishing or unpublishing activity of an asset via the API, refer the Cancel Scheduled Action API request.

On This Page