We’ve migrated our documentation to a new site, which means some URLs have changed.
Audience

/widget/template/update

Update a content widget template object. (See API authentication for general information how to use these APIs.)

Request

The request object is the template 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 template object).

The fields createdBy and createdAt are set assigned by the system and cannot be changed.

The field description, if not provided, is kept from the existing object.

Response

The response object shows the fields that were updated and possibly some fields that were not changed.

Example

$ cx.py /widget/template/update '{ "id": "0c91da2fc94b4c5729deb9cdb0e6fd661cf6c9e1", "settings": { "type": "basic", "html": "<h2>Coming soon</h2>" } }'
{
 "siteGroupId": "9222300742653756873",
 "id": "0c91da2fc94b4c5729deb9cdb0e6fd661cf6c9e1",
 "description": "My first widget template",
 "lastUpdatedBy": "ivar.rummelhoff@cxense.com",
 "lastUpdatedAt": "2014-10-15T15:11:13.021Z",
 "settings": {
 "type": "basic",
 "html": "<h2>Coming soon</h2>"
 },
 "history": [
 {
 "description": "My first widget template",
 "lastUpdatedBy": "ivar.rummelhoff@cxense.com",
 "lastUpdatedAt": "2014-10-15T15:07:29.007Z",
 "settings": {
 "type": "basic",
 "html": "<h1>Nothing here yet</h1>"
 }
 }
 ]
}

Last updated: