Skip to content

Latest commit

 

History

History
356 lines (248 loc) · 12.9 KB

File metadata and controls

356 lines (248 loc) · 12.9 KB

launchdarkly_api.FollowFlagsApi

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

Method HTTP request Description
delete_flag_follower DELETE /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers/{memberId} Remove a member as a follower of a flag in a project and environment
get_flag_followers GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers Get followers of a flag in a project and environment
get_followers_by_proj_env GET /api/v2/projects/{projectKey}/environments/{environmentKey}/followers Get followers of all flags in a given project and environment
put_flag_follower PUT /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers/{memberId} Add a member as a follower of a flag in a project and environment

delete_flag_follower

delete_flag_follower(project_key, feature_flag_key, environment_key, member_id)

Remove a member as a follower of a flag in a project and environment

Remove a member as a follower to a flag in a project and environment

Example

  • Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.rest import ApiException
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'] = os.environ["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 = launchdarkly_api.FollowFlagsApi(api_client)
    project_key = 'project_key_example' # str | The project key
    feature_flag_key = 'feature_flag_key_example' # str | The feature flag key
    environment_key = 'environment_key_example' # str | The environment key
    member_id = 'member_id_example' # str | The memberId of the member to remove as a follower of the flag. Reader roles can only remove themselves.

    try:
        # Remove a member as a follower of a flag in a project and environment
        api_instance.delete_flag_follower(project_key, feature_flag_key, environment_key, member_id)
    except Exception as e:
        print("Exception when calling FollowFlagsApi->delete_flag_follower: %s\n" % e)

Parameters

Name Type Description Notes
project_key str The project key
feature_flag_key str The feature flag key
environment_key str The environment key
member_id str The memberId of the member to remove as a follower of the flag. Reader roles can only remove themselves.

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 -

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

get_flag_followers

FlagFollowersGetRep get_flag_followers(project_key, feature_flag_key, environment_key)

Get followers of a flag in a project and environment

Get a list of members following a flag in a project and environment

Example

  • Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.models.flag_followers_get_rep import FlagFollowersGetRep
from launchdarkly_api.rest import ApiException
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'] = os.environ["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 = launchdarkly_api.FollowFlagsApi(api_client)
    project_key = 'project_key_example' # str | The project key
    feature_flag_key = 'feature_flag_key_example' # str | The feature flag key
    environment_key = 'environment_key_example' # str | The environment key

    try:
        # Get followers of a flag in a project and environment
        api_response = api_instance.get_flag_followers(project_key, feature_flag_key, environment_key)
        print("The response of FollowFlagsApi->get_flag_followers:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling FollowFlagsApi->get_flag_followers: %s\n" % e)

Parameters

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

Return type

FlagFollowersGetRep

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Flag followers response -
400 Invalid request -
401 Invalid access token -
403 Forbidden -
404 Invalid resource identifier -

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

get_followers_by_proj_env

FlagFollowersByProjEnvGetRep get_followers_by_proj_env(project_key, environment_key)

Get followers of all flags in a given project and environment

Get followers of all flags in a given environment and project

Example

  • Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.models.flag_followers_by_proj_env_get_rep import FlagFollowersByProjEnvGetRep
from launchdarkly_api.rest import ApiException
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'] = os.environ["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 = launchdarkly_api.FollowFlagsApi(api_client)
    project_key = 'project_key_example' # str | The project key
    environment_key = 'environment_key_example' # str | The environment key

    try:
        # Get followers of all flags in a given project and environment
        api_response = api_instance.get_followers_by_proj_env(project_key, environment_key)
        print("The response of FollowFlagsApi->get_followers_by_proj_env:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling FollowFlagsApi->get_followers_by_proj_env: %s\n" % e)

Parameters

Name Type Description Notes
project_key str The project key
environment_key str The environment key

Return type

FlagFollowersByProjEnvGetRep

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Flags and flag followers response -
400 Invalid request -
401 Invalid access token -
403 Forbidden -
404 Invalid resource identifier -

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

put_flag_follower

put_flag_follower(project_key, feature_flag_key, environment_key, member_id)

Add a member as a follower of a flag in a project and environment

Add a member as a follower to a flag in a project and environment

Example

  • Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.rest import ApiException
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'] = os.environ["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 = launchdarkly_api.FollowFlagsApi(api_client)
    project_key = 'project_key_example' # str | The project key
    feature_flag_key = 'feature_flag_key_example' # str | The feature flag key
    environment_key = 'environment_key_example' # str | The environment key
    member_id = 'member_id_example' # str | The memberId of the member to add as a follower of the flag. Reader roles can only add themselves.

    try:
        # Add a member as a follower of a flag in a project and environment
        api_instance.put_flag_follower(project_key, feature_flag_key, environment_key, member_id)
    except Exception as e:
        print("Exception when calling FollowFlagsApi->put_flag_follower: %s\n" % e)

Parameters

Name Type Description Notes
project_key str The project key
feature_flag_key str The feature flag key
environment_key str The environment key
member_id str The memberId of the member to add as a follower of the flag. Reader roles can only add themselves.

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 -

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