# Retrieve guessed rule

Retrieve a list of guessed rules associated with a predictive scoring model.

Endpoint: GET /audiences/{audienceId}/predictive_segments/guess_rule_async
Version: 1.0.0
Security: TdApikeyAuth

## Security:

  - `TdApikeyAuth` (unknown)
    apiKey in header Authorization

## Path parameters:

  - `audienceId` (integer, required)

## Query parameters:

  - `segmentId` (integer, required)

## Response 200:

  - `200` (unknown)
    success

## Response 200 fields (application/json):

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

  - `rule` (object)

  - `rule.categoricalAsColumnNames` (array)

  - `rule.categoricalArrayAsColumnNames` (array)

  - `rule.quantitativeAsColumnNames` (array)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  - `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"

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

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

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

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

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

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

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

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

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

## Response 400:

  - `400` (unknown)
    Given parameters are not valid

## Response 400 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 401:

  - `401` (unknown)
    Unauthorized; You don't provide valid credentials. Maybe you didn't specify valid TD's Master API Key as 'TD1 {Your TD Master API Key}'.

## Response 401 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 403:

  - `403` (unknown)
    Requested resource or action is not allowed because you don't have sufficient permissions

## Response 403 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 404:

  - `404` (unknown)
    The specified resource was not found

## Response 404 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 4XX:

  - `4XX` (unknown)
    There is a high possibility of error of the authentication system. Please check the contents and authority of the key. Please contact the TD support team if you do not resolve it.

## Response 4XX fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 5XX:

  - `5XX` (unknown)
    System error. Because there is a possibility of a temporary error due to network trouble and so on, we recommend several times retry on request side. Please contact the TD support team if you do not resolve it.

## Response 5XX fields (application/json):

  - `status` (integer, required)
    Error status

  - `error` (string, required)
    Error message

  - `details` (string)
    Detailed error message

