---
title: "Show an AI Config's targeting"
method: GET
path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting"
tags: ["AI Configs"]
---

# Show an AI Config's targeting

`GET /api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting`

Retrieves a specific AI Config's targeting by its key

## Path parameters

- `projectKey` string, required
- `configKey` string, required

## Response `200`

Successful response

- AIConfigTargeting
  - `createdAt` integer, required — Unix timestamp in milliseconds
  - `defaults` AIConfigTargetingDefaults
    - `onVariation` integer, required
    - `offVariation` integer, required
  - `environments` object, required
  - `experiments` AiConfigsExperimentInfoRep, required
    - `baselineIdx` integer, required
    - `items` AiConfigsLegacyExperimentRep[], required
      - `metricKey` string
      - `_metric` AiConfigsMetricListingRep
        - `experimentCount` integer — The number of experiments using this metric
        - `metricGroupCount` integer — The number of metric groups using this metric
        - `guardedRolloutCount` integer — The number of guarded rollouts using this metric
        - `releasePolicyCount` integer — The number of release policies using this metric
        - `activeExperimentCount` integer — The number of active experiments using this metric
        - `activeGuardedRolloutCount` integer — The number of active guarded rollouts using this metric
        - `_id` string, required — The ID of this metric
        - `_versionId` string, required — The version ID of the metric
        - `_version` integer — Version of the metric
        - `key` string, required — A unique key to reference the metric
        - `name` string, required — A human-friendly name for the metric
        - `kind` 'pageview' | 'click' | 'custom', required — The kind of event the metric tracks
        - `_attachedFlagCount` integer — The number of feature flags currently attached to this metric
        - `_links` object, required — The location and content type of related resources
        - `_site` AiConfigsLink
          - `href` string
          - `type` string
        - `_access` AiConfigsAccess
          - `denied` AiConfigsAccessDenied[], required
            - `action` string, required
            - `reason` AiConfigsAccessDeniedReason, required
              - …
          - `allowed` AiConfigsAccessAllowedRep[], required
            - `action` string, required
            - `reason` AiConfigsAccessAllowedReason, required
              - …
        - `tags` string[], required — Tags for the metric
        - `_creationDate` integer, required
        - `lastModified` AiConfigsModification
          - `date` string, date-time
        - `maintainerId` string — The ID of the member who maintains this metric
        - `_maintainer` AiConfigsMemberSummary
          - `_links` object, required — The location and content type of related resources
          - `_id` string, required — The member's ID
          - `firstName` string — The member's first name
          - `lastName` string — The member's last name
          - `role` string, required — The member's base role. If the member has no additional roles, this role will be in effect.
          - `email` string, required — The member's email address
        - `description` string — Description of the metric
        - `category` string — The category of the metric
        - `isNumeric` boolean — For custom metrics, whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>).
        - `successCriteria` 'HigherThanBaseline' | 'LowerThanBaseline' — For custom metrics, the success criteria
        - `unit` string — For numeric custom metrics, the unit of measure
        - `eventKey` string — For custom metrics, the event key to use in your code
        - `randomizationUnits` string[] — An array of randomization units allowed for this metric
        - `filters` AiConfigsFilter
          - `type` 'group' | 'contextAttribute' | 'eventProperty', required — Filter type. One of [contextAttribute, eventProperty, group]
          - `attribute` string — If not a group node, the context attribute name or event property name to filter on
          - `op` string, required
          - `values` unknown[], required — The context attribute / event property values or group member nodes
            - unknown
          - `contextKind` string — For context attribute filters, the context kind.
          - `negate` boolean, required — If set, then take the inverse of the operator. 'in' becomes 'not in'.
        - `unitAggregationType` 'average' | 'sum' — The method by which multiple unit event values are aggregated
        - `analysisType` 'mean' | 'percentile' — The method for analyzing metric events
        - `percentileValue` integer — The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>.
        - `eventDefault` AiConfigsMetricEventDefaultRep
          - `disabled` boolean — Whether to disable defaulting missing unit events when calculating results. Defaults to false
          - `value` number — The default value applied to missing unit events. Set to 0 when <code>disabled</code> is false. No other values are currently supported.
        - `dataSource` AiConfigsMetricDataSourceRefRep, required
          - `key` string, required
          - `environmentKey` string
          - `_name` string
          - `_integrationKey` string
        - `lastSeen` integer
        - `archived` boolean — Whether the metric version is archived
        - `archivedAt` integer
        - `selector` string — For click metrics, the CSS selectors
        - `urls` UrlMatcher[]
      - `environments` string[]
      - `_environmentSettings` object
  - `key` string, required
  - `name` string, required
  - `tags` string[], required
  - `variations` AIConfigTargetingVariation[], required
    - `_id` string, required
    - `description` string, required
    - `name` string, required
    - `value` union, required
      - boolean
      - AIConfigTargetingVariationJSON
      - number
      - string
  - `_version` integer, required

## Other responses

- `403` — Forbidden
- `404` — Not found
- `500` — Internal server error

## Changes

- **2026-02-28** `69c5c9aafe78` — 1 warning, 12 info
  - deleted the `header` request parameter `LD-API-Version`
  - api tag `AI Configs` added
  - api tag `AI Configs (beta)` removed
  - added the optional property `experiments/items/items/_metric/_version` to the response with the `200` status
  - …9 more
- **2025-07-08** `b2724c5174d1` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api/changes/api/v2/projects/:projectKey/ai-configs/:configKey/targeting/get.md)

---

[API](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api.md) · [All operations](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/launchdarkly/launchdarkly-rest-api/revisions/69c5c9aafe78/schema)
