For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
      • POSTCopy feature flag
      • POSTCreate a feature flag
      • DELDelete feature flag
      • GETGet expiring context targets for feature flag
      • GETGet expiring user targets for feature flag
      • GETGet feature flag
      • GETGet feature flag status
      • GETGet flag status across environments
      • POSTGet migration safety issues
      • GETList feature flag statuses
      • GETList feature flags
      • PATCHUpdate expiring context targets on feature flag
      • PATCHUpdate expiring user targets on feature flag
      • PATCHUpdate feature flag
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewFeature Flags

Get expiring context targets for feature flag

GET
/api/v2/flags/:projectKey/:featureFlagKey/expiring-targets/:environmentKey
GET
/api/v2/flags/:projectKey/:featureFlagKey/expiring-targets/:environmentKey
$curl https://app.launchdarkly.com/api/v2/flags/projectKey/featureFlagKey/expiring-targets/environmentKey \
> -H "Authorization: <apiKey>"
1{
2 "items": [
3 {
4 "_id": "12ab3c45de678910abc12345",
5 "_version": 1,
6 "expirationDate": 1672358400000,
7 "contextKind": "user",
8 "contextKey": "context-key-123abc",
9 "_resourceId": {
10 "environmentKey": "environment-key-123abc",
11 "key": "segment-key-123abc",
12 "kind": "segment",
13 "projectKey": "project-key-123abc",
14 "flagKey": "string"
15 },
16 "targetType": "included",
17 "variationId": "cc4332e2-bd4d-4fe0-b509-dfd2caf8dd73"
18 }
19 ],
20 "_links": {}
21}
Get a list of context targets on a feature flag that are scheduled for removal.
Was this page helpful?
Previous

Get expiring user targets for feature flag

Next
Built with

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequiredformat: "string"
The project key
environmentKeystringRequiredformat: "string"
The environment key
featureFlagKeystringRequiredformat: "string"
The feature flag key

Response

Expiring target response
itemslist of objects
A list of expiring targets
_linksmap from strings to objects
The location and content type of related resources

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error