For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
      • POSTCreate a flag import configuration
      • DELDelete a flag import configuration
      • GETGet a single flag import configuration
      • GETList all flag import configurations
      • POSTTrigger a single flag import run
      • PATCHUpdate a flag import configuration
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewFlag Import Configurations Beta

Create a flag import configuration

POST
/api/v2/integration-capabilities/flag-import/:projectKey/:integrationKey
POST
/api/v2/integration-capabilities/flag-import/:projectKey/:integrationKey
$curl -X POST https://app.launchdarkly.com/api/v2/integration-capabilities/flag-import/projectKey/integrationKey \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "config": {
> "environmentId": "The ID of the environment in the external system",
> "ldApiKey": "An API key with create flag permissions in your LaunchDarkly account",
> "ldMaintainer": "The ID of the member who will be the maintainer of the imported flags",
> "ldTag": "A tag to apply to all flags imported to LaunchDarkly",
> "splitTag": "If provided, imports only the flags from the external system with this tag. Leave blank to import all flags.",
> "workspaceApiKey": "An API key with read permissions in the external feature management system",
> "workspaceId": "The ID of the workspace in the external system"
> },
> "tags": [
> "example-tag"
> ],
> "name": "Sample configuration"
>}'
1{
2 "_links": {
3 "self": {
4 "href": "string",
5 "type": "string"
6 },
7 "parent": {
8 "href": "string",
9 "type": "string"
10 },
11 "project": {
12 "href": "string",
13 "type": "string"
14 }
15 },
16 "_id": "12ab3c4d5ef1a2345bcde67f",
17 "integrationKey": "split",
18 "projectKey": "default",
19 "config": {},
20 "tags": [],
21 "name": "Development environment configuration",
22 "version": 1,
23 "_status": {
24 "status": "pending",
25 "lastImport": 1717263000000,
26 "lastError": 1714584600000,
27 "errors": [
28 {
29 "integrationId": "string",
30 "message": "string",
31 "statusCode": 1,
32 "timestamp": 1
33 }
34 ]
35 },
36 "_access": {
37 "denied": [
38 {
39 "action": "string",
40 "reason": {
41 "effect": "allow",
42 "resources": [
43 "proj/*:env/*;qa_*:/flag/*"
44 ],
45 "notResources": [
46 "string"
47 ],
48 "actions": [
49 "*"
50 ],
51 "notActions": [
52 "string"
53 ],
54 "role_name": "string"
55 }
56 }
57 ],
58 "allowed": [
59 {
60 "action": "string",
61 "reason": {
62 "effect": "allow",
63 "resources": [
64 "proj/*:env/*;qa_*:/flag/*"
65 ],
66 "notResources": [
67 "string"
68 ],
69 "actions": [
70 "*"
71 ],
72 "notActions": [
73 "string"
74 ],
75 "role_name": "string"
76 }
77 }
78 ]
79 }
80}
Create a new flag import configuration. The `integrationKey` path parameter identifies the feature management system from which the import occurs, for example, `split`. The `config` object in the request body schema is described by the global integration settings, as specified by the <code>formVariables</code> in the <code>manifest.json</code> for this integration. It varies slightly based on the `integrationKey`.
Was this page helpful?
Previous

Delete a flag import configuration

Next
Built with

Create a new flag import configuration. The integrationKey path parameter identifies the feature management system from which the import occurs, for example, split. The config object in the request body schema is described by the global integration settings, as specified by the formVariables in the manifest.json for this integration. It varies slightly based on the integrationKey.

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequiredformat: "string"
The project key
integrationKeystringRequiredformat: "string"
The integration key

Request

This endpoint expects an object.
configmap from strings to anyRequired

The global configuration settings, as specified by the formVariables in the manifest.json for this configuration.

tagslist of stringsOptional
Tags to associate with the configuration
namestringOptional
Name to identify the configuration

Response

Flag Import Configuration response
_linksobject
The location and content type of related resources
_idstring
The integration ID
integrationKeyenum
The integration key
Allowed values:
projectKeystring
The project key
configmap from strings to any

The configuration for the given import integration. Only included when requesting a single integration by ID. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration.

tagslist of strings
List of tags for this configuration
namestring
Name of the configuration
versioninteger
Version of the current configuration
_statusobject
Details on the status of the import job
_accessobject
Details on the allowed and denied actions for this configuration

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error