Search code examples
restkentico

Kentico, how to update objects via REST?


I'm working with Kentico 9's REST capabilities.

I can create a user object by submitting a POST to the following URL pattern:

POST <host>/rest/cms.user/site/<sitename>

But I also need to update a user. According to their documentation, you should be able to do this:

PUT <host>/rest/cms.user/site/<sitename>/<userid>

But I receive a 404 doing this. Any ideas? Is the documentation wrong? I get better results if I change the update to a POST, but it still says it's a forbidden operation.


Solution

  • The modules tag in the site's root web.config file needs to be modified like so:

    <modules runAllManagedModulesForAllRequests="true">