# Retrieve predictive scoring rules

Retrieve predictive scoring rules.

Endpoint: GET /entities/segments/{id}/predictive_segments/guess_rule_async
Version: 1.0.0

## Path parameters:

  - `id` (integer, required)
    the ID of the segment as a positive segment

## Response 200:

  - `200` (unknown)
    Succeeded to start to fetch rules

## Response 200 fields (application/vnd.treasuredata.v1+json):

  - `data` (object)

  - `data.id` (string)

  - `data.type` (string)
    Enum: "predictive-segment-rule-guess-result"

  - `data.attributes` (object)

  - `data.attributes.status` (string)
    Enum: "running", "success"

  - `data.attributes.rule` (object)

  - `data.attributes.rule.categoricalAsColumnNames` (array)

  - `data.attributes.rule.categoricalArrayAsColumnNames` (array)

  - `data.attributes.rule.quantitativeAsColumnNames` (array)

  - `data.attributes.rule.preprocess` (array)
    Definition of preprocess. All of `$item.column` must be specified in one of categoricalAsColumnNames, categoricalArrayAsColumnNames, or quantitativeAsColumnNames.

  - `data.attributes.rule.preprocess.column` (string, required)

  - `data.attributes.rule.preprocess.source` (object, required)

  - `data.attributes.rule.preprocess.source.column` (string)

  - `data.attributes.rule.preprocess.source.table` (string)

  - `data.attributes.rule.preprocess.source.functions` (array)

  - `data.attributes.rule.preprocess.source.functions.function` (string, required)
    Enum: "+", "-", "*", "/"

  - `data.attributes.rule.preprocess.source.functions.arg` (number)

  - `data.attributes.rule.preprocess.source.functions.function` (string, required)
    Enum: "replace"

  - `data.attributes.rule.preprocess.source.functions.search` (string)

  - `data.attributes.rule.preprocess.source.functions.replacement` (string)

  - `data.attributes.rule.preprocess.source.functions.function` (string, required)
    Enum: "substr"

  - `data.attributes.rule.preprocess.source.functions.start` (number)

  - `data.attributes.rule.preprocess.source.functions.length` (number)

  - `data.attributes.rule.preprocess.source.functions.function` (string, required)
    Enum: "regexp_extract"

  - `data.attributes.rule.preprocess.source.functions.pattern` (string)

  - `data.attributes.rule.preprocess.source.functions.group` (number)

  - `data.attributes.rule.preprocess.source.functions.function` (string, required)
    Enum: "day_of_week", "from_iso8601_timestamp", "ln", "elapsed_days", "td_ip_to_least_specific_subdivision_name", "td_ip_to_country_name", "td_ip_to_city_name", "td_ip_to_connection_type", "td_ip_to_domain"

  - `data.attributes.rule.preprocess.source.functions.function` (string, required)
    Enum: "cast_as_quantitative"

  - `data.attributes.rule.preprocess.source.functions.default` (number, required)

  - `data.attributes.rule.preprocess.source.functions.function` (string, required)
    Enum: "cast_as_categorical"

  - `data.attributes.rule.preprocess.source.functions.function` (string, required)
    Enum: "cast_as_categorical_array"

  - `data.attributes.rule.preprocess.source.functions.function` (string, required)
    Enum: "if"

  - `data.attributes.rule.preprocess.source.functions.op` (string)
    Enum: ">", "<", "<=", ">=", "=", "!=", "is", "is\\", "not"

  - `data.attributes.rule.preprocess.source.functions.right_value` (number)

  - `data.attributes.rule.preprocess.source.functions.then` (number)

  - `data.attributes.rule.preprocess.source.functions.else` (number)

