widget_definition

Definition of a widget. Contains information on the widget but not its inclusion in a layout.

Handler Class:

com.ibm.commerce.rest.pagelayout.handler.WidgetDefinitionHandler

Method Summary

HTTP MethodPathDescription
GET/store/{storeId}/widget_definition?q={q}Finds widget definitions by a query. See each query for details on input and output.
GET/store/{storeId}/widget_definition?q=byIdentifiersFinds widget definitions by their IDs. Invalid widget definition IDs are ignored.
GET/store/{storeId}/widget_definition?q=byWidgetDefinitionIdsFinds widget definitions by their IDs. Invalid widget definition IDs are ignored.
GET/store/{storeId}/widget_definition/{widgetDefinitionId}Finds a widget definition by its ID.
GET/store/{storeId}/widget_definition/identifier/{identifier}Finds a widget definition by its identifier.

Method Details

GET /store/{storeId}/widget_definition?q={q}

Finds widget definitions by a query. See each query for details on input and output.

Handler Method:

findByQuery

Secure Call Mandatory:

false

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
qThe query name.querystringtruefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
500Internal server error. Additional details will be contained on the server logs.

GET /store/{storeId}/widget_definition?q=byIdentifiers

Finds widget definitions by their IDs. Invalid widget definition IDs are ignored.

Handler Method:

byIdentifiers

Secure Call Mandatory:

false

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
qThe query name.querystringtruefalse
identifierThe widget definition identifier.querystringtruefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

widget_definition-IBM_Store_Summary


Example

Request:
GET /wcs/resources/store/10001/widget_definition?q=byIdentifiers&identifier=HomePageContainer&identifier=NON_EXISTING
HTTP Status Code:

200

Response:
{
	"recordSetComplete": true,
	"recordSetCount": 1,
	"recordSetStartNumber": 0,
	"recordSetTotal": 1,
	"resourceId": "http:\/\/localhost:80\/wcs\/resources\/store\/10001\/widget_definition?q=byIdentifiers&identifier=HomePageContainer&identifier=NON_EXISTING",
	"resourceName": "widget_definition",
	"resultList": [
		{
			"definitionXml": "<Definition> <\/Definition>",
			"identifier": "HomePageContainer",
			"path": "Container\/HomePageContainer.jsp",
			"state": "active",
			"storeId": "10001",
			"widgetDefinitionId": "1001",
			"widgetType": "Container"
		}
	]
}

GET /store/{storeId}/widget_definition?q=byWidgetDefinitionIds

Finds widget definitions by their IDs. Invalid widget definition IDs are ignored.

Handler Method:

byWidgetDefinitionIds

Secure Call Mandatory:

false

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
qThe query name.querystringtruefalse
widgetDefinitionIdThe widget definition ID.querystringtruefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

widget_definition-IBM_Store_Summary


Example

Request:
GET /wcs/resources/store/10001/widget_definition?q=byWidgetDefinitionIds&widgetDefinitionId=-1&widgetDefinitionId=-2&widgetDefinitionId=1001
HTTP Status Code:

200

Response:
{
	"recordSetComplete": true,
	"recordSetCount": 1,
	"recordSetStartNumber": 0,
	"recordSetTotal": 1,
	"resourceId": "http:\/\/localhost:80\/wcs\/resources\/store\/10001\/widget_definition?q=byWidgetDefinitionIds&widgetDefinitionId=-1&widgetDefinitionId=-2&widgetDefinitionId=1001",
	"resourceName": "widget_definition",
	"resultList": [
		{
			"definitionXml": "<Definition> <\/Definition>",
			"identifier": "HomePageContainer",
			"path": "Container\/HomePageContainer.jsp",
			"state": "active",
			"storeId": "10001",
			"widgetDefinitionId": "1001",
			"widgetType": "Container"
		}
	]
}

GET /store/{storeId}/widget_definition/{widgetDefinitionId}

Finds a widget definition by its ID.

Handler Method:

findByWidgetDefinitionId

Secure Call Mandatory:

false

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
widgetDefinitionIdThe widget definition ID.pathstringtrueN/A
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

widget_definition-IBM_Store_Summary


Example

Request:
GET /wcs/resources/store/10001/widget_definition/1001
HTTP Status Code:

200

Response:
{
	"recordSetComplete": true,
	"recordSetCount": 1,
	"recordSetStartNumber": 0,
	"recordSetTotal": 1,
	"resourceId": "https:\/\/localhost:8006\/wcs\/previewresources\/store\/10001\/widget_definition\/1001",
	"resourceName": "widget_definition",
	"resultList": [
		{
			"definitionXml": "<Definition> <\/Definition>",
			"identifier": "HomePageContainer",
			"path": "Container\/HomePageContainer.jsp",
			"state": "active",
			"storeId": "10001",
			"widgetDefinitionId": "1001",
			"widgetType": "Container"
		}
	]
}

GET /store/{storeId}/widget_definition/identifier/{identifier}

Finds a widget definition by its identifier.

Handler Method:

findByIdentifier

Secure Call Mandatory:

false

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
identifierThe widget definition identifier.pathstringtrueN/A
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

widget_definition-IBM_Store_Summary


Example

Request:
GET /wcs/resources/store/10001/widget_definition/identifier/%24%26%5B%7B%7D%28%3D*%29%2B%5D%21%23%7E%25%60%3A%3C%3E%3B%2C.
HTTP Status Code:

200

Response:
{
	"recordSetComplete": true,
	"recordSetCount": 1,
	"recordSetStartNumber": 0,
	"recordSetTotal": 1,
	"resourceId": "http:\/\/localhost:80\/wcs\/resources\/store\/10001\/widget_definition\/identifier\/%24%26%5B%7B%7D%28%3D*%29%2B%5D%21%23~%25%60%3A%3C%3E%3B%2C.",
	"resourceName": "widget_definition",
	"resultList": [
		{
			"definitionXml": "<Definition> <\/Definition>",
			"identifier": "$&[{}(=*)+]!#~%`:<>;,.",
			"path": "Container\/HomePageContainer.jsp",
			"state": "active",
			"storeId": "10001",
			"widgetDefinitionId": "1001",
			"widgetType": "Container"
		}
	]
}

Data Type Details

widget_definition-IBM_Store_Summary

Properties:
NameData TypeRequired
recordSetTotalstringfalse
recordSetCompletestringfalse
recordSetStartNumberstringfalse
resultListwidget_definition-IBM_Store_Summary_item arrayfalse
recordSetCountstringfalse

widget_definition-IBM_Store_Summary_item

Properties:
NameData TypeRequired
statestringfalse
widgetDefinitionIdstringfalse
definitionXmlstringfalse
pathstringfalse
userDataFieldwidget_definition-IBM_Store_Summary_item.userDataField arrayfalse
vendorstringfalse
identifierstringfalse
widgetPropertywidget_definition-WidgetProperty arrayfalse
storeIdstringfalse
widgetObjectNamestringfalse
widgetTypestringfalse

widget_definition-IBM_Store_Summary_item.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue

widget_definition-WidgetProperty

Properties:
NameData TypeRequired
valuestringfalse
userDataFieldwidget_definition-WidgetProperty.userDataField arrayfalse
namestringfalse
storeIdstringfalse
sequenceOrderstringfalse

widget_definition-WidgetProperty.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue