Await client.UpdateAsync() question

Hi,

Trying to update a content item. But just ONE field. Not the entire entity.

When I try to do this all other fields get overrritten.

Is it mandatory to send the entire entity with all its data when using UpdateAsync? Or is it possible to do it in some other way?

Example:

var updatedPost = new BlogPost();
updatedPost.Id = "theid";
updatedPost.Data.Introduction= "Some introduction text";
await client.UpdateAsync(updatedPost);

It is not part of the client library, but you can do a patch request, e.g.

https://cloud.squidex.io/api/content/squidex-website/docs#operation/PathSettingsContent

I added a patch method to the client.

2 Likes

That’s great, Sebastian. Will try it out in the future, most definitely. Thanks again!