Skip to content

Latest commit

 

History

History
320 lines (252 loc) · 11.9 KB

FollowFlagsApi.md

File metadata and controls

320 lines (252 loc) · 11.9 KB

FollowFlagsApi

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

Method HTTP request Description
deleteFlagFollower 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
getFlagFollowers GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers Get followers of a flag in a project and environment
getFollowersByProjEnv GET /api/v2/projects/{projectKey}/environments/{environmentKey}/followers Get followers of all flags in a given project and environment
putFlagFollower 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

deleteFlagFollower

deleteFlagFollower(projectKey, featureFlagKey, environmentKey, memberId)

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

// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.FollowFlagsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://app.launchdarkly.com");
    
    // Configure API key authorization: ApiKey
    ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
    ApiKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKey.setApiKeyPrefix("Token");

    FollowFlagsApi apiInstance = new FollowFlagsApi(defaultClient);
    String projectKey = "projectKey_example"; // String | The project key
    String featureFlagKey = "featureFlagKey_example"; // String | The feature flag key
    String environmentKey = "environmentKey_example"; // String | The environment key
    String memberId = "memberId_example"; // String | The memberId of the member to remove as a follower of the flag. Reader roles can only remove themselves.
    try {
      apiInstance.deleteFlagFollower(projectKey, featureFlagKey, environmentKey, memberId);
    } catch (ApiException e) {
      System.err.println("Exception when calling FollowFlagsApi#deleteFlagFollower");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
projectKey String The project key
featureFlagKey String The feature flag key
environmentKey String The environment key
memberId String The memberId of the member to remove as a follower of the flag. Reader roles can only remove themselves.

Return type

null (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 -

getFlagFollowers

FlagFollowersGetRep getFlagFollowers(projectKey, featureFlagKey, environmentKey)

Get followers of a flag in a project and environment

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

Example

// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.FollowFlagsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://app.launchdarkly.com");
    
    // Configure API key authorization: ApiKey
    ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
    ApiKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKey.setApiKeyPrefix("Token");

    FollowFlagsApi apiInstance = new FollowFlagsApi(defaultClient);
    String projectKey = "projectKey_example"; // String | The project key
    String featureFlagKey = "featureFlagKey_example"; // String | The feature flag key
    String environmentKey = "environmentKey_example"; // String | The environment key
    try {
      FlagFollowersGetRep result = apiInstance.getFlagFollowers(projectKey, featureFlagKey, environmentKey);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling FollowFlagsApi#getFlagFollowers");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
projectKey String The project key
featureFlagKey String The feature flag key
environmentKey String 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 -

getFollowersByProjEnv

FlagFollowersByProjEnvGetRep getFollowersByProjEnv(projectKey, environmentKey)

Get followers of all flags in a given project and environment

Get followers of all flags in a given environment and project

Example

// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.FollowFlagsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://app.launchdarkly.com");
    
    // Configure API key authorization: ApiKey
    ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
    ApiKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKey.setApiKeyPrefix("Token");

    FollowFlagsApi apiInstance = new FollowFlagsApi(defaultClient);
    String projectKey = "projectKey_example"; // String | The project key
    String environmentKey = "environmentKey_example"; // String | The environment key
    try {
      FlagFollowersByProjEnvGetRep result = apiInstance.getFollowersByProjEnv(projectKey, environmentKey);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling FollowFlagsApi#getFollowersByProjEnv");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
projectKey String The project key
environmentKey String 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 -

putFlagFollower

putFlagFollower(projectKey, featureFlagKey, environmentKey, memberId)

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

// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.FollowFlagsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://app.launchdarkly.com");
    
    // Configure API key authorization: ApiKey
    ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
    ApiKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKey.setApiKeyPrefix("Token");

    FollowFlagsApi apiInstance = new FollowFlagsApi(defaultClient);
    String projectKey = "projectKey_example"; // String | The project key
    String featureFlagKey = "featureFlagKey_example"; // String | The feature flag key
    String environmentKey = "environmentKey_example"; // String | The environment key
    String memberId = "memberId_example"; // String | The memberId of the member to add as a follower of the flag. Reader roles can only add themselves.
    try {
      apiInstance.putFlagFollower(projectKey, featureFlagKey, environmentKey, memberId);
    } catch (ApiException e) {
      System.err.println("Exception when calling FollowFlagsApi#putFlagFollower");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
projectKey String The project key
featureFlagKey String The feature flag key
environmentKey String The environment key
memberId String The memberId of the member to add as a follower of the flag. Reader roles can only add themselves.

Return type

null (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 -