Environment

February 28, 2026 ยท View on GitHub

Example Usage

import { Environment } from "@launchdarkly/mcp-server/models/components";

let value: Environment = {
  links: {
    "self": {
      href: "/api/v2/projects/my-project/environments/my-environment",
      type: "application/json",
    },
  },
  id: "57be1db38b75bf0772d11384",
  key: "environment-key-123abc",
  name: "My Environment",
  apiKey: "sdk-xxx",
  mobileKey: "mob-xxx",
  color: "F5A623",
  defaultTtl: 5,
  secureMode: true,
  access: {
    denied: [],
    allowed: [],
  },
  defaultTrackEvents: false,
  requireComments: true,
  confirmChanges: true,
  tags: [
    "ops",
  ],
  approvalSettings: {
    required: true,
    bypassApprovalsForPendingChanges: false,
    minNumApprovals: 1,
    canReviewOwnRequest: false,
    canApplyDeclinedChanges: true,
    autoApplyApprovedChanges: true,
    serviceKind: "launchdarkly",
    serviceConfig: {},
    requiredApprovalTags: [
      "require-approval",
    ],
    serviceKindConfigurationId: "1ef45a85-218f-4428-a8b2-a97e5f56c258",
  },
  resourceApprovalSettings: {
    "key": {
      required: true,
      bypassApprovalsForPendingChanges: false,
      minNumApprovals: 1,
      canReviewOwnRequest: false,
      canApplyDeclinedChanges: true,
      autoApplyApprovedChanges: true,
      serviceKind: "launchdarkly",
      serviceConfig: {},
      requiredApprovalTags: [
        "require-approval",
      ],
      serviceKindConfigurationId: "1ef45a85-218f-4428-a8b2-a97e5f56c258",
    },
  },
  critical: true,
};

Fields

FieldTypeRequiredDescriptionExample
linksRecord<string, components.Link>:heavy_check_mark:The location and content type of related resources{
"self": {
"href": "/api/v2/projects/my-project/environments/my-environment",
"type": "application/json"
}
}
idstring:heavy_check_mark:The ID for the environment. Use this as the client-side ID for authorization in some client-side SDKs, and to associate LaunchDarkly environments with CDN integrations in edge SDKs.57be1db38b75bf0772d11384
keystring:heavy_check_mark:A project-unique key for the new environmentenvironment-key-123abc
namestring:heavy_check_mark:A human-friendly name for the new environmentMy Environment
apiKeystring:heavy_check_mark:The SDK key for the environment. Use this for authorization in server-side SDKs.sdk-xxx
mobileKeystring:heavy_check_mark:The mobile key for the environment. Use this for authorization in mobile SDKs.mob-xxx
colorstring:heavy_check_mark:The color used to indicate this environment in the UIF5A623
defaultTtlnumber:heavy_check_mark:The default time (in minutes) that the PHP SDK can cache feature flag rules locally5
secureModeboolean:heavy_check_mark:Ensures that one end user of the client-side SDK cannot inspect the variations for another end usertrue
accesscomponents.Access:heavy_minus_sign:N/A
defaultTrackEventsboolean:heavy_check_mark:Enables tracking detailed information for new flags by defaultfalse
requireCommentsboolean:heavy_check_mark:Whether members who modify flags and segments through the LaunchDarkly user interface are required to add a commenttrue
confirmChangesboolean:heavy_check_mark:Whether members who modify flags and segments through the LaunchDarkly user interface are required to confirm those changestrue
tagsstring[]:heavy_check_mark:A list of tags for this environment[
"ops"
]
approvalSettingscomponents.ApprovalSettings:heavy_minus_sign:N/A
resourceApprovalSettingsRecord<string, components.ApprovalSettings>:heavy_minus_sign:Details on the approval settings for this environment for each resource kind
criticalboolean:heavy_check_mark:Whether the environment is criticaltrue