This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Publishes a pending draft of a data item.
This method replaces the published item's data with the draft's content. On success, the draft is deleted.
Pass the published collection ID as dataCollectionId (for example, articles).
To author a brand-new draft, call Insert Data Item with dataCollectionId set to your collection's drafts shadow (for example, articles__drafts when the published collection ID is articles). Edit the draft via Update Data Item or Patch Data Item against the same drafts shadow collection ID.
To retract a published item back to draft state, call Unpublish Data Item.
Notes:
NOT_FOUND if no pending draft exists for the supplied dataItemId.You can only call this method when authenticated as a Wix app or Wix user identity.
This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.