Is it possible to choose to which domain I want to publish items from the collection via API v2? For publishing whole site we have this possibility
I don’t believe item-level specification of custom domain is exposed in the UI or API. We do have a set of beta APIs for granularly publishing/editing/unpublishing collection items - Create Collection Item (Live)
Any chance this option will be exposed in the future? This feels like a really nice to have feature.
Hi @Trevor1 ,
This can be done in the designer-
- edit the CMS item, it will indicate Staged Changes
- change that to Stage to Publish
- then publish your site to staging only
If you’re asking about the ability to do this through the API, I’m not certain if this is possible but I’d execute the same process if possible.
Thanks for the quick response! Unfortunately, I am looking to do this via the API. Can you explain what you meant by
It depends on what you’re looking for. The OP’s post title suggests distinguishing between staging and prod(?) but OP’s message suggests distinguishing the domain name which is a different level of granularity.
I went with the title, and I’m assuming here you’re trying to publish a CMS item to staging only, through the API - which is this endpoint;
I’m assuming you’ve read the docs and tried that and that for some reason you’re having problems with that endpoint? In which case I’d try to perform the exact same steps that are now used in the designer with the release of CMS item publishing.
- make your CMS item edit
- mark it as staged changes
- publish the site to staging only
You’d try to perform those same steps through the API.
I wouldn’t think that’s necessary? It looks like API fully covers a staging-only CMS item publish.