Skip to content

Latest commit

 

History

History
259 lines (180 loc) · 7.43 KB

File metadata and controls

259 lines (180 loc) · 7.43 KB

FlagLinksBetaApi

All URIs are relative to https://app.launchdarkly.com

Method HTTP request Description
createFlagLink POST /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey} Create flag link
deleteFlagLink DELETE /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id} Delete flag link
getFlagLinks GET /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey} List flag links
updateFlagLink PATCH /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id} Update flag link

createFlagLink

FlagLinkRep createFlagLink(flagLinkPost)

Create a new flag link. Flag links let you reference external resources and associate them with your flags.

Example

import {
    FlagLinksBetaApi,
    Configuration,
    FlagLinkPost
} from 'launchdarkly-api-typescript';

const configuration = new Configuration();
const apiInstance = new FlagLinksBetaApi(configuration);

let projectKey: string; //The project key (default to undefined)
let featureFlagKey: string; //The feature flag key (default to undefined)
let flagLinkPost: FlagLinkPost; //

const { status, data } = await apiInstance.createFlagLink(
    projectKey,
    featureFlagKey,
    flagLinkPost
);

Parameters

Name Type Description Notes
flagLinkPost FlagLinkPost
projectKey [string] The project key defaults to undefined
featureFlagKey [string] The feature flag key defaults to undefined

Return type

FlagLinkRep

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Flag link response -
400 Invalid request -
401 Invalid access token -
403 Forbidden -
404 Invalid resource identifier -
429 Rate limited -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteFlagLink

deleteFlagLink()

Delete a flag link by ID or key.

Example

import {
    FlagLinksBetaApi,
    Configuration
} from 'launchdarkly-api-typescript';

const configuration = new Configuration();
const apiInstance = new FlagLinksBetaApi(configuration);

let projectKey: string; //The project key (default to undefined)
let featureFlagKey: string; //The feature flag key (default to undefined)
let id: string; //The flag link ID or Key (default to undefined)

const { status, data } = await apiInstance.deleteFlagLink(
    projectKey,
    featureFlagKey,
    id
);

Parameters

Name Type Description Notes
projectKey [string] The project key defaults to undefined
featureFlagKey [string] The feature flag key defaults to undefined
id [string] The flag link ID or Key defaults to undefined

Return type

void (empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 Action succeeded -
400 Invalid request -
401 Invalid access token -
403 Forbidden -
404 Invalid resource identifier -
429 Rate limited -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFlagLinks

FlagLinkCollectionRep getFlagLinks()

Get a list of all flag links.

Example

import {
    FlagLinksBetaApi,
    Configuration
} from 'launchdarkly-api-typescript';

const configuration = new Configuration();
const apiInstance = new FlagLinksBetaApi(configuration);

let projectKey: string; //The project key (default to undefined)
let featureFlagKey: string; //The feature flag key (default to undefined)

const { status, data } = await apiInstance.getFlagLinks(
    projectKey,
    featureFlagKey
);

Parameters

Name Type Description Notes
projectKey [string] The project key defaults to undefined
featureFlagKey [string] The feature flag key defaults to undefined

Return type

FlagLinkCollectionRep

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Flag link collection response -
401 Invalid access token -
403 Forbidden -
429 Rate limited -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateFlagLink

FlagLinkRep updateFlagLink(patchOperation)

Update a flag link. Updating a flag link uses a JSON patch representation of the desired changes. To learn more, read Updates.

Example

import {
    FlagLinksBetaApi,
    Configuration
} from 'launchdarkly-api-typescript';

const configuration = new Configuration();
const apiInstance = new FlagLinksBetaApi(configuration);

let projectKey: string; //The project key (default to undefined)
let featureFlagKey: string; //The feature flag key (default to undefined)
let id: string; //The flag link ID (default to undefined)
let patchOperation: Array<PatchOperation>; //

const { status, data } = await apiInstance.updateFlagLink(
    projectKey,
    featureFlagKey,
    id,
    patchOperation
);

Parameters

Name Type Description Notes
patchOperation Array
projectKey [string] The project key defaults to undefined
featureFlagKey [string] The feature flag key defaults to undefined
id [string] The flag link ID defaults to undefined

Return type

FlagLinkRep

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Flag link response -
400 Invalid request -
401 Invalid access token -
403 Forbidden -
404 Invalid resource identifier -
409 Status conflict -
429 Rate limited -

[Back to top] [Back to API list] [Back to Model list] [Back to README]