No results for ""
EXPAND ALL
  • Home
  • API docs

Managing segments

Read time: 2 minutes
Last edited: Nov 12, 2024

Overview

This topic explains how to edit and delete segments. You can update a segment's details, update its targeting, and target segments within flags.

Update segment details

To update a segment's details:

  1. Navigate to the segment detail page for the segment you want to update.
  2. Click the gear icon to open the segment's settings page.
  3. Edit the Name, Description, and Tags for each segment.
  4. Click Save.

Update segment targeting

To update a segment's targeting:

  1. Navigate to the segment detail page for the segment you want to update.
  2. Update the segment's targeting based on the kind of segment:
  • For rule-based segments, add, remove, or edit the segment's targeting rules. To learn more, read Rule-based segments.
  • For list-based segments, add or remove individual targets or upload a new CSV to overwrite or merge with the existing targets. To learn more, read List-based segments.
  • For synced segments, you cannot change segment targeting within LaunchDarkly. Instead, edit the segment in the source application. To learn more, read Segments synced from external tools.

Target segments in flags

To target the segment in a flag:

  1. Navigate to the segment detail page for the segment you want to update.
  2. Click the > icon to expand the "N flags targeting this segment" callout. "N" is the number of flags currently targeting this segment.
  3. Click Target this segment.
  4. In the "Target this segment with a flag rule" dialog, select the flag where you want to use the segment. Then click Target this segment.

Alternatively, you can navigate to the Flags list and add a new targeting rule directly from the flag's Targeting tab.

Delete segments

To delete a segment:

  1. Navigate to the segment detail page for the segment you want to update.
  2. Click the gear icon to open the segment's settings page.
  3. Click Delete this segment.
  4. In the "Delete segment?" dialog, click Delete.

You cannot delete a segment if one or more flags is using it.

You can also use the REST API: Delete segment