---
title: "Get expiring context targets for feature flag"
method: GET
path: "/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-targets/{environmentKey}"
tags: ["Feature flags"]
---

# Get expiring context targets for feature flag

`GET /api/v2/flags/{projectKey}/{featureFlagKey}/expiring-targets/{environmentKey}`

Get a list of context targets on a feature flag that are scheduled for removal.

## Path parameters

- `projectKey` string, string, required — The project key
- `environmentKey` string, string, required — The environment key
- `featureFlagKey` string, string, required — The feature flag key

## Response `200`

Expiring target response

- ExpiringTargetGetResponse
  - `items` ExpiringTarget[], required — A list of expiring targets
    - `_id` string, required — The ID of this expiring target
    - `_version` integer, required — The version of this expiring target
    - `expirationDate` integer, required
    - `contextKind` string, required — The context kind of the context to be removed
    - `contextKey` string, required — A unique key used to represent the context to be removed
    - `targetType` string — A segment's target type, <code>included</code> or <code>excluded</code>. Included when expiring targets are updated on a segment.
    - `variationId` string — A unique ID used to represent the flag variation. Included when expiring targets are updated on a feature flag.
    - `_resourceId` ResourceId, required
      - `environmentKey` string — The environment key
      - `flagKey` string — Deprecated, use <code>key</code> instead
      - `key` string — The key of the flag or segment
      - `kind` string
      - `projectKey` string — The project key
  - `_links` object — The location and content type of related resources

## Other responses

- `401` — Invalid access token
- `403` — Forbidden
- `404` — Invalid resource identifier
- `429` — Rate limited

---

[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)
