Skip to content

Latest commit

 

History

History
394 lines (294 loc) · 14 KB

FlagLinksBetaApi.md

File metadata and controls

394 lines (294 loc) · 14 KB

launchdarkly_api.FlagLinksBetaApi

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

Method HTTP request Description
create_flag_link POST /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey} Create flag link
delete_flag_link DELETE /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id} Delete flag link
get_flag_links GET /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey} List flag links
update_flag_link PATCH /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id} Update flag link

create_flag_link

FlagLinkRep create_flag_link(project_key, feature_flag_key, flag_link_post)

Create flag link

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

Example

  • Api Key Authentication (ApiKey):
import time
import launchdarkly_api
from launchdarkly_api.api import flag_links_beta_api
from launchdarkly_api.model.invalid_request_error_rep import InvalidRequestErrorRep
from launchdarkly_api.model.forbidden_error_rep import ForbiddenErrorRep
from launchdarkly_api.model.not_found_error_rep import NotFoundErrorRep
from launchdarkly_api.model.rate_limited_error_rep import RateLimitedErrorRep
from launchdarkly_api.model.unauthorized_error_rep import UnauthorizedErrorRep
from launchdarkly_api.model.flag_link_rep import FlagLinkRep
from launchdarkly_api.model.flag_link_post import FlagLinkPost
from pprint import pprint
# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
    host = "https://app.launchdarkly.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = flag_links_beta_api.FlagLinksBetaApi(api_client)
    project_key = "projectKey_example" # str | The project key
    feature_flag_key = "featureFlagKey_example" # str | The feature flag key
    flag_link_post = FlagLinkPost(
        key="flag-link-key-123abc",
        integration_key="integration_key_example",
        timestamp=1,
        deep_link="https://example.com/archives/123123123",
        title="Example link title",
        description="Example link description",
        metadata={
            "key": "key_example",
        },
    ) # FlagLinkPost | 

    # example passing only required values which don't have defaults set
    try:
        # Create flag link
        api_response = api_instance.create_flag_link(project_key, feature_flag_key, flag_link_post)
        pprint(api_response)
    except launchdarkly_api.ApiException as e:
        print("Exception when calling FlagLinksBetaApi->create_flag_link: %s\n" % e)

Parameters

Name Type Description Notes
project_key str The project key
feature_flag_key str The feature flag key
flag_link_post FlagLinkPost

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]

delete_flag_link

delete_flag_link(project_key, feature_flag_key, id)

Delete flag link

Delete a flag link by ID or key.

Example

  • Api Key Authentication (ApiKey):
import time
import launchdarkly_api
from launchdarkly_api.api import flag_links_beta_api
from launchdarkly_api.model.invalid_request_error_rep import InvalidRequestErrorRep
from launchdarkly_api.model.forbidden_error_rep import ForbiddenErrorRep
from launchdarkly_api.model.not_found_error_rep import NotFoundErrorRep
from launchdarkly_api.model.rate_limited_error_rep import RateLimitedErrorRep
from launchdarkly_api.model.unauthorized_error_rep import UnauthorizedErrorRep
from pprint import pprint
# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
    host = "https://app.launchdarkly.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = flag_links_beta_api.FlagLinksBetaApi(api_client)
    project_key = "projectKey_example" # str | The project key
    feature_flag_key = "featureFlagKey_example" # str | The feature flag key
    id = "id_example" # str | The flag link ID or Key

    # example passing only required values which don't have defaults set
    try:
        # Delete flag link
        api_instance.delete_flag_link(project_key, feature_flag_key, id)
    except launchdarkly_api.ApiException as e:
        print("Exception when calling FlagLinksBetaApi->delete_flag_link: %s\n" % e)

Parameters

Name Type Description Notes
project_key str The project key
feature_flag_key str The feature flag key
id str The flag link ID or Key

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]

get_flag_links

FlagLinkCollectionRep get_flag_links(project_key, feature_flag_key)

List flag links

Get a list of all flag links.

Example

  • Api Key Authentication (ApiKey):
import time
import launchdarkly_api
from launchdarkly_api.api import flag_links_beta_api
from launchdarkly_api.model.forbidden_error_rep import ForbiddenErrorRep
from launchdarkly_api.model.flag_link_collection_rep import FlagLinkCollectionRep
from launchdarkly_api.model.rate_limited_error_rep import RateLimitedErrorRep
from launchdarkly_api.model.unauthorized_error_rep import UnauthorizedErrorRep
from pprint import pprint
# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
    host = "https://app.launchdarkly.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = flag_links_beta_api.FlagLinksBetaApi(api_client)
    project_key = "projectKey_example" # str | The project key
    feature_flag_key = "featureFlagKey_example" # str | The feature flag key

    # example passing only required values which don't have defaults set
    try:
        # List flag links
        api_response = api_instance.get_flag_links(project_key, feature_flag_key)
        pprint(api_response)
    except launchdarkly_api.ApiException as e:
        print("Exception when calling FlagLinksBetaApi->get_flag_links: %s\n" % e)

Parameters

Name Type Description Notes
project_key str The project key
feature_flag_key str The feature flag key

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]

update_flag_link

FlagLinkRep update_flag_link(project_key, feature_flag_key, id, json_patch)

Update flag link

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

Example

  • Api Key Authentication (ApiKey):
import time
import launchdarkly_api
from launchdarkly_api.api import flag_links_beta_api
from launchdarkly_api.model.json_patch import JSONPatch
from launchdarkly_api.model.invalid_request_error_rep import InvalidRequestErrorRep
from launchdarkly_api.model.forbidden_error_rep import ForbiddenErrorRep
from launchdarkly_api.model.not_found_error_rep import NotFoundErrorRep
from launchdarkly_api.model.rate_limited_error_rep import RateLimitedErrorRep
from launchdarkly_api.model.unauthorized_error_rep import UnauthorizedErrorRep
from launchdarkly_api.model.flag_link_rep import FlagLinkRep
from launchdarkly_api.model.status_conflict_error_rep import StatusConflictErrorRep
from pprint import pprint
# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
    host = "https://app.launchdarkly.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = flag_links_beta_api.FlagLinksBetaApi(api_client)
    project_key = "projectKey_example" # str | The project key
    feature_flag_key = "featureFlagKey_example" # str | The feature flag key
    id = "id_example" # str | The flag link ID
    json_patch = JSONPatch([
        PatchOperation(
            op="replace",
            path="/exampleField",
            value=None,
        ),
    ]) # JSONPatch | 

    # example passing only required values which don't have defaults set
    try:
        # Update flag link
        api_response = api_instance.update_flag_link(project_key, feature_flag_key, id, json_patch)
        pprint(api_response)
    except launchdarkly_api.ApiException as e:
        print("Exception when calling FlagLinksBetaApi->update_flag_link: %s\n" % e)

Parameters

Name Type Description Notes
project_key str The project key
feature_flag_key str The feature flag key
id str The flag link ID
json_patch JSONPatch

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]