provider Segments GET
/api/v2/segments/{projectKey}/{segmentKey}/expiring-user-targets/{environmentKey} @utdk/launchdarkly
/api/v2/segments/{projectKey}/{segmentKey}/expiring-user-targets/{environmentKey} Get expiring user targets for segment
> ### Contexts are now available
>
> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](https://launchdarkly.com/docs/api/segments/get-expiring-targets-for-segment) instead of this endpoint. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts).
Get a list of a segment's user targets that are scheduled for removal.
- projectKey path required
- The project key
- string
- environmentKey path required
- The environment key
- string
- segmentKey path required
- The segment key
- string
Try it
Authentication
Configure credentials for LaunchDarkly REST API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.
Saved automatically to browser storage.
Code snippet
Updates live as you fill in the form above.
TypeScript
import launchdarkly from '@utdk/launchdarkly';
await launchdarkly.getexpiringusertargetsforsegment()