Special Segmentation Properties
Some properties need to be represented in a special format due to their unique requirements. These special properties are:
• | Special Segmentation Format: licenseStatus |
• | Special Segmentation Format: os |
• | Special Segmentation Format: geography |
• | Special Segmentation Format: gpu |
• | Special Segmentation Format: optOut and backOff |
Special Segmentation Format: licenseStatus
The licenseStatus value is made up of 4 sub-values: activated, blacklisted, expired and whitelisted. These are presented as boolean values. Any number of segments can be defined, and each segment can contain any subset of the 4 sub-values. These values are ANDed together. A segmentLabel value is required.
In the following example, 2 segments are specified - the first one showing blacklisted AND not expired and the second one showing whitelisted AND activated:
[
{
"segmentLabel": "BL and not EXP",
"blacklisted": true,
"expired": false
},
{
"segmentLabel": "WL and ACT",
"whitelisted": true,
"expired": true
}
]
Special Segmentation Format: os
The os value is made up of 3 granularity levels - platform, version, and edition. A particular level needs to be selected, and this is to be included in the property name such as os.version or os.edition. For a description of the differences between the 3 granularity levels, refer to Special Filter: os.
The following example requests data segmented by all OS versions:
{
"segmentBy": "os.version",
"segments": [
{
"type": "regex",
"value": ".*",
"split": true
}
]
}
In the above example, no filtering is being done, and instead, a regular expression to include everything is set as the value. This will result in all OS versions to be returned.
Special Segmentation Format: geography
The geography value is made up of 3 granularity levels - continent, country, and usState. These granularity levels are explained in Special Filter: geography. A particular level needs to be selected, and this is to be included in the property name such as geography.continent or geography.country.
The following example requests data segmented by all countries:
{
"segmentBy": "geography.country",
"segments": [
{
"type": "regex",
"value": ".*",
"split": true
}
]
}In the above example, no filtering is being done, and instead, a regular expression to include everything is set as the value. This will result in all countries to be returned.
Special Segmentation Format: gpu
The gpu value is made up of 2 granularity levels - vendor and model. These granularity levels are explained in Special Filter: gpu. A particular level needs to be selected, and this is to be included in the property name, namely gpu.vendor or gpu.model.
The following example requests data segmented by all GPU vendor:
{
"segmentBy": "gpu.vendor",
"segments": [
{
"type": "regex",
"value": ".*",
"split": true
}
]
}
In the above example, no filtering is being done, and instead, a regular expression to include everything is set as the value. This will result in all the GPU vendors to be returned.
Special Segmentation Format: optOut and backOff
Both backOff and optOut values are made up of 2 boolean sub-values: historical and current. Any number of segments can be defined, and each segment can contain any subset of the 2 sub-values. These values are ANDed together. A segmentLabel value is required.
In the following example, 2 segments are specified - the first one showing historical AND not current and the second one showing not historical (i.e. never opted-out):
[
{
"segmentLabel": "HISTORICAL and not CURRENT",
"historical": true,
"current": false
},
{
"segmentLabel": "Never opted-out",
"historical": false
}
]