Segmentations Definition
Segmentations allow you to group the Items into various segments: For example segment articles or products by categories, segment movies by genres, etc. The Segmentations can be used in recommendations (e.g. return the most relevant categories for a user).
See this section for more info.
Property Based Segmentation
Property-based Segmentation groups the Items by the value of a particular property. See this section for more info.
Create Property Based Segmentation
Creates a Segmentation that splits the items into segments based on values of a particular item property.
A segment is created for each unique value of the property.
In case of set properties, a segment is created for each value in the set. Item belongs to all these segments.
Parameters
ID of your database.
ID of the newly created Segmentation
What type of data should be segmented. Currently only items are supported.
Name of the property on which the Segmentation should be based
Human-readable name that is shown in the Recombee Admin UI.
Description that is shown in the Recombee Admin UI.
Responses
successful operation
segmentationId does not match ^[a-zA-Z0-9_-:@.]+$, property is not of supported type (string or set).
Property does not exist.
Update Property Based Segmentation
Updates a Property Based Segmentation
Parameters
ID of your database.
ID of the updated Segmentation
Name of the property on which the Segmentation should be based
Human-readable name that is shown in the Recombee Admin UI.
Description that is shown in the Recombee Admin UI.
Responses
successful operation
segmentationId does not match ^[a-zA-Z0-9_-:@.]+$, property is not of supported type (string or set).
Property does not exist. Segmentation with given ID does not exist.
Manual ReQL Segmentation
Segmentation whose Segments are defined by ReQL filters. See this section for more info.
Create Manual ReQL Segmentation
Segment the items using multiple ReQL filters.
Use the Add Manual ReQL Items Segment endpoint to create the individual segments.
Parameters
ID of your database.
ID of the newly created Segmentation
What type of data should be segmented. Currently only items are supported.
Human-readable name that is shown in the Recombee Admin UI.
Description that is shown in the Recombee Admin UI.
Responses
successful operation
segmentationId does not match ^[a-zA-Z0-9_-:@.]+$.
Examples
Example Create a Manual ReQL Segmentation and set up its Segments
Each Segment is defined by a ReQL filter: Items passing the filter belong to the Segment.
Here we create two Segments in the homepage-rows Segmentation:
made-in-uscontains items that were created in the USshort-laughscontains comedies with runtime under 30 minutes
See this section for more info.
Update Manual ReQL Segmentation
Update an existing Segmentation.
Parameters
ID of your database.
ID of the updated Segmentation
Human-readable name that is shown in the Recombee Admin UI.
Description that is shown in the Recombee Admin UI.
Responses
successful operation
segmentationId does not match ^[a-zA-Z0-9_-:@.]+$. Given Segmentation is of different type.
Segmentation with given ID does not exist.
Add Manual ReQL Segment
Adds a new Segment into a Manual ReQL Segmentation.
The new Segment is defined by a ReQL filter that returns true for an item in case that this item belongs to the segment.
Parameters
ID of your database.
ID of the Segmentation to which the new Segment should be added
ID of the newly created Segment
ReQL filter that returns true for items that belong to this Segment. Otherwise returns false.
Human-readable name of the Segment that is shown in the Recombee Admin UI.
Responses
successful operation
segmentationId or segmentId does not match ^[a-zA-Z0-9_-:@.]+$. Segmentation is of wrong type.
Segmentation with given ID does not exist.
Update Manual ReQL Segment
Update definition of the Segment.
Parameters
ID of your database.
ID of the Segmentation to which the updated Segment belongs
ID of the Segment that will be updated
ReQL filter that returns true for items that belong to this Segment. Otherwise returns false.
Human-readable name of the Segment that is shown in the Recombee Admin UI.
Responses
successful operation
segmentationId or segmentId does not match ^[a-zA-Z0-9_-:@.]+$. Segmentation is of wrong type.
Segmentation with given ID does not exist. Segment with given ID does not exist in the Segmentation.
Delete Manual ReQL Segment
Delete a Segment from a Manual ReQL Segmentation.
Parameters
ID of your database.
ID of the Segmentation from which the Segment should be deleted
ID of the Segment that should be deleted
Responses
successful operation
segmentationId or segmentId does not match ^[a-zA-Z0-9_-:@.]+$. Segmentation is of wrong type.
Segmentation with given ID does not exist. Segment with given ID does not exist in the Segmentation.
Auto ReQL Segmentation
Auto ReQL Segmentation is specified by a ReQL expression that for each Item returns a set of Segments to which the Item belongs. See this section for more info.
Create Auto ReQL Segmentation
Segment the items using a ReQL expression.
For each item, the expression should return a set that contains IDs of segments to which the item belongs to.
Parameters
ID of your database.
ID of the newly created Segmentation
What type of data should be segmented. Currently only items are supported.
ReQL expression that returns for each item a set with IDs of segments to which the item belongs
Human-readable name that is shown in the Recombee Admin UI.
Description that is shown in the Recombee Admin UI.
Responses
successful operation
segmentationId does not match ^[a-zA-Z0-9_-:@.]+$, ReQL expression is invalid.
Examples
Update Auto ReQL Segmentation
Update an existing Segmentation.
Parameters
ID of your database.
ID of the updated Segmentation
ReQL expression that returns for each item a set with IDs of segments to which the item belongs
Human-readable name that is shown in the Recombee Admin UI.
Description that is shown in the Recombee Admin UI.
Responses
successful operation
segmentationId does not match ^[a-zA-Z0-9_-:@.]+$. ReQL expression is invalid. Given Segmentation is of different type.
Segmentation with given ID does not exist.
General
List Segmentations
Return all existing items Segmentations.
Parameters
ID of your database.
List Segmentations based on a particular type of data. Currently only items are supported.
Responses
Get Segmentation
Get existing Segmentation.
Parameters
ID of your database.
ID of the Segmentation that should be returned
Responses
Segmentation with given ID does not exist.
Delete Segmentation
Delete existing Segmentation.
Parameters
ID of your database.
ID of the Segmentation that should be deleted
Responses
successful operation
Segmentation with given ID does not exist.