All URIs are relative to https://app.launchdarkly.com/api/v2
| Method | HTTP request | Description |
|---|---|---|
| DeleteProject | DELETE /projects/{projectKey} | Delete a project by key. Caution- - deleting a project will delete all associated environments and feature flags. You cannot delete the last project in an account. |
| GetProject | GET /projects/{projectKey} | Fetch a single project by key. |
| GetProjects | GET /projects | Returns a list of all projects in the account. |
| PatchProject | PATCH /projects/{projectKey} | Modify a project by ID. |
| PostProject | POST /projects | Create a new project with the given key and name. |
void DeleteProject (string projectKey)
Delete a project by key. Caution- - deleting a project will delete all associated environments and feature flags. You cannot delete the last project in an account.
using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;
namespace Example
{
public class DeleteProjectExample
{
public void main()
{
// Configure API key authorization: Token
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
var apiInstance = new ProjectsApi();
var projectKey = projectKey_example; // string | The project key, used to tie the flags together under one project so they can be managed together.
try
{
// Delete a project by key. Caution- - deleting a project will delete all associated environments and feature flags. You cannot delete the last project in an account.
apiInstance.DeleteProject(projectKey);
}
catch (Exception e)
{
Debug.Print("Exception when calling ProjectsApi.DeleteProject: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| projectKey | string | The project key, used to tie the flags together under one project so they can be managed together. |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Project GetProject (string projectKey)
Fetch a single project by key.
using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;
namespace Example
{
public class GetProjectExample
{
public void main()
{
// Configure API key authorization: Token
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
var apiInstance = new ProjectsApi();
var projectKey = projectKey_example; // string | The project key, used to tie the flags together under one project so they can be managed together.
try
{
// Fetch a single project by key.
Project result = apiInstance.GetProject(projectKey);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ProjectsApi.GetProject: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| projectKey | string | The project key, used to tie the flags together under one project so they can be managed together. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Projects GetProjects ()
Returns a list of all projects in the account.
using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;
namespace Example
{
public class GetProjectsExample
{
public void main()
{
// Configure API key authorization: Token
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
var apiInstance = new ProjectsApi();
try
{
// Returns a list of all projects in the account.
Projects result = apiInstance.GetProjects();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ProjectsApi.GetProjects: " + e.Message );
}
}
}
}This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Project PatchProject (string projectKey, List patchDelta)
Modify a project by ID.
using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;
namespace Example
{
public class PatchProjectExample
{
public void main()
{
// Configure API key authorization: Token
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
var apiInstance = new ProjectsApi();
var projectKey = projectKey_example; // string | The project key, used to tie the flags together under one project so they can be managed together.
var patchDelta = new List<PatchOperation>(); // List<PatchOperation> | Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'
try
{
// Modify a project by ID.
Project result = apiInstance.PatchProject(projectKey, patchDelta);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ProjectsApi.PatchProject: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| projectKey | string | The project key, used to tie the flags together under one project so they can be managed together. | |
| patchDelta | List | Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/' |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Project PostProject (ProjectBody projectBody)
Create a new project with the given key and name.
using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;
namespace Example
{
public class PostProjectExample
{
public void main()
{
// Configure API key authorization: Token
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
var apiInstance = new ProjectsApi();
var projectBody = new ProjectBody(); // ProjectBody | Project keys must be unique within an account.
try
{
// Create a new project with the given key and name.
Project result = apiInstance.PostProject(projectBody);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ProjectsApi.PostProject: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| projectBody | ProjectBody | Project keys must be unique within an account. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]