It looks like the issue is with the site
parameter in your query. The site
parameter needs to match a configured site in your sites.config
file. For example:
<site name="corporate"
inherits="website"
language="en"
contentLanguage="en"
scheme="https"
rootPath="/sitecore/content/CorporateSite"
dictionaryPath="/sitecore/content/CorporateSite/Dictionary"
dictionaryCacheSize="100MB"
dictionaryCacheLifetime="86400"
startItem="/Home"
cacheHtml="false"
hostName="corporate.localhost"
targetHostName="corporate.localhost"
database="master" />
Make sure the site
name in your query (for example, "corporate"
) exactly matches the name
attribute in your sites.config
. If there’s any mismatch, Sitecore won’t be able to resolve the site, which can lead to errors like the 400 status code you encountered.