String-Based Segmentation Properties

The following properties are stored as strings:

machineId *

clientId *

prodVersion

prodEdition

prodBuild

prodLanguage

licenseType

formFactor *

osLanguage

osWordLength *

cpuType *

javaVersion *

javaVendor *

javaRuntime *

javaGraphics *

javaVmVersion *

javaVmName *

vm *

C01 .. C20 (Custom properties)

licenseKey *

Note:licenseKey requires a special user permission to be used for segmentation.

Note:Properties marked with an asterisk (*) are based on the current (latest known) values.

The type field when using one of the above properties needs to be string, stringArray or regex. A value field is always required. The contents of this field should be according to the specified type.

If string is specified, then the value field must contain a single string that needs to be matched precisely with the stored data.
If stringArray is specified, then the value field must contain an array of strings where one of which needs to match precisely with the stored data.
If specifying a regex, the value field should contain a string which is treated as a regular expression and the stored data will be matched against it using regular expression rules.

Example Using Segmentation by string, stringArray, and regex Values

{

    "segmentBy": "prodVersion",

    "segments": [

        {

            "type": "string",

            "value": "1.0"

        },

        {

            "type": "stringArray",

            "value": ["2.0", "2.1", "3.1"],

            "split": false,

            "segmentLabel": "Versions 2 and 3"

        },

        {

            "type": "regex",

            "value": "^4\..*",

            "split": false,

            "segmentLabel": "All version 4"

        },

        {

            "type": "regex",

            "value": "^5\..*",

            "split": true

        }

    ]

}

In the above example, we are requesting a report with multiple segments. The first segment contains installations running version 1.0. Notice how this does not require a “split” property since there is only 1 value and therefore no further splitting is possible. The second segment contains versions 2.0, 2.1 and 3.1. In this case, the “split” property is required, and since we are requesting the API to combine these 3 versions, we must provide a “segmentLabel” value so that the returned data can be identified. The third segment is similar, although in this case the request is built using a regular expression. In this case, all versions starting with “4.” are to be included into one combined segment.

The last segment is different from the rest because we are requesting the API to split the data (split is set to true). Therefore, this can produce much more than 1 segment. In this case, we could see segments such as “5.1”, “5.2”, etc. Notice how since we are splitting, we should not provide a segmentLabel value since the labels are built using the different values that are found in the data.