Views
This feature is for Early Access Program customers only
Views are under active development and are only available to members of LaunchDarkly’s Early Access Program (EAP). To request access to this feature, contact your LaunchDarkly account manager.
Overview
This topic explains what views are in LaunchDarkly and how to use them to organize resources in your projects.
Views let you logically group flags and segments within a project. You can use views to group flags and segments according to the teams in your organization and the features they work on. A given resource, such as a flag, can be linked to more than one view.
Views also let you restrict access to resources, so that members of your organization can focus on just the items they work with. For example, you can link flags and segments to a view, and restrict access to that view. Then, only some members of your organization have access to the view and its linked items. Because you can have multiple views per project, you can scale your LaunchDarkly usage to thousands of flags while maintaining the benefits of a single project, such as flag dependencies.
Create a view
To create a new view:
-
Click the project dropdown. The project menu appears:
The project menu. -
Select Project settings.
-
Select Views. The Views list appears.
-
Click Create view. The “Create view” dialog appears.
-
Enter a unique, human-readable Name for the view.
-
(Optional) Update the view Key. A suggested key auto-populates from the name you enter, but you can customize it if you wish.
-
(Optional) Enter a Description.
-
(Optional) Click Add tags. Enter a tag name to search for an existing tag or create a new one with that name.
-
(Optional) Click Choose maintainer to set the maintainer of the view.
-
Click Create & link flags. The “Link flags” dialog appears.
-
Check the flags that you want to include in the view. You can add any segments after you finish creating the view.
-
Click Update linked flags.
You can also create a view and then link flags and segments later. To create a view without linking any resources, follow steps 1-9 in the procedure above, and then click Create view & close.
After you create a view, you can use it in role policies to restrict access, for instance, to restrict access to sets of flags. For an example of using a view in a role policy, read Example: View-specific permissions.
You can create up to 300 views per project.
Link resources to a view
You can link resources, such as flags or segments, to an existing view when you create the resource. You can also link resources to existing views at any time, from the Views list.
Link resources to a view
To link a flag to an existing view when you create the flag, use the Add views dropdown in the “Details” section of the create flag page.
To link a flag or segment to a view from the flag or segment details page:
- From the detail page, find “Views” in the right sidebar.
- Click add view.
- Check the checkbox next to the views that you want to link the flag or segment to.
To link resources, such as flags or segments, to an existing view from the Views list:
- From Project settings, select Views. The Views list appears.
- Find the view you want to link resource to.
- Click the overflow menu for the view.
- Select Update linked resources. The “Link resources” tab appears.
- Click Add. Select the Resource type, such as flag or segment.
- Check the resources that you want to include in the view.
- Click Add [resource].
Manage views
You can use the Views list and other project settings to manage your views.
Edit a view
To edit a view:
- From Project settings, select Views. The Views list appears.
- Find the view you want to edit.
- Click the overflow menu for the view.
- Select Edit.
- Make any changes to the view. You can update the name, description, tags, and maintainer. You cannot change a view’s key.
- Click Save changes.
Delete a view
To delete a view:
- From Project settings, select Views. The Views list appears.
- Find the view you want to edit.
- Click the overflow menu for the view.
- Select Delete view. A “Delete this view?” dialog appears.
- Enter the name or key of your view in the confirmation field.
- Click Delete.
Deleting a view unlinks all resources from the view. Any members whose roles included access to specific views will no longer have access to the resources linked in that view. For example, members whose roles included access to a particular view will no longer have access to the flags and segments linked to that view.
Deleting a view does not delete any of the resources that were linked to it.
Require resources to be linked to a view
If you use views to restrict access to sets of flags or segments, it may be helpful to require that they are associated with a view. One way to enforce this is to create a role that allows the createFlag
or createSegment
action only within a particular view. To learn how, read the View-specific permissions example policy.
Use views to define access
Views let you restrict access to sets of resources, so that members of your organization can focus on just the items they work with. To learn how, read Assign access based on views and Use views in complex policy statements.