---
title: "Get exposure SQL model"
method: GET
path: "/api/v2/experiments/exposure-sql-models/{exposure_sql_model_id}"
tags: ["Experiments"]
---

# Get exposure SQL model

`GET /api/v2/experiments/exposure-sql-models/{exposure_sql_model_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/experiments/exposure-sql-models/{exposure_sql_model_id}`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `product_analytics_metrics_read`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/experiments/exposure-sql-models/:exposure_sql_model_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Get an exposure SQL model. Returns a single model by its ID for the organization, including its subject types and properties.

## Path parameters

- `exposure_sql_model_id` string, uuid, required: The UUID of the exposure SQL model.

## Query parameters

- `include` string[]: Optional fields to include. Repeat this parameter to request several fields. `counts` adds experiment_count.

## Response `200`

OK

- ExperimentsExposureSQLModelV2DTO: Response containing a SQL model for experiment assignment data.
  - `data` ExperimentsExposureSQLModelV2DTOData, required: Exposure SQL model resource with its identifier and configuration.
    - `attributes` ExperimentsExposureSQLModelV2DTODataAttributes: Query and column mappings used to read experiment assignment data.
      - `archived_at` string, date-time, nullable: Time when the exposure SQL model was archived.
      - `created_at` string, date-time: Time when the exposure SQL model was created.
      - `date_partition_column` string, nullable: Column used to identify date partitions in the exposure data.
      - `experiment_column` string: SQL result column that contains the experiment key.
      - `experiment_count` integer, nullable: Number of experiments associated with the exposure SQL model.
      - `migration_metadata` unknown
      - `name` string: Display name of the exposure SQL model.
      - `properties` ExperimentsExposureSQLModelV2DTODataAttributesItems[]: Property columns available for filtering or splitting exposure data.
        - `column_name` string: SQL result column that contains this property.
        - `column_type` string: Data type of the property column.
        - `description` string: Description of the exposure property.
        - `id` string: Identifier of the exposure property.
        - `migration_metadata` unknown
        - `name` string: Display name of the exposure property.
        - `pipeline_column_suffix` string: Suffix used for this property column in the analysis pipeline.
      - `sql` string: SQL query that supplies the experiment assignment data.
      - `subject_types` ExperimentsCreateExposureSQLModelV2RequestDataAttributesSubjectTypesItems[]: Mappings between subject types and their identifier columns.
        - `column_name` string, required: SQL result column that contains the subject identifier.
        - `subject_type_id` string, required: Identifier of the subject type mapped to this column.
      - `timestamp_column` string: SQL result column that contains the assignment timestamp.
      - `updated_at` string, date-time: Time when the exposure SQL model was last updated.
      - `variant_column` string: SQL result column that contains the assigned variant.
    - `id` string, uuid, required: Identifier of the exposure SQL model.
    - `type` 'exposure-sql-models', required: Exposure SQL models resource type.

## Other responses

- `400`: Malformed exposure SQL model ID (not a valid UUID), or unknown include value.
- `401`: Missing or invalid authentication.
- `403`: Authenticated caller lacks the product_analytics_metrics_read permission.
- `404`: No exposure SQL model with this ID exists for the organization.
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
