Update a content widget object. (See API authentication for general information how to use these APIs.)
Request
The request object is the widget object you want to update (with the changes made). You are not allowed to change the 'siteGroupId'.
The fields 'lastUpdatedBy' and 'lastUpdatedAt' are set assigned by the system. If you provide values for these fields in the request, they are used for concurrency control (see Content widget object).
The fields createdBy and createdAt are set assigned by the system and cannot be changed.
The fields description and enabled, if not provided, are kept from the existing object.
Response
The response is the widget object after the update. In other words, it is similar to the request object, except that the fields 'lastUpdatedBy' and 'lastUpdatedAt' have been updated as well.
Examples
$ cx.py /widget/update '{ "id": "0ab24abee9a85d869b29f46c83714461b0fe05f7", "description": "My very first content widget" }'
{
"siteGroupId": "9222300742653756873",
"id": "0ab24abee9a85d869b29f46c83714461b0fe05f7",
"description": "My very first content widget",
"lastUpdatedBy": "ivar.rummelhoff@cxense.com",
"lastUpdatedAt": "2013-08-21T12:56:22.375Z"
}
$ cx.py /widget/update '{ "id": "0ab24abee9a85d869b29f46c83714461b0fe05f7", "settings": { "type": "basic", "size": 6, "contentId": "74732be6b5b79f0953f6606870aad034369ed528" } }'
{
"siteGroupId": "9222300742653756873",
"id": "0ab24abee9a85d869b29f46c83714461b0fe05f7",
"description": "My very first content widget",
"lastUpdatedBy": "ivar.rummelhoff@cxense.com",
"lastUpdatedAt": "2013-08-21T12:57:42.093Z",
"settings": {
"type": "basic",
"size": 6,
"contentId": "74732be6b5b79f0953f6606870aad034369ed528"
}
}