Joe
Joe

Reputation: 11

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.

Upvotes: 1

Views: 221

Answers (2)

Joe
Joe

Reputation: 11

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

<modules runAllManagedModulesForAllRequests="true">

Upvotes: 0

rocky
rocky

Reputation: 7696

Use just:

  • PUT <host>/rest/cms.user/<id>

Or:

  • use codename or GUID for <id> (not int) in your original request.

See the documentation.

Upvotes: 3

Related Questions