---
title: "Query FindModel by test"
method: GET
path: "/findModel/test/{test_id}"
tags: ["FindModel"]
---

# Query FindModel by test

`GET /findModel/test/{test_id}`

Query find models needed for a test

## Path parameters

- `test_id` string, required

## Query parameters

- `environment_id` string, required

## Response `200`

Results of the query

- FindModelQueryResult — The result of a find model query
  - `findModels` FindModel[] — All find models that matched the query
    - `model_variant_id` string, required — The unique ID of this instance of a FindModel for the indicated selector_invariant_id and environment_id
    - `workspace_id` string, required — The workspace ID for this FindModel and corresponding selector
    - `selector_invariant_id` string, required — The invariant ID of the mabl element selector that this FindModel describes
    - `environment_id` string, required — The environment ID for this FindModel
    - `exact_phase_timeout_ms` integer — The amount of time to wait for an exact match in the corresponding find phase before relaxing requirements to a consistent match [milliseconds]
    - `consistent_phase_timeout_ms` integer — The amount of time to wait for a consistent match in the corresponding find phase before moving on to auto-healing [milliseconds]
    - `attributes` FindModelAttribute[] — Attribute details
      - `attribute_id` string, required — The canonical ID of this attribute, equal to attribute_name, if any, otherwise selector_key with "mabl_" prefix
      - `selector_key` string — The key identifying this attribute in mabl selectors, if any
      - `attribute_name` string — The name of the corresponding element attribute or property, if any
      - `is_expected_exact_phase` boolean, required — Whether a match to the target value for this attribute is expected during the exact match phase
      - `is_expected_consistent_phase` boolean, required — Whether a match to the target value for this attribute is expected during the consistent match phase
      - `stability` number, double, required — Percentage of find runs in which this attribute found value matches the target, inclusive range [0,1]
      - `differentiation_weight` number, double, required — Weight for this attribute based on its ability to differentiate the correct element from others, inclusive range [0,1]
      - `percent_changes_from_first_found` number, double — Percentage of find runs in which the attribute's value sometimes changes between the first time the element is located and the end of the find, inclusive range [0,1]
      - `average_target_match_similarity` number, double — Average similarity determined by corresponding attribute matcher for target vs found values, inclusive range [0,1]
    - `app_state_attributes` AppStateModelAttribute[] — App state attribute details
      - `attribute_id` string, required — The canonical ID of this app state attribute
      - `is_expected` boolean, required — Whether a match to the target value or range for this attribute is expected
      - `stability` number, double, required — Percentage of find runs in which this attribute found value matches the target value or range, stability value inclusive range [0,1]
      - `value_type` 'string' | 'number', required — The type of value for this attribute
      - `recent_values` string[] — Most recent values of the attribute (applicable to string type)
      - `expected_value` number, double, nullable — Expected value of the attribute (applicable to number type)
      - `standard_deviation` number, double, nullable — Standard deviation of values for this attribute (applicable to number type)
      - `is_value_truncated` boolean — Whether any of the recent values are truncated (applicable to string type)
      - `average_target_match_similarity` number, double — Average similarity determined by corresponding attribute matcher for target vs found values, similarity value inclusive range [0,1]
    - `latest_digest_id` string — ID of the most recent FindDigest used to build this model
    - `latest_digest_time` integer — Creation time of the most recent FindDigest used to build this model [epoch milliseconds]
    - `earliest_digest_id` string — ID of the oldest FindDigest used to build this model
    - `earliest_digest_time` integer — Creation time of the oldest FindDigest used to build this model [epoch milliseconds]
    - `digest_count` integer, required — Total number of FindDigests used to build this model
    - `created_time` integer, required — Time at which the FindModel was created [epoch milliseconds]
    - `last_updated_time` integer, required — Time at which the FindModel was last updated [epoch milliseconds]
    - `model_generation_version` integer — The version number of the find model generation code used to generate the find model.
  - `cursor` string — Cursor used for pagination

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
