Menu

ClusterAPI

Florian Kleedorfer Stephan Zavrel

clusters

This API call will return all cluster names of a given tenant.

Sample call

HTTP GET

{yourServerURL}/api/1.1/clusters?apikey=8ab9dc3ffcdac576d0f298043a60517a&tenantid=EASYREC_DEMO

Parameters

parameter occurrence description
apikey required The required API Key to access this service. (e.g. "8ab9dc3ffcdac576d0f298043a60517a")
tenantid required tenant id to identify your website. (e.g. "EASYREC_DEMO")

Response

Error Codes

items of cluster

This API will return all items of a given cluster.

Sample call

HTTP GET

{yourServerURL}/api/1.1/itemsofcluster?apikey=8ab9dc3ffcdac576d0f298043a60517a&tenantid=EASYREC_DEMO&clusterid=IST

Parameters

parameter occurrence description
apikey required The required API Key to access this service. (e.g. "8ab9dc3ffcdac576d0f298043a60517a")
tenantid required tenant id to identify your website. (e.g. "EASYREC_DEMO")
clusterid required The response will contain the items of the cluster with the required id used here. Note: the clusterid is the name of the cluster.
numberOfResults optional parameter to determine the number of results returned. (e.g. 10)
offset optional An optional 0-based index to specify with which item to start the result - useful for paging.
strategy optional; default: NEWEST An optional parameter that allows you to specify a strategy based on which the items are selected from the given cluster. Valid values are RANDOM, NEWEST and BEST.RANDOM: returns random items that belong to the given cluster NEWEST: returns the items of a cluster sorted that the items added more recently are at the top of the list BEST: returns the items with the highest association to the given cluster at the top of the list (Note: currently only useful with plugin generated clusters; items added via the Admin GUI or CSV upload all have the same association to a cluster) The default strategy is NEWEST.
usefallback optional; default: false Clusters can be organized in a hierarchical way in the Admin GUI to take the form of a tree. If this usefallback is set to true, easyrec tries to traverse the cluster hierarchy and adds items from sibling and parent clusters to the returned recommendation in case the given cluster only has less that numberOfResults matching items.
requesteditemtype optional; default: ITEM An optional item type that denotes the type of the item (e.g. IMAGE, VIDEO, BOOK, etc.). If not supplied the default value ITEM will be used.
withProfile optional; default: false If this parameter is set to true the result contains an additional element 'profileData' with the item profile.

Response

Error Codes

create cluster

With this API call you can create a new cluster.

Sample call

HTTP GET

{yourServerURL}>/api/1.1/createcluster?token=82d0267a068404cce422d459e0e2281c&tenantid=EASYREC_DEMO&clusterid=comedy&clusterdescription=comedy+movies&clusterparent=movies

Parameters

parameter occurrence description
token required The required security token to access this service. This token is only valid for the current session. Note: The token invalidates, if you sign out
tenantid required tenant id to identify your website. (e.g. "EASYREC_DEMO")
clusterid required The cluster id to identify the cluster. Note: the clusterid is the name of the cluster.
clusterdescription optional A short text which describes the cluster.
clusterparent optional The cluster ID of the parent cluster. If this parameter is not provided the cluster will be added as child to the root cluster "CLUSTERS".

Response

Error Codes


Related

Wiki: API

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.