Skip to content

Latest commit

 

History

History
118 lines (80 loc) · 5.29 KB

ApprovalsBetaApi.md

File metadata and controls

118 lines (80 loc) · 5.29 KB

LaunchDarklyApi.ApprovalsBetaApi

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

Method HTTP request Description
patchApprovalRequest PATCH /api/v2/approval-requests/{id} Update approval request
patchFlagConfigApprovalRequest PATCH /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id} Update flag approval request

patchApprovalRequest

FlagConfigApprovalRequestResponse patchApprovalRequest(id)

Update approval request

Perform a partial update to an approval request. Updating an approval request uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read Updates using semantic patch. ### Instructions Semantic patch requests support the following `kind` instruction for updating an approval request. #### addReviewers Adds the specified members and teams to the existing list of reviewers. You must include at least one of `notifyMemberIds` and `notifyTeamKeys`. ##### Parameters - `notifyMemberIds`: (Optional) List of member IDs. - `notifyTeamKeys`: (Optional) List of team keys. Here's an example: ```json { "instructions": [{ "kind": "addReviewers", "notifyMemberIds": [ "user-key-123abc", "user-key-456def" ], "notifyTeamKeys": [ "team-key-789abc"] }] } ```

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.ApprovalsBetaApi();
let id = "id_example"; // String | The approval ID
apiInstance.patchApprovalRequest(id, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
id String The approval ID

Return type

FlagConfigApprovalRequestResponse

Authorization

ApiKey

HTTP request headers

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

patchFlagConfigApprovalRequest

FlagConfigApprovalRequestResponse patchFlagConfigApprovalRequest(projectKey, featureFlagKey, environmentKey, id)

Update flag approval request

Perform a partial update to an approval request. Updating an approval request uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read Updates using semantic patch. ### Instructions Semantic patch requests support the following `kind` instruction for updating an approval request. #### addReviewers Adds the specified members and teams to the existing list of reviewers. You must include at least one of `notifyMemberIds` and `notifyTeamKeys`. ##### Parameters - `notifyMemberIds`: (Optional) List of member IDs. - `notifyTeamKeys`: (Optional) List of team keys.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.ApprovalsBetaApi();
let projectKey = "projectKey_example"; // String | The project key
let featureFlagKey = "featureFlagKey_example"; // String | The feature flag key
let environmentKey = "environmentKey_example"; // String | The environment key
let id = "id_example"; // String | The approval ID
apiInstance.patchFlagConfigApprovalRequest(projectKey, featureFlagKey, environmentKey, id, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
projectKey String The project key
featureFlagKey String The feature flag key
environmentKey String The environment key
id String The approval ID

Return type

FlagConfigApprovalRequestResponse

Authorization

ApiKey

HTTP request headers

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