Skip to main content

LaunchDarkly

Port's LaunchDarkly integration allows you to model LaunchDarkly resources in your software catalog and ingest data into them.

Overview

This integration allows you to:

  • Map and organize your desired LaunchDarkly resources and their metadata in Port (see supported resources below).
  • Watch for LaunchDarkly object changes (create/update/delete) in real-time, and automatically apply the changes to your software catalog.

Supported Resources

The resources that can be ingested from LaunchDarkly into Port are listed below.
It is possible to reference any field that appears in the API responses linked below in the mapping configuration.

Setup

Choose one of the following installation methods:

Using this installation option means that the integration will be hosted by Port, with a customizable resync interval to ingest data into Port.

Beta feature

The Hosted by Port option is currently in beta, and is still undergoing final testing before its official release.

Should you encounter any bugs or functionality issues, please let us know so we can rectify them as soon as possible.
Your help is greatly appreciated! ⭐

Live event support

Currently, live events are not supported for integrations hosted by Port.
Resyncs will be performed periodically every 1 hour by default (can be configured differently after installation), or manually triggered by you via Port's UI.

Therefore, real-time events (including GitOps) will not be ingested into Port immediately.
Support for live events is WIP and will be supported in the near future.

Installation

To install, follow the following steps:

  1. Go to the Data sources page of your portal.

  2. Click on the + Data source button in the top-right corner.

  3. Click on the relevant integration in the list.

  4. Under Select your installation method, choose Hosted by Port.

  5. Configure the integration settings and application settings as you wish (see below for details).

Application settings

Every integration hosted by Port has the following customizable application settings, which are configurable after installation:

  • Resync interval: The frequency at which Port will ingest data from the integration. There are various options available, ranging from every 1 hour to once a day.

  • Send raw data examples: A boolean toggle (enabled by default). If enabled, raw data examples will be sent from the integration to Port. These examples are used when testing your mapping configuration, they allow you to run your jq expressions against real data and see the results.

Integration settings

Every integration has its own tool-specific settings, under the Integration settings section.
Each of these settings has an ⓘ icon next to it, which you can hover over to see a description of the setting.

Port secrets

Some integration settings require sensitive pieces of data, such as tokens.
For these settings, Port secrets will be used, ensuring that your sensitive data is encrypted and secure.

When changing such a setting, you will be prompted to choose an existing secret or create a new one:



Port source IP addresses

When using this installation method, Port will make outbound calls to your 3rd-party applications from static IP addresses.
You may need to add these addresses to your allowlist, in order to allow Port to interact with the integrated service:

54.73.167.226  
63.33.143.237
54.76.185.219

Configuration

Port integrations use a YAML mapping block to ingest data from the third-party api into Port.

The mapping makes use of the JQ JSON processor to select, modify, concatenate, transform and perform other operations on existing fields and values from the integration API.

Examples

To view and test the integration's mapping against examples of the third-party API responses, use the jq playground in your data sources page. Find the integration in the list of data sources and click on it to open the playground.

Additional examples of blueprints and the relevant integration configurations:

Project

Project blueprint
  {
"identifier": "launchDarklyProject",
"description": "This blueprint represents a project in LaunchDarkly.",
"title": "LaunchDarkly Project",
"icon": "Launchdarkly",
"schema": {
"properties": {
"tags": {
"type": "array",
"title": "Tags",
"description": "Tags associated with the project for organizational purposes."
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {}
}
Integration configuration
resources:
- kind: project
selector:
query: "true"
port:
entity:
mappings:
identifier: .key
title: .name
blueprint: '"launchDarklyProject"'
properties:
tags: .tags

Feature Flag

Feature Flag blueprint
  {
"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",
"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
}
}
}
Integration configuration
- kind: flag
selector:
query: "true"
port:
entity:
mappings:
identifier: .key + "-" + .__projectKey
title: .name
blueprint: '"launchDarklyFeatureFlag"'
properties:
kind: .kind
description: .description
creationDate: .creationDate / 1000 | strftime("%Y-%m-%dT%H:%M:%SZ")
clientSideAvailability: .clientSideAvailability
temporary: .temporary
tags: .tags
maintainer: ._maintainer.email
deprecated: .deprecated
variations: .variations
customProperties: .customProperties
archived: .archived
relations:
project: .__projectKey

Environment

Environment blueprint
{
"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
}
}
}
Integration configuration
- kind: environment
selector:
query: "true"
port:
entity:
mappings:
identifier: .key + "-" + .__projectKey
title: .name
blueprint: '"launchDarklyEnvironment"'
properties:
defaultTtl: .defaultTtl
secureMode: .secureMode
defaultTrackEvents: .defaultTrackEvents
requireComments: .requireComments
confirmChanges: .confirmChanges
tags: .tags
critical: .critical
relations:
project: .__projectKey

Feature Flags In Environment

Feature Flags In Environment blueprint
{
"identifier": "launchDarklyFFInEnvironment",
"description": "This blueprint represents a feature flag in LaunchDarkly Environment.",
"title": "Feature Flag In Environment",
"icon": "Launchdarkly",
"schema": {
"properties": {
"status": {
"type": "string",
"title": "Status",
"description": "Status of the feature flag"
}
},
"required": []
},
"mirrorProperties": {
"kind": {
"title": "Kind",
"path": "featureFlag.kind"
},
"description": {
"title": "Description",
"path": "featureFlag.description"
},
"deprecated": {
"title": "Deprecated",
"path": "featureFlag.deprecated"
}
},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"environment": {
"title": "Environment",
"target": "launchDarklyEnvironment",
"required": false,
"many": false
},
"featureFlag": {
"title": "Feature Flag",
"target": "launchDarklyFeatureFlag",
"required": false,
"many": false
}
}
}
Integration configuration
- kind: flag-status
selector:
query: "true"
port:
entity:
mappings:
identifier: >-
. as $root | ._links.self.href | split("/") | last as $last |
"\($last)-\($root.__environmentKey)"
title: >-
. as $root | ._links.self.href | split("/") | last as $last |
"\($last)-\($root.__environmentKey)"
blueprint: '"launchDarklyFFInEnvironment"'
properties:
status: .name
relations:
environment: .__environmentKey + "-" + .__projectKey
featureFlag: . as $input | $input._links.self.href | split("/") | .[-1] + "-" + $input.__projectKey

Let's Test It

This section includes sample response data from LaunchDarkly. In addition, it includes the entity created from the resync event based on the Ocean configuration provided in the previous section.

Payload

Here is an example of the payload structure from LaunchDarkly:

Project response data
{
"_links": {
"environments": {
"href": "/api/v2/projects/fourth-project/environments",
"type": "application/json"
},
"flagDefaults": {
"href": "/api/v2/projects/fourth-project/flag-defaults",
"type": "application/json"
},
"self": {
"href": "/api/v2/projects/fourth-project",
"type": "application/json"
}
},
"_id": "666b298cc671e81012b578c6",
"key": "fourth-project",
"includeInSnippetByDefault": false,
"defaultClientSideAvailability": {
"usingMobileKey": false,
"usingEnvironmentId": false
},
"name": "Fourth Project",
"tags": []
}
Feature Flag response data
{
"_links": {
"parent": {
"href": "/api/v2/flags/fourth-project",
"type": "application/json"
},
"self": {
"href": "/api/v2/flags/fourth-project/randomflag",
"type": "application/json"
}
},
"_maintainer": {
"_id": "6669b0f34162860fefd6d724",
"_links": {
"self": {
"href": "/api/v2/members/6669b0f34162860fefd6d724",
"type": "application/json"
}
},
"email": "example@gmail.com",
"firstName": "John",
"lastName": "Doe",
"role": "owner"
},
"_version": 1,
"archived": false,
"clientSideAvailability": {
"usingEnvironmentId": false,
"usingMobileKey": false
},
"creationDate": 1718299647527,
"customProperties": {},
"defaults": {
"offVariation": 1,
"onVariation": 0
},
"deprecated": false,
"description": "",
"environments": {
"fourth-env": {
"_environmentName": "fourth-env",
"_site": {
"href": "/fourth-project/fourth-env/features/randomflag",
"type": "text/html"
},
"_summary": {
"prerequisites": 0,
"variations": {
"0": {
"contextTargets": 0,
"isFallthrough": true,
"nullRules": 0,
"rules": 0,
"targets": 0
},
"1": {
"contextTargets": 0,
"isOff": true,
"nullRules": 0,
"rules": 0,
"targets": 0
}
}
},
"archived": false,
"lastModified": 1718299647539,
"on": false,
"salt": "c713989066a446febf07a42d488221e8",
"sel": "6d7c3692dd9d4ffa8eee8e2d96b6fd2c",
"trackEvents": false,
"trackEventsFallthrough": false,
"version": 1
},
"new-env": {
"_environmentName": "new env",
"_site": {
"href": "/fourth-project/new-env/features/randomflag",
"type": "text/html"
},
"_summary": {
"prerequisites": 0,
"variations": {
"0": {
"contextTargets": 0,
"isFallthrough": true,
"nullRules": 0,
"rules": 0,
"targets": 0
},
"1": {
"contextTargets": 0,
"isOff": true,
"nullRules": 0,
"rules": 0,
"targets": 0
}
}
},
"archived": false,
"lastModified": 1718299647539,
"on": false,
"salt": "caa436a38411406491f0da9230349bb3",
"sel": "8bcf1667ab2f4f628fc26ad31966f045",
"trackEvents": false,
"trackEventsFallthrough": false,
"version": 1
},
"new-project": {
"_environmentName": "new_project",
"_site": {
"href": "/fourth-project/new-project/features/randomflag",
"type": "text/html"
},
"_summary": {
"prerequisites": 0,
"variations": {
"0": {
"contextTargets": 0,
"isFallthrough": true,
"nullRules": 0,
"rules": 0,
"targets": 0
},
"1": {
"contextTargets": 0,
"isOff": true,
"nullRules": 0,
"rules": 0,
"targets": 0
}
}
},
"archived": false,
"lastModified": 1718299647539,
"on": false,
"salt": "f79c8849d22d497d8a519fbb6263aeda",
"sel": "257f0acaf18f4252b40258f8aa93b966",
"trackEvents": false,
"trackEventsFallthrough": false,
"version": 1
},
"production": {
"_environmentName": "Production",
"_site": {
"href": "/fourth-project/production/features/randomflag",
"type": "text/html"
},
"_summary": {
"prerequisites": 0,
"variations": {
"0": {
"contextTargets": 0,
"isFallthrough": true,
"nullRules": 0,
"rules": 0,
"targets": 0
},
"1": {
"contextTargets": 0,
"isOff": true,
"nullRules": 0,
"rules": 0,
"targets": 0
}
}
},
"archived": false,
"lastModified": 1718299647539,
"on": false,
"salt": "28c5efba5fd445d5896a8b9f7f8fbff6",
"sel": "28a317cdf3aa4d40b8a0b1c6f56be4c9",
"trackEvents": false,
"trackEventsFallthrough": false,
"version": 1
},
"shadow": {
"_environmentName": "shadow",
"_site": {
"href": "/fourth-project/shadow/features/randomflag",
"type": "text/html"
},
"_summary": {
"prerequisites": 0,
"variations": {
"0": {
"contextTargets": 0,
"isFallthrough": true,
"nullRules": 0,
"rules": 0,
"targets": 0
},
"1": {
"contextTargets": 0,
"isOff": true,
"nullRules": 0,
"rules": 0,
"targets": 0
}
}
},
"archived": false,
"lastModified": 1718311480830,
"on": false,
"salt": "cb214aeac84f48d08ff136514c589b11",
"sel": "00b5f9ae56a547db9c4e5e619bdb39f3",
"trackEvents": false,
"trackEventsFallthrough": false,
"version": 1
},
"some-random-env": {
"_environmentName": "some-random-env",
"_site": {
"href": "/fourth-project/some-random-env/features/randomflag",
"type": "text/html"
},
"_summary": {
"prerequisites": 0,
"variations": {
"0": {
"contextTargets": 0,
"isFallthrough": true,
"nullRules": 0,
"rules": 0,
"targets": 0
},
"1": {
"contextTargets": 0,
"isOff": true,
"nullRules": 0,
"rules": 0,
"targets": 0
}
}
},
"archived": false,
"lastModified": 1718300514123,
"on": false,
"salt": "0618861de85c48a5a77c360db7a8847b",
"sel": "5ae511fe5630469084453c2c4d45f719",
"trackEvents": false,
"trackEventsFallthrough": false,
"version": 1
},
"staging": {
"_environmentName": "staging",
"_site": {
"href": "/fourth-project/staging/features/randomflag",
"type": "text/html"
},
"_summary": {
"prerequisites": 0,
"variations": {
"0": {
"contextTargets": 0,
"isFallthrough": true,
"nullRules": 0,
"rules": 0,
"targets": 0
},
"1": {
"contextTargets": 0,
"isOff": true,
"nullRules": 0,
"rules": 0,
"targets": 0
}
}
},
"archived": false,
"lastModified": 1718300902420,
"on": false,
"salt": "bc27ddc205984379a4863f5f1323bdb0",
"sel": "2762811a62734de79277544ff4362f8c",
"trackEvents": false,
"trackEventsFallthrough": false,
"version": 1
},
"test": {
"_environmentName": "Test",
"_site": {
"href": "/fourth-project/test/features/randomflag",
"type": "text/html"
},
"_summary": {
"prerequisites": 0,
"variations": {
"0": {
"contextTargets": 0,
"isFallthrough": true,
"nullRules": 0,
"rules": 0,
"targets": 0
},
"1": {
"contextTargets": 0,
"isOff": true,
"nullRules": 0,
"rules": 0,
"targets": 0
}
}
},
"archived": false,
"lastModified": 1718299647539,
"on": false,
"salt": "fac0fe470f844433986166f3d570415d",
"sel": "8e8ae9542dc94f35b1ac64c845277d8a",
"trackEvents": false,
"trackEventsFallthrough": false,
"version": 1
}
},
"experiments": {
"baselineIdx": 0,
"items": []
},
"goalIds": [],
"includeInSnippet": false,
"key": "randomflag",
"kind": "boolean",
"maintainerId": "6669b0f34162860fefd6d724",
"name": "randomflag",
"tags": [],
"temporary": true,
"variationJsonSchema": null,
"variations": [
{
"_id": "8868f0d9-8b1d-4575-9436-827188276792",
"value": true
},
{
"_id": "8929317b-d2aa-479c-9249-e6c0ec5dc415",
"value": false
}
],
"__projectKey": "fourth-project"
}
Environment response data
{
"_links": {
"analytics": {
"href": "https://app.launchdarkly.com/snippet/events/v1/666b2a74cbdbfb108f3fc911.js",
"type": "text/html"
},
"apiKey": {
"href": "/api/v2/projects/fourth-project/environments/fourth-env/apiKey",
"type": "application/json"
},
"mobileKey": {
"href": "/api/v2/projects/fourth-project/environments/fourth-env/mobileKey",
"type": "application/json"
},
"self": {
"href": "/api/v2/projects/fourth-project/environments/fourth-env",
"type": "application/json"
},
"snippet": {
"href": "https://app.launchdarkly.com/snippet/features/666b2a74cbdbfb108f3fc911.js",
"type": "text/html"
}
},
"_id": "666b2a74cbdbfb108f3fc911",
"_pubnub": {
"channel": "b4f644c56dbbfe88a4028cb2d2142c258926f9b7a9add263d105202f0cd6599c",
"cipherKey": "9571e2de187881614fe9b6b94d13a99fbdb056e508c9226e6c6bb7d0be117725"
},
"key": "fourth-env",
"name": "fourth-env",
"apiKey": "sdk-1b3cf928-acae-4553-aab3-c956b7f04219",
"mobileKey": "mob-87679d8a-698d-4c5f-9ec1-05e368975afe",
"color": "e2e6ff",
"defaultTtl": 0,
"secureMode": false,
"defaultTrackEvents": false,
"requireComments": false,
"confirmChanges": false,
"tags": [],
"approvalSettings": {
"required": false,
"bypassApprovalsForPendingChanges": false,
"minNumApprovals": 1,
"canReviewOwnRequest": false,
"canApplyDeclinedChanges": true,
"serviceKind": "launchdarkly",
"serviceConfig": {},
"requiredApprovalTags": []
},
"critical": false,
"__projectKey": "fourth-project"
}
Feature Flag In Environment response data
{
"_links": {
"parent": {
"href": "/api/v2/flags/fourth-project/olulufe",
"type": "application/json"
},
"self": {
"href": "/api/v2/flag-statuses/fourth-project/shadow/olulufe",
"type": "application/json"
}
},
"name": "new",
"lastRequested": null,
"__environmentKey": "shadow",
"__projectKey": "fourth-project"
}

Mapping Result

The combination of the sample payload and the Ocean configuration generates the following Port entity:

Project entity in Port
{
"identifier": "fourth-project",
"title": "Fourth Project",
"blueprint": "launchDarklyProject",
"properties": {
"tags": []
},
"relation": {
"service": "fourth-project"
}
}
Feature Flag entity in Port
{
"identifier": "randomflag-fourth-project",
"title": "randomflag",
"blueprint": "launchDarklyFeatureFlag",
"properties": {
"kind": "boolean",
"description": "",
"creationDate": "2024-06-13T17:27:27Z",
"clientSideAvailability": {
"usingEnvironmentId": false,
"usingMobileKey": false
},
"temporary": true,
"tags": [],
"maintainer": "example@gmail.com",
"deprecated": false,
"variations": [
{
"_id": "8868f0d9-8b1d-4575-9436-827188276792",
"value": true
},
{
"_id": "8929317b-d2aa-479c-9249-e6c0ec5dc415",
"value": false
}
],
"customProperties": {},
"archived": false
},
"relations": {
"project": "fourth-project"
}
}
Environment entity in Port
{
"identifier": "fourth-env-fourth-project",
"title": "fourth-env",
"blueprint": "launchDarklyEnvironment",
"properties": {
"defaultTtl": 0,
"secureMode": false,
"defaultTrackEvents": false,
"requireComments": false,
"confirmChanges": false,
"tags": [],
"critical": false
},
"relations": {
"project": "fourth-project"
}
}
Feature Flag In Environment entity in Port
{
"identifier": "olulufe-shadow",
"title": "olulufe-shadow",
"blueprint": "launchDarklyFFInEnvironment",
"properties": {
"status": "new"
},
"relations": {
"environment": "shadow-fourth-project",
"featureFlag": "olulufe-fourth-project"
}
}

Relevant Guides

For relevant guides and examples, see the guides section.