Skip to content

Publish extension to Sitecore.Services.Client - A Web API method to securely trigger a Sitecore publish

License

Notifications You must be signed in to change notification settings

peplau/SscPublish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SscPublish

Publish extension to Sitecore.Services.Client - A Web API method to securely trigger a Sitecore publish of an item or tree

Installation

  1. Download the package for your corresponding Sitecore version from here;
  2. Install with Installation Wizard

Post-installation:

Add an entry to ConnectionStrings.config with a SecurityToken to your SSC client:

<name="Sitecore.Services.Token.SecurityKey" connectionString="key=bHN81iFRbluzXGkNNLRqGAlCytp2w9fm"/>

Please, don't use this secret - instead, create a strong password (Eg: using https://passwordsgenerator.net/)

Calling the SSC method

Follow the pattern:

/sitecore/api/ssc/SscPublish.Controllers/Publish/{itemId}?{parameters}

  • ItemId = your item ID (without brackets)
  • parameters = Querystring parameters (Eg: ?async=true&deep=false)

IMPORTANT: In order to execute a publish, the user authenticated to SSC must be a member of the role sitecore\Sitecore Client Publishing

Parameters

  • deep (bool) - Deep publish Default: false
  • async (bool) - Async publish Default: false
  • targetDb (string) - Target Database Default: "web"
  • mode (string) - Publish Mode Default: "SingleItem"

Example calls

Available Publish Modes

The implementation will cast the string passed at the mode parameter into the enum Sitecore.Publishing.PublishMode

Accepted values are:

  • Full - Re-publishes everything
  • Incremental - Every item change generates a record in list (f.e. PublishingQueue table). List is inspected during publishing
  • SingleItem - Publishes single item
  • Smart - Publishes items that have difference in source and target
  • Unknown - Unknown mode

About

Publish extension to Sitecore.Services.Client - A Web API method to securely trigger a Sitecore publish

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages