geonode

This class provides RESTful services to get geo node details. It performs the service by delegating to the GeoNode BOD service.

Handler Class:

com.ibm.commerce.rest.store.handler.GeoNodeHandler

Method Summary

HTTP MethodPathDescription
GET/store/{storeId}/geonodeFind geo nodes that match the type and the name.
GET/store/{storeId}/geonode?q={q}Find geo nodes based on query name. See each query for details on input and output.
GET/store/{storeId}/geonode/byParentGeoNode/{parentgeoid}Gets the geo nodes by the parent geo node unique ID.
GET/store/{storeId}/geonode/byTopGeoNodeGets the top geo nodes.
GET/store/{storeId}/geonode/byTopGeoNodeGets the top geo nodes for the site.

Method Details

GET /store/{storeId}/geonode

Find geo nodes that match the type and the name.

Handler Method:

findGeoByTypeAndName

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
siteLevelSearchThe site level search flag. If it is 'true', a site level search will be performed; otherwise, a store level search will be performed. Optional parameter; when it is not set, it is defaulted to 'true'.querystringfalsefalse
typeThe type of the geo nodes.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:

geonode-geonode

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

Find geo nodes based on query name. See each query for details on input and output.

Handler Method:

findByQuery

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

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}/geonode/byParentGeoNode/{parentgeoid}

Gets the geo nodes by the parent geo node unique ID.

Handler Method:

findGeoByParentGeoId

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
parentgeoidThe parent geo node 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.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

geonode-geonode


Example

Request:
GET /wcs/resources/store/10001/geonode/byParentGeoNode/10003?responseFormat=json
HTTP Status Code:

200

Response:
{
	"GeoNode": [
		{
			"Description": [
				{
					"shortDescription": "Calgary"
				}
			],
			"name": "Calgary",
			"type": "CITY",
			"uniqueID": "10004"
		},
		{
			"Description": [
				{
					"shortDescription": "Edmonton"
				}
			],
			"name": "Edmonton",
			"type": "CITY",
			"uniqueID": "10005"
		},
		{
			"Description": [
				{
					"shortDescription": "Lethbridge"
				}
			],
			"name": "Lethbridge",
			"type": "CITY",
			"uniqueID": "10006"
		},
		{
			"Description": [
				{
					"shortDescription": "Medicine Hat"
				}
			],
			"name": "Medicine Hat",
			"type": "CITY",
			"uniqueID": "10007"
		},
		{
			"Description": [
				{
					"shortDescription": "Red Deer"
				}
			],
			"name": "Red Deer",
			"type": "CITY",
			"uniqueID": "10008"
		},
		{
			"Description": [
				{
					"shortDescription": "St. Albert"
				}
			],
			"name": "St. Albert",
			"type": "CITY",
			"uniqueID": "10009"
		},
		{
			"Description": [
				{
					"shortDescription": "Strathcona County"
				}
			],
			"name": "Strathcona County",
			"type": "CITY",
			"uniqueID": "10010"
		}
	],
	"recordSetComplete": "true",
	"recordSetCount": "7",
	"recordSetStartNumber": "0",
	"recordSetTotal": "7",
	"resourceId": "http:\/\/localhost:80\/wcs\/resources\/store\/10001\/geonode\/byParentGeoNode\/10003?responseFormat=json",
	"resourceName": "geonode"
}

GET /store/{storeId}/geonode/byTopGeoNode

Gets the top geo nodes.

Handler Method:

findTopGeoNodes

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
siteLevelSearchThe site level search flag. If it is 'true', a site level search will be performed; otherwise, a store level search will be performed. Optional parameter; when it is not set, it is defaulted to 'true'.querystringfalsefalse
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:

geonode-geonode


Example

Request:
GET /wcs/resources/store/10001/geonode/byTopGeoNode?siteLevelSearch=false&responseFormat=json
HTTP Status Code:

200

Response:
{
	"GeoNode": [
		{
			"Description": [
				{
					"shortDescription": "Canada"
				}
			],
			"name": "Canada",
			"type": "CNTY",
			"uniqueID": "10001"
		},
		{
			"Description": [
				{
					"shortDescription": "United States"
				}
			],
			"name": "United States",
			"type": "CNTY",
			"uniqueID": "10002"
		}
	],
	"recordSetComplete": "true",
	"recordSetCount": "2",
	"recordSetStartNumber": "0",
	"recordSetTotal": "2",
	"resourceId": "http:\/\/localhost:80\/wcs\/resources\/store\/10001\/geonode\/byTopGeoNode?siteLevelSearch=false&responseFormat=json",
	"resourceName": "geonode"
}

GET /store/{storeId}/geonode/byTopGeoNode

Gets the top geo nodes for the site.

Handler Method:

findTopGeoNodes

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store 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.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

geonode-geonode


Example

Request:
GET /wcs/resources/store/10001/geonode/byTopGeoNode?siteLevelSearch=false&responseFormat=json
HTTP Status Code:

200

Response:
{
	"GeoNode": [
		{
			"Description": [
				{
					"shortDescription": "Canada"
				}
			],
			"name": "Canada",
			"type": "CNTY",
			"uniqueID": "10001"
		},
		{
			"Description": [
				{
					"shortDescription": "United States"
				}
			],
			"name": "United States",
			"type": "CNTY",
			"uniqueID": "10002"
		}
	],
	"recordSetComplete": "true",
	"recordSetCount": "2",
	"recordSetStartNumber": "0",
	"recordSetTotal": "2",
	"resourceId": "http:\/\/localhost:80\/wcs\/resources\/store\/10001\/geonode\/byTopGeoNode?siteLevelSearch=false&responseFormat=json",
	"resourceName": "geonode"
}

Data Type Details

geonode-geonode

Properties:
NameData TypeRequired
recordSetTotalstringfalse
GeoNodegeonode-geonode_item arrayfalse
recordSetStartNumberstringfalse
recordSetCompletestringfalse
recordSetCountstringfalse

geonode-geonode_item

Properties:
NameData TypeRequired
userDataFieldgeonode-geonode_item.userDataField arrayfalse
typestringfalse
namestringfalse
uniqueIDstringfalse
Descriptiongeonode-geonode_item.Description arrayfalse

geonode-geonode_item.Description

Properties:
NameData TypeRequired
shortDescriptionstringfalse

geonode-geonode_item.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue