4

Im trying to use the item web api in sitecore 7.2 to retrieve https://[hostname]/-/item/v1/sitecore/content/ in postman, but it returns a 404 not found error (the whole 404 not found html page of the site) anyone have had that issue?

1 Answer 1

4

Are you specifying the authentication parameters? It should look like this in postman.

Url

GET: https://yoursite.com/-/item/v1/?sc_itemid={17F19834-7151-4EA7-98F6-393BB85C6868}

Headers:

key: X-Scitemwebapi-Username value: sitecore\admin

key: X-Scitemwebapi-Password value: b

A site with web api enabled.

Make sure you have your site, in your sites config, with the web api properties.

  • itemwebapi.mode="StandardSecurity"

  • itemwebapi.access="ReadOnly"

  • itemwebapi.allowanonymousaccess="false"

A config would look like this

<site name="MySite" 
  hostName="mysite.com" 
  targetHostName="mysite.com" 
  virtualFolder="/" 
  physicalFolder="/" 
  rootPath="/sitecore/content" 
  startItem="/home" 
  database="web" 
  domain="extranet" 
  allowDebug="true" 
  cacheHtml="true" 
  htmlCacheSize="10MB" 
  registryCacheSize="0" 
  viewStateCacheSize="0" 
  xslCacheSize="5MB" 
  filteredItemsCacheSize="2MB" 
  enablePreview="true" 
  enableWebEdit="true" 
  enableDebugger="true" 
  disableClientData="false" 
  itemwebapi.mode="StandardSecurity" 
  itemwebapi.access="ReadOnly" 
  itemwebapi.allowanonymousaccess="false" 
/>
3
  • Yeah, it still gives me the whole 404 not found page, look: imgur.com/a/usXxR Commented Jan 2, 2018 at 16:09
  • It doesnt even gives back a 403, just plain 404 Commented Jan 2, 2018 at 16:23
  • 1
    See my edits above for "A site with web api enabled"
    – Chris Auer
    Commented Jan 2, 2018 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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