Skip to content

Latest commit

 

History

History
286 lines (197 loc) · 9.26 KB

ReleasesBetaApi.md

File metadata and controls

286 lines (197 loc) · 9.26 KB

LaunchDarklyApi.ReleasesBetaApi

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

Method HTTP request Description
createReleaseForFlag PUT /api/v2/projects/{projectKey}/flags/{flagKey}/release Create a new release for flag
deleteReleaseByFlagKey DELETE /api/v2/flags/{projectKey}/{flagKey}/release Delete a release for flag
getReleaseByFlagKey GET /api/v2/flags/{projectKey}/{flagKey}/release Get release for flag
patchReleaseByFlagKey PATCH /api/v2/flags/{projectKey}/{flagKey}/release Patch release for flag
updatePhaseStatus PUT /api/v2/projects/{projectKey}/flags/{flagKey}/release/phases/{phaseId} Update phase status for release

createReleaseForFlag

Release createReleaseForFlag(projectKey, flagKey, createReleaseInput)

Create a new release for flag

Creates a release by adding a flag to a release pipeline

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.ReleasesBetaApi();
let projectKey = "projectKey_example"; // String | The project key
let flagKey = "flagKey_example"; // String | The flag key
let createReleaseInput = new LaunchDarklyApi.CreateReleaseInput(); // CreateReleaseInput | 
apiInstance.createReleaseForFlag(projectKey, flagKey, createReleaseInput, (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
flagKey String The flag key
createReleaseInput CreateReleaseInput

Return type

Release

Authorization

ApiKey

HTTP request headers

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

deleteReleaseByFlagKey

deleteReleaseByFlagKey(projectKey, flagKey)

Delete a release for flag

Deletes a release from a flag

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.ReleasesBetaApi();
let projectKey = "projectKey_example"; // String | The project key
let flagKey = "flagKey_example"; // String | The flag key
apiInstance.deleteReleaseByFlagKey(projectKey, flagKey, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
projectKey String The project key
flagKey String The flag key

Return type

null (empty response body)

Authorization

ApiKey

HTTP request headers

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

getReleaseByFlagKey

Release getReleaseByFlagKey(projectKey, flagKey)

Get release for flag

Get currently active release for a flag

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.ReleasesBetaApi();
let projectKey = "projectKey_example"; // String | The project key
let flagKey = "flagKey_example"; // String | The flag key
apiInstance.getReleaseByFlagKey(projectKey, flagKey, (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
flagKey String The flag key

Return type

Release

Authorization

ApiKey

HTTP request headers

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

patchReleaseByFlagKey

Release patchReleaseByFlagKey(projectKey, flagKey, patchOperation)

Patch release for flag

This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the Update phase status for release endpoint. To learn more about migrating from legacy release pipelines to fully automated release pipelines, read the Release pipeline migration guide. Update currently active release for a flag. Updating releases requires the JSON patch format. To learn more, read Updates. You can only use this endpoint to mark a release phase complete or incomplete. To indicate which phase to update, use the array index in the `path`. For example, to mark the first phase of a release as complete, use the following request body: ``` [ { "op": "replace", "path": "/phase/0/complete", "value": true } ] ```

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.ReleasesBetaApi();
let projectKey = "projectKey_example"; // String | The project key
let flagKey = "flagKey_example"; // String | The flag key
let patchOperation = [{"op":"replace","path":"/phases/0/complete","value":true}]; // [PatchOperation] | 
apiInstance.patchReleaseByFlagKey(projectKey, flagKey, patchOperation, (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
flagKey String The flag key
patchOperation [PatchOperation]

Return type

Release

Authorization

ApiKey

HTTP request headers

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

updatePhaseStatus

Release updatePhaseStatus(projectKey, flagKey, phaseId, updatePhaseStatusInput)

Update phase status for release

Updates the execution status of a phase of a release

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.ReleasesBetaApi();
let projectKey = "projectKey_example"; // String | The project key
let flagKey = "flagKey_example"; // String | The flag key
let phaseId = "phaseId_example"; // String | The phase ID
let updatePhaseStatusInput = new LaunchDarklyApi.UpdatePhaseStatusInput(); // UpdatePhaseStatusInput | 
apiInstance.updatePhaseStatus(projectKey, flagKey, phaseId, updatePhaseStatusInput, (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
flagKey String The flag key
phaseId String The phase ID
updatePhaseStatusInput UpdatePhaseStatusInput

Return type

Release

Authorization

ApiKey

HTTP request headers

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