0

We have a requirement to fetch the item fro the master db. JSS is always pointing to the web db.

We tried to add the query parameter as sc_content=master in the Layout Service, but still the Layout Service is pointing to the web db.

In the JSON response we are seeing as databaseName:web

Sample URL

http://jssapp/sitecore/api/layout/render/jss?sc_content=master&item={4ADCE242-7382-47DD-8FC5-7FF2E6607C42}&sc_apikey={699E87BB-E988-4815-A53B-EE4B8A177F47}&sc_device=mobile&sc_lang=en
  • 2
    Be aware that it is common that in a scaled environment that the CD has no connection with the master DB, your requirement is actually awkward.. also think of another solution, scheduled publish e.t.c – Jan Bluemink Jan 3 at 12:23
2

JSS Layout Service take a database based on the current site which is resolved by a domain name in your URL. Your site, that stays behind jssapp domain, is configured to use the web database. Update your site settings to use the master database and JSS also will use it.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.