Skip to content
This repository was archived by the owner on Feb 3, 2026. It is now read-only.

Latest commit

 

History

History
339 lines (236 loc) · 11.7 KB

File metadata and controls

339 lines (236 loc) · 11.7 KB

LaunchDarklyApi\ReleasesBetaApi

All URIs are relative to https://app.launchdarkly.com, except if the operation defines another base path.

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

createReleaseForFlag($project_key, $flag_key, $create_release_input): \LaunchDarklyApi\Model\Release

Create a new release for flag

Creates a release by adding a flag to a release pipeline

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKey
$config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new LaunchDarklyApi\Api\ReleasesBetaApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$project_key = 'project_key_example'; // string | The project key
$flag_key = 'flag_key_example'; // string | The flag key
$create_release_input = new \LaunchDarklyApi\Model\CreateReleaseInput(); // \LaunchDarklyApi\Model\CreateReleaseInput

try {
    $result = $apiInstance->createReleaseForFlag($project_key, $flag_key, $create_release_input);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReleasesBetaApi->createReleaseForFlag: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
project_key string The project key
flag_key string The flag key
create_release_input \LaunchDarklyApi\Model\CreateReleaseInput

Return type

\LaunchDarklyApi\Model\Release

Authorization

ApiKey

HTTP request headers

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

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

deleteReleaseByFlagKey()

deleteReleaseByFlagKey($project_key, $flag_key)

Delete a release for flag

Deletes a release from a flag

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKey
$config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new LaunchDarklyApi\Api\ReleasesBetaApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$project_key = 'project_key_example'; // string | The project key
$flag_key = 'flag_key_example'; // string | The flag key

try {
    $apiInstance->deleteReleaseByFlagKey($project_key, $flag_key);
} catch (Exception $e) {
    echo 'Exception when calling ReleasesBetaApi->deleteReleaseByFlagKey: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
project_key string The project key
flag_key string The flag key

Return type

void (empty response body)

Authorization

ApiKey

HTTP request headers

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

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

getReleaseByFlagKey()

getReleaseByFlagKey($project_key, $flag_key): \LaunchDarklyApi\Model\Release

Get release for flag

Get currently active release for a flag

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKey
$config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new LaunchDarklyApi\Api\ReleasesBetaApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$project_key = 'project_key_example'; // string | The project key
$flag_key = 'flag_key_example'; // string | The flag key

try {
    $result = $apiInstance->getReleaseByFlagKey($project_key, $flag_key);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReleasesBetaApi->getReleaseByFlagKey: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
project_key string The project key
flag_key string The flag key

Return type

\LaunchDarklyApi\Model\Release

Authorization

ApiKey

HTTP request headers

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

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

patchReleaseByFlagKey()

patchReleaseByFlagKey($project_key, $flag_key, $patch_operation): \LaunchDarklyApi\Model\Release

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. 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

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKey
$config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new LaunchDarklyApi\Api\ReleasesBetaApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$project_key = 'project_key_example'; // string | The project key
$flag_key = 'flag_key_example'; // string | The flag key
$patch_operation = [{"op":"replace","path":"/phases/0/complete","value":true}]; // \LaunchDarklyApi\Model\PatchOperation[]

try {
    $result = $apiInstance->patchReleaseByFlagKey($project_key, $flag_key, $patch_operation);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReleasesBetaApi->patchReleaseByFlagKey: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
project_key string The project key
flag_key string The flag key
patch_operation \LaunchDarklyApi\Model\PatchOperation[]

Return type

\LaunchDarklyApi\Model\Release

Authorization

ApiKey

HTTP request headers

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

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

updatePhaseStatus()

updatePhaseStatus($project_key, $flag_key, $phase_id, $update_phase_status_input): \LaunchDarklyApi\Model\Release

Update phase status for release

Updates the execution status of a phase of a release

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: ApiKey
$config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new LaunchDarklyApi\Api\ReleasesBetaApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$project_key = 'project_key_example'; // string | The project key
$flag_key = 'flag_key_example'; // string | The flag key
$phase_id = 'phase_id_example'; // string | The phase ID
$update_phase_status_input = new \LaunchDarklyApi\Model\UpdatePhaseStatusInput(); // \LaunchDarklyApi\Model\UpdatePhaseStatusInput

try {
    $result = $apiInstance->updatePhaseStatus($project_key, $flag_key, $phase_id, $update_phase_status_input);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReleasesBetaApi->updatePhaseStatus: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
project_key string The project key
flag_key string The flag key
phase_id string The phase ID
update_phase_status_input \LaunchDarklyApi\Model\UpdatePhaseStatusInput

Return type

\LaunchDarklyApi\Model\Release

Authorization

ApiKey

HTTP request headers

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

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