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

/widget/create

Create 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 create. Observe that the field 'siteGroupId' is mandatory in create requests, whereas 'id' as not allowed (as it is assigned by the system).

Response

The response is the widget object that has been created. In other words, it is similar to the request object, except that the fields 'id', 'lastUpdatedBy' and 'lastUpdatedAt' have been set.

Examples

$ cx.py /widget/create '{ "siteGroupId": "9222300742653756873", "description": "My first content widget", "settings": { "type": "basic", "size": 5, "contentId": "74732be6b5b79f0953f6606870aad034369ed528", "siteId": "9222300742735526873" } }'
{
 "siteGroupId": "9222300742653756873",
 "id": "0ab24abee9a85d869b29f46c83714461b0fe05f7",
 "description": "My first content widget",
 "lastUpdatedBy": "ivar.rummelhoff@cxense.com",
 "lastUpdatedAt": "2013-08-21T12:43:37.901Z",
 "settings": {
 "type": "basic",
 "size": 5,
 "contentId": "74732be6b5b79f0953f6606870aad034369ed528",
 "siteId": "9222300742735526873"
 }
}
$ cx.py /widget/create '{ "siteGroupId": "9222300742653756873", "description": "A widget with no settings yet" }'
{
 "siteGroupId": "9222300742653756873",
 "id": "81863e4dba3ee760bbfd1669d4bb09feb6939262",
 "description": "A widget with no settings yet",
 "lastUpdatedBy": "ivar.rummelhoff@cxense.com",
 "lastUpdatedAt": "2013-08-30T13:21:11.128Z"
}

Last updated: