Manage and visualize your LaunchDarkly feature flags
This guide demonstrates how to bring your LaunchDarkly feature flag management experience into Port. You will learn how to:
- Ingest LaunchDarkly data into Port's software catalog using Port's LaunchDarkly integration.
- Set up self-service actions to manage feature flags (create, toggle, and archive).
- Build dashboards in Port to monitor and take action on your feature flag resources.


Common use casesโ
- Monitor the status and usage of all feature flags across projects from a single dashboard.
- Empower development teams to create and manage feature flags without direct LaunchDarkly access.
- Automate feature flag lifecycle management through self-service actions.
- Track temporary flags to ensure cleanup and technical debt reduction.
Prerequisitesโ
This guide assumes the following:
- You have a Port account and have completed the onboarding process.
- Access to your LaunchDarkly organization with permissions to manage feature flags.
- LaunchDarkly API access token with appropriate permissions.
- Optional - Install Port's LaunchDarkly integration.
Set up data modelโ
If you haven't installed the LaunchDarkly integration, you'll need to create blueprints for LaunchDarkly projects, environments, and feature flags. However, we highly recommend you install the LaunchDarkly integration to have these automatically set up for you.
Create the LaunchDarkly project blueprint
-
Go to your Builder page.
-
Click on
+ Blueprint
. -
Click on the
{...}
button in the top right corner, and choose "Edit JSON". -
Add this JSON schema:
LaunchDarkly project blueprint (click to expand)
{
"identifier": "launchDarklyProject",
"description": "This blueprint represents a project in LaunchDarkly.",
"title": "LaunchDarkly Project",
"icon": "Launchdarkly",
"schema": {
"properties": {
"tags": {
"type": "array",
"title": "Tags",
"items": {
"type": "string"
},
"description": "Tags associated with the project for organizational purposes."
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {}
} -
Click "Save" to create the blueprint.
Create the LaunchDarkly feature flag blueprint
-
Go to your Builder page.
-
Click on
+ Blueprint
. -
Click on the
{...}
button in the top right corner, and choose "Edit JSON". -
Add this JSON schema:
LaunchDarkly feature flag blueprint (click to expand)
{
"identifier": "launchDarklyFeatureFlag",
"description": "This blueprint represents a feature flag in LaunchDarkly.",
"title": "LaunchDarkly Feature Flag",
"icon": "Launchdarkly",
"schema": {
"properties": {
"kind": {
"type": "string",
"title": "Flag Kind",
"description": "The type of the feature flag (e.g., boolean)."
},
"description": {
"type": "string",
"title": "Description",
"description": "A description of what the flag controls."
},
"creationDate": {
"type": "string",
"format": "date-time",
"title": "Creation Date",
"description": "The date and time when the flag was created."
},
"clientSideAvailability": {
"type": "object",
"title": "Client-Side Availability",
"description": "Availability of the flag for client-side applications."
},
"temporary": {
"type": "boolean",
"title": "Temporary Flag",
"description": "Indicates if the flag is temporary."
},
"tags": {
"type": "array",
"title": "Tags",
"items": {
"type": "string"
},
"description": "Tags associated with the feature flag."
},
"maintainer": {
"type": "string",
"title": "Maintainer",
"description": "Email address of the maintainer of the flag."
},
"customProperties": {
"type": "object",
"title": "Custom Properties",
"description": "Custom properties associated with the flag."
},
"archived": {
"type": "boolean",
"title": "Archived",
"description": "Indicates if the flag is archived."
},
"deprecated": {
"type": "boolean",
"title": "Deprecated",
"description": "Indicates if the flag is deprecated."
},
"variations": {
"type": "array",
"title": "Variations",
"description": "An array of possible variations for the flag"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"project": {
"title": "Project",
"target": "launchDarklyProject",
"required": true,
"many": false
}
}
} -
Click "Save" to create the blueprint.
Create the LaunchDarkly environment blueprint
-
Go to your Builder page.
-
Click on
+ Blueprint
. -
Click on the
{...}
button in the top right corner, and choose "Edit JSON". -
Add this JSON schema:
LaunchDarkly environment blueprint (click to expand)
{
"identifier": "launchDarklyEnvironment",
"description": "This blueprint represents an environment in LaunchDarkly",
"title": "LaunchDarkly Environment",
"icon": "Launchdarkly",
"schema": {
"properties": {
"defaultTtl": {
"type": "number",
"title": "Default TTL",
"description": "The default time-to-live (in minutes) for feature flag settings in this environment."
},
"secureMode": {
"type": "boolean",
"title": "Secure Mode",
"description": "Indicates whether Secure Mode is enabled for the environment, enhancing security by verifying user tokens."
},
"defaultTrackEvents": {
"type": "boolean",
"title": "Default Track Events",
"description": "Indicates whether event tracking is enabled by default for all flags in this environment."
},
"requireComments": {
"type": "boolean",
"title": "Require Comments",
"description": "Indicates whether comments are required for changes made in this environment."
},
"confirmChanges": {
"type": "boolean",
"title": "Confirm Changes",
"description": "Indicates whether changes need to be confirmed before being applied in this environment."
},
"tags": {
"type": "array",
"title": "Tags",
"description": "A list of tags associated with the environment for organizational purposes."
},
"critical": {
"type": "boolean",
"title": "Critical Environment",
"description": "Indicates whether this environment is considered critical, which may affect change management and notifications."
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"project": {
"title": "Project",
"target": "launchDarklyProject",
"required": true,
"many": false
}
}
} -
Click "Save" to create the blueprint.
Set up self-service actionsโ
Now let us create self-service actions to manage your LaunchDarkly feature flags directly from Port using synced webhooks. You will implement workflows to:
- Create a new feature flag.
- Toggle a feature flag in an environment.
- Archive a feature flag.
To implement these use-cases, follow the steps below:
Add Port secrets
If you have already installed Port's LaunchDarkly integration, these secrets should already exist in your portal.
To view your existing secrets:
- Click on the
...
button in the top right corner of your Port application. - Choose Credentials, then click on the
Secrets
tab.
To add these secrets to your portal:
- Click on the
...
button in the top right corner of your Port application. - Click on Credentials.
- Click on the
Secrets
tab. - Click on
+ Secret
and add the following secrets:LAUNCHDARKLY_ACCESS_TOKEN
: Your LaunchDarkly API access token
Make sure your LaunchDarkly API token has the following permissions:
- Writer role or Admin role.
- Access to the projects where you want to create/manage flags.
- The token should be a Personal API Access Token or Service Token with
createFlag
,updateFlag
, anddeleteFlag
permissions.
Create a new feature flagโ
-
Go to the Self-service page of your portal.
-
Click on the
+ New Action
button. -
Click on the
{...} Edit JSON
button. -
Copy and paste the following JSON configuration into the editor.
Create feature flag action (Click to expand)
{
"identifier": "create_launchdarkly_feature_flag",
"title": "Create Feature Flag",
"icon": "Launchdarkly",
"description": "Create a new feature flag in LaunchDarkly",
"trigger": {
"type": "self-service",
"operation": "CREATE",
"userInputs": {
"properties": {
"project": {
"title": "Project",
"description": "LaunchDarkly project to create the flag in",
"type": "string",
"blueprint": "launchDarklyProject",
"format": "entity"
},
"flag_key": {
"title": "Flag Key",
"description": "Unique key for the feature flag",
"type": "string"
},
"flag_name": {
"title": "Flag Name",
"description": "Human-readable name for the feature flag",
"type": "string"
},
"flag_description": {
"title": "Description",
"description": "Description of what this flag controls",
"type": "string"
},
"temporary": {
"title": "Temporary Flag",
"description": "Whether this is a temporary flag",
"type": "boolean",
"default": false
},
"tags": {
"title": "Tags",
"description": "Comma-separated list of tags",
"type": "string"
}
},
"required": [
"project",
"flag_key",
"flag_name"
],
"order": [
"project",
"flag_key",
"flag_name",
"flag_description",
"temporary",
"tags"
]
},
"blueprintIdentifier": "launchDarklyFeatureFlag"
},
"invocationMethod": {
"type": "WEBHOOK",
"url": "https://app.launchdarkly.com/api/v2/flags/{{.inputs.project.identifier}}",
"agent": false,
"synchronized": true,
"method": "POST",
"headers": {
"Authorization": "{{.secrets.LAUNCHDARKLY_ACCESS_TOKEN}}",
"Content-Type": "application/json"
},
"body": {
"key": "{{.inputs.flag_key}}",
"name": "{{.inputs.flag_name}}",
"description": "{{.inputs.flag_description}}",
"temporary": "{{.inputs.temporary}}",
"tags": "{{.inputs.tags | split(\",\") | map(. | trim)}}"
}
},
"requiredApproval": false
} -
Click
Save
.
Now you should see the Create Feature Flag
action in the self-service page. ๐
Toggle a feature flagโ
-
Go to the Self-service page of your portal.
-
Click on the
+ New Action
button. -
Click on the
{...} Edit JSON
button. -
Copy and paste the following JSON configuration into the editor.
Toggle feature flag action (Click to expand)
{
"identifier": "toggle_launchdarkly_feature_flag",
"title": "Toggle Feature Flag",
"icon": "Launchdarkly",
"description": "Toggle a feature flag on or off in a specific environment",
"trigger": {
"type": "self-service",
"operation": "DAY-2",
"userInputs": {
"properties": {
"environment": {
"title": "Environment",
"description": "Environment to toggle the flag in",
"type": "string",
"blueprint": "launchDarklyEnvironment",
"format": "entity",
"dataset": {
"combinator": "and",
"rules": [
{
"operator": "relatedTo",
"blueprint": "launchDarklyProject",
"value": {
"jqQuery": ".entity.relations.project"
}
}
]
}
},
"enabled": {
"title": "Enable Flag",
"description": "Whether to enable or disable the flag",
"type": "boolean"
}
},
"required": [
"environment"
],
"order": [
"environment",
"enabled"
]
},
"blueprintIdentifier": "launchDarklyFeatureFlag"
},
"invocationMethod": {
"type": "WEBHOOK",
"url": "https://app.launchdarkly.com/api/v2/flags/{{.entity.relations.project}}/{{.entity.identifier | sub(\"-[^-]+$\"; \"\")}}",
"agent": false,
"synchronized": true,
"method": "PATCH",
"headers": {
"Authorization": "{{.secrets.LAUNCHDARKLY_ACCESS_TOKEN}}",
"Content-Type": "application/json"
},
"body": [
{
"op": "replace",
"path": "/environments/{{.inputs.environment.identifier | sub(\"-[^-]+$\"; \"\")}}/on",
"value": "{{.inputs.enabled}}"
}
]
},
"requiredApproval": false
} -
Click
Save
.
Now you should see the Toggle Feature Flag
action in the self-service page. ๐
Archive a feature flagโ
-
Go to the Self-service page of your portal.
-
Click on the
+ New Action
button. -
Click on the
{...} Edit JSON
button. -
Copy and paste the following JSON configuration into the editor.
Archive feature flag action (Click to expand)
{
"identifier": "archive_launchdarkly_feature_flag",
"title": "Archive Feature Flag",
"icon": "Launchdarkly",
"description": "Archive a feature flag in LaunchDarkly",
"trigger": {
"type": "self-service",
"operation": "DELETE",
"userInputs": {
"properties": {},
"required": [],
"order": []
},
"blueprintIdentifier": "launchDarklyFeatureFlag"
},
"invocationMethod": {
"type": "WEBHOOK",
"url": "https://app.launchdarkly.com/api/v2/flags/{{.entity.relations.project}}/{{.entity.identifier | sub(\"-[^-]+$\"; \"\")}}",
"agent": false,
"synchronized": true,
"method": "PATCH",
"headers": {
"Authorization": "{{.secrets.LAUNCHDARKLY_ACCESS_TOKEN}}",
"Content-Type": "application/json"
},
"body": {
"patch": [
{
"op": "replace",
"path": "/archived",
"value": true
}
]
}
},
"requiredApproval": true
} -
Click
Save
.
Now you should see the Archive Feature Flag
action in the self-service page. ๐
Create automations to update entities
To keep your catalog updated with the latest flag information, create an automation to update the feature flag entities in Port after each action completes successfully.
You do not need to create an automation if you have installed the LaunchDarkly Port integration, the entities will be updated automatically.
Automation for create flag action
-
Head to the automation page.
-
Click on the
+ Automation
button. -
Copy and paste the following JSON configuration:
Create feature flag automation (click to expand)
{
"identifier": "launchDarklyFeatureFlag_sync_created_flag",
"title": "Sync Created Feature Flag",
"description": "Update Port with created feature flag data",
"trigger": {
"type": "automation",
"event": {
"type": "RUN_UPDATED",
"actionIdentifier": "create_launchdarkly_feature_flag"
},
"condition": {
"type": "JQ",
"expressions": [
".diff.after.status == \"SUCCESS\""
],
"combinator": "and"
}
},
"invocationMethod": {
"type": "UPSERT_ENTITY",
"blueprintIdentifier": "launchDarklyFeatureFlag",
"mapping": {
"identifier": "{{.event.diff.after.response.key}}-{{.event.diff.after.properties.project.identifier}}",
"title": "{{.event.diff.after.response.name}}",
"properties": {
"kind": "{{.event.diff.after.response.kind}}",
"description": "{{.event.diff.after.response.description}}",
"creationDate": "{{(.event.diff.after.response.creationDate / 1000) | strftime(\"%Y-%m-%dT%H:%M:%SZ\")}}",
"clientSideAvailability": "{{.event.diff.after.response.clientSideAvailability}}",
"temporary": "{{.event.diff.after.response.temporary}}",
"tags": "{{.event.diff.after.response.tags}}",
"maintainer": "{{.event.diff.after.response.maintainer}}",
"customProperties": "{{.event.diff.after.response.customProperties}}",
"archived": "{{.event.diff.after.response.archived}}",
"deprecated": "{{.event.diff.after.response.deprecated}}",
"variations": "{{.event.diff.after.response.variations}}"
},
"relations": {
"project": "{{.event.diff.after.properties.project.identifier}}"
}
}
},
"publish": true
} -
Click "Save" to create the automation.
Let's test it!โ
-
Head to the self-service page of your portal
-
Test creating a feature flag:
- Click on
Create Feature Flag
. - Fill in the required information:
- Project: Your LaunchDarkly project.
- Flag Key: A unique identifier (e.g., "new-checkout-flow")
- Flag Name: A human-readable name (e.g., "New Checkout Flow")
- Description: What the flag controls.
- Set temporary flag if needed.
- Add relevant tags.
- Click
Execute
.
- Click on
-
Test toggling a feature flag:
- Click on
Toggle Feature Flag
. - Select an existing feature flag.
- Choose the environment (production, staging, etc.)
- Toggle the enabled input on or off.
- Click
Execute
.
- Click on
-
Test archiving a feature flag:
- Click on
Archive Feature Flag
. - Select an existing feature flag.
- Click
Execute
.
- Click on
Visualize metricsโ
With your feature flags synced and actions configured, we can create a dedicated dashboard in Port to monitor and manage LaunchDarkly feature flags using customizable widgets. In addition, you can trigger flag management actions directly from the dashboard.
Create a dashboardโ
-
Navigate to the Catalog page of your portal.
-
Click on the
+ New
button in the left sidebar. -
Select New dashboard.
-
Name the dashboard LaunchDarkly Feature Flags.
-
Input
Monitor and manage LaunchDarkly feature flags
under Description. -
Select the
Launchdarkly
icon. -
Click
Create
.
We now have a blank dashboard where we can start adding widgets to visualize insights from our LaunchDarkly feature flags.
Add widgetsโ
In the new dashboard, create the following widgets:
Total feature flags (click to expand)
-
Click
+ Widget
and select Number Chart. -
Title:
Total feature flags
(add theLaunchdarkly
icon). -
Select
Count entities
Chart type and choose LaunchDarkly Feature Flag as the Blueprint. -
Select
count
for the Function. -
Select
custom
as the Unit and inputflags
as the Custom unit. -
Click
Save
.
Create feature flag action (click to expand)
-
Click
+ Widget
and select Action card. -
Choose the Create Feature Flag, Toggle Feature Flag, and Archive Feature Flag actions we created in this guide.
-
Title:
Manage Feature Flags
(add theLaunchdarkly
icon). -
Click
Save
.
Feature flags table (click to expand)
-
Click
+ Widget
and select Table. -
Title the widget All Feature Flags.
-
Choose the LaunchDarkly Feature Flag blueprint.
-
Click
Save
to add the widget to the dashboard. -
Click on the
...
button in the top right corner of the table and select Customize table. -
In the top right corner of the table, click on
Manage Properties
and add the following properties:- Title: The name of each feature flag.
- Description: What the flag controls.
- Temporary Flag: Whether the flag is temporary.
- Archived: Whether the flag is archived.
- Tags: Tags associated with the flag.
- Project: The related LaunchDarkly project.
-
Click on the save icon in the top right corner of the widget to save the customized table.
Temporary vs permanent flags (click to expand)
-
Click
+ Widget
and select Pie chart. -
Title:
Temporary vs permanent flags
(add theLaunchdarkly
icon). -
Choose the LaunchDarkly Feature Flag blueprint.
-
Under
Breakdown by property
, select Temporary Flag property. -
Click
Save
.
Feature flags table (click to expand)
-
Click
+ Widget
and select Table. -
Title the widget All Feature Flags by Project.
-
Choose the LaunchDarkly Feature Flag blueprint.
-
Click
Save
to add the widget to the dashboard. -
Click on the
...
button in the top right corner of the table and select Customize table. -
In the top right corner of the table, click on
Manage Properties
and add the following properties:- Title: The name of each feature flag.
- Description: What the flag controls.
- Temporary Flag: Whether the flag is temporary.
- Archived: Whether the flag is archived.
- Tags: Tags associated with the flag.
- Project: The related LaunchDarkly project.
-
Under the
Group by
section, select Project property. -
Click on the save icon in the top right corner of the widget to save the customized table.