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

Latest commit

 

History

History
653 lines (470 loc) · 24.3 KB

File metadata and controls

653 lines (470 loc) · 24.3 KB

LaunchDarklyApi\ViewsBetaApi

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

Method HTTP request Description
createView() POST /api/v2/projects/{projectKey}/views Create view
deleteView() DELETE /api/v2/projects/{projectKey}/views/{viewKey} Delete view
getLinkedResources() GET /api/v2/projects/{projectKey}/views/{viewKey}/linked/{resourceType} Get linked resources
getLinkedViews() GET /api/v2/projects/{projectKey}/view-associations/{resourceType}/{resourceKey} Get linked views for a given resource
getView() GET /api/v2/projects/{projectKey}/views/{viewKey} Get view
getViews() GET /api/v2/projects/{projectKey}/views List views
linkResource() POST /api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType} Link resource
unlinkResource() DELETE /api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType} Unlink resource
updateView() PATCH /api/v2/projects/{projectKey}/views/{viewKey} Update view

createView()

createView($ld_api_version, $project_key, $view_post): \LaunchDarklyApi\Model\View

Create view

Create a new view in the given project.

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\ViewsBetaApi(
    // 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
);
$ld_api_version = 'ld_api_version_example'; // string | Version of the endpoint.
$project_key = default; // string
$view_post = new \LaunchDarklyApi\Model\ViewPost(); // \LaunchDarklyApi\Model\ViewPost | View object to create

try {
    $result = $apiInstance->createView($ld_api_version, $project_key, $view_post);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ViewsBetaApi->createView: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
ld_api_version string Version of the endpoint.
project_key string
view_post \LaunchDarklyApi\Model\ViewPost View object to create

Return type

\LaunchDarklyApi\Model\View

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]

deleteView()

deleteView($ld_api_version, $project_key, $view_key)

Delete view

Delete a specific view by its key.

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\ViewsBetaApi(
    // 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
);
$ld_api_version = 'ld_api_version_example'; // string | Version of the endpoint.
$project_key = default; // string
$view_key = my-view; // string

try {
    $apiInstance->deleteView($ld_api_version, $project_key, $view_key);
} catch (Exception $e) {
    echo 'Exception when calling ViewsBetaApi->deleteView: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
ld_api_version string Version of the endpoint.
project_key string
view_key string

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]

getLinkedResources()

getLinkedResources($ld_api_version, $project_key, $view_key, $resource_type, $limit, $offset, $sort): \LaunchDarklyApi\Model\ViewLinkedResources

Get linked resources

Get a list of all linked resources for a given view.

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\ViewsBetaApi(
    // 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
);
$ld_api_version = 'ld_api_version_example'; // string | Version of the endpoint.
$project_key = default; // string
$view_key = my-view; // string
$resource_type = flags; // string
$limit = 56; // int | The number of views to return.
$offset = 56; // int | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.
$sort = 'linkedAt'; // string | Field to sort by. Default field is `linkedAt`, default order is ascending.

try {
    $result = $apiInstance->getLinkedResources($ld_api_version, $project_key, $view_key, $resource_type, $limit, $offset, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ViewsBetaApi->getLinkedResources: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
ld_api_version string Version of the endpoint.
project_key string
view_key string
resource_type string
limit int The number of views to return. [optional]
offset int Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. [optional]
sort string Field to sort by. Default field is `linkedAt`, default order is ascending. [optional] [default to 'linkedAt']

Return type

\LaunchDarklyApi\Model\ViewLinkedResources

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]

getLinkedViews()

getLinkedViews($ld_api_version, $project_key, $resource_type, $resource_key, $environment_id, $limit, $offset): \LaunchDarklyApi\Model\Views

Get linked views for a given resource

Get a list of all linked views for a resource. Flags, AI configs and metrics are identified by key. Segments are identified by segment ID.

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\ViewsBetaApi(
    // 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
);
$ld_api_version = 'ld_api_version_example'; // string | Version of the endpoint.
$project_key = default; // string
$resource_type = flags; // string
$resource_key = my-flag; // string
$environment_id = 6890ff25c3e3830ba1a352e4; // string | Environment ID. Required when resourceType is 'segments'
$limit = 56; // int | The number of views to return.
$offset = 56; // int | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.

try {
    $result = $apiInstance->getLinkedViews($ld_api_version, $project_key, $resource_type, $resource_key, $environment_id, $limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ViewsBetaApi->getLinkedViews: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
ld_api_version string Version of the endpoint.
project_key string
resource_type string
resource_key string
environment_id string Environment ID. Required when resourceType is 'segments' [optional]
limit int The number of views to return. [optional]
offset int Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. [optional]

Return type

\LaunchDarklyApi\Model\Views

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]

getView()

getView($ld_api_version, $project_key, $view_key, $sort, $limit, $offset, $filter, $expand): \LaunchDarklyApi\Model\View

Get view

Retrieve a specific view by its key.

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\ViewsBetaApi(
    // 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
);
$ld_api_version = 'ld_api_version_example'; // string | Version of the endpoint.
$project_key = default; // string
$view_key = my-view; // string
$sort = 'sort_example'; // string | A sort to apply to the list of views.
$limit = 56; // int | The number of views to return.
$offset = 56; // int | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.
$filter = 'filter_example'; // string | A filter to apply to the list of views.
$expand = array('expand_example'); // string[] | A comma-separated list of fields to expand.

try {
    $result = $apiInstance->getView($ld_api_version, $project_key, $view_key, $sort, $limit, $offset, $filter, $expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ViewsBetaApi->getView: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
ld_api_version string Version of the endpoint.
project_key string
view_key string
sort string A sort to apply to the list of views. [optional]
limit int The number of views to return. [optional]
offset int Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. [optional]
filter string A filter to apply to the list of views. [optional]
expand string[] A comma-separated list of fields to expand. [optional]

Return type

\LaunchDarklyApi\Model\View

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]

getViews()

getViews($ld_api_version, $project_key, $sort, $limit, $offset, $filter, $expand): \LaunchDarklyApi\Model\Views

List views

Get a list of all views in the given project.

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\ViewsBetaApi(
    // 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
);
$ld_api_version = 'ld_api_version_example'; // string | Version of the endpoint.
$project_key = default; // string
$sort = 'sort_example'; // string | A sort to apply to the list of views.
$limit = 56; // int | The number of views to return.
$offset = 56; // int | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.
$filter = 'filter_example'; // string | A filter to apply to the list of views.
$expand = array('expand_example'); // string[] | A comma-separated list of fields to expand.

try {
    $result = $apiInstance->getViews($ld_api_version, $project_key, $sort, $limit, $offset, $filter, $expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ViewsBetaApi->getViews: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
ld_api_version string Version of the endpoint.
project_key string
sort string A sort to apply to the list of views. [optional]
limit int The number of views to return. [optional]
offset int Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. [optional]
filter string A filter to apply to the list of views. [optional]
expand string[] A comma-separated list of fields to expand. [optional]

Return type

\LaunchDarklyApi\Model\Views

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]

linkResource()

linkResource($ld_api_version, $project_key, $view_key, $resource_type, $view_link_request): \LaunchDarklyApi\Model\LinkResourceSuccessResponse

Link resource

Link one or multiple resources to a view: - Link flags using flag keys - Link AI configs using AI config keys - Link metrics using metric keys - Link segments using segment IDs

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\ViewsBetaApi(
    // 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
);
$ld_api_version = 'ld_api_version_example'; // string | Version of the endpoint.
$project_key = default; // string
$view_key = my-view; // string
$resource_type = flags; // string
$view_link_request = new \LaunchDarklyApi\Model\ViewLinkRequest(); // \LaunchDarklyApi\Model\ViewLinkRequest | The resource to link to the view. Flags are identified by key. Segments are identified by segment ID.

try {
    $result = $apiInstance->linkResource($ld_api_version, $project_key, $view_key, $resource_type, $view_link_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ViewsBetaApi->linkResource: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
ld_api_version string Version of the endpoint.
project_key string
view_key string
resource_type string
view_link_request \LaunchDarklyApi\Model\ViewLinkRequest The resource to link to the view. Flags are identified by key. Segments are identified by segment ID.

Return type

\LaunchDarklyApi\Model\LinkResourceSuccessResponse

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]

unlinkResource()

unlinkResource($ld_api_version, $project_key, $view_key, $resource_type, $view_link_request): \LaunchDarklyApi\Model\UnlinkResourceSuccessResponse

Unlink resource

Unlink one or multiple resources from a view: - Unlink flags using flag keys - Unlink segments using segment IDs - Unlink AI configs using AI config keys - Unlink metrics using metric keys

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\ViewsBetaApi(
    // 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
);
$ld_api_version = 'ld_api_version_example'; // string | Version of the endpoint.
$project_key = default; // string
$view_key = my-view; // string
$resource_type = flags; // string
$view_link_request = new \LaunchDarklyApi\Model\ViewLinkRequest(); // \LaunchDarklyApi\Model\ViewLinkRequest | The resource to link to the view. Flags are identified by key. Segments are identified by segment ID.

try {
    $result = $apiInstance->unlinkResource($ld_api_version, $project_key, $view_key, $resource_type, $view_link_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ViewsBetaApi->unlinkResource: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
ld_api_version string Version of the endpoint.
project_key string
view_key string
resource_type string
view_link_request \LaunchDarklyApi\Model\ViewLinkRequest The resource to link to the view. Flags are identified by key. Segments are identified by segment ID.

Return type

\LaunchDarklyApi\Model\UnlinkResourceSuccessResponse

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]

updateView()

updateView($ld_api_version, $project_key, $view_key, $view_patch): \LaunchDarklyApi\Model\View

Update view

Edit an existing view. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here's an example: { \"description\": \"Example updated description\", \"tags\": [\"new-tag\"] }

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\ViewsBetaApi(
    // 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
);
$ld_api_version = 'ld_api_version_example'; // string | Version of the endpoint.
$project_key = default; // string
$view_key = my-view; // string
$view_patch = new \LaunchDarklyApi\Model\ViewPatch(); // \LaunchDarklyApi\Model\ViewPatch | A JSON representation of the view including only the fields to update.

try {
    $result = $apiInstance->updateView($ld_api_version, $project_key, $view_key, $view_patch);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ViewsBetaApi->updateView: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
ld_api_version string Version of the endpoint.
project_key string
view_key string
view_patch \LaunchDarklyApi\Model\ViewPatch A JSON representation of the view including only the fields to update.

Return type

\LaunchDarklyApi\Model\View

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]