All URIs are relative to https://app.launchdarkly.com/api/v2
| Method | HTTP request | Description |
|---|---|---|
| DeleteCustomRole | DELETE /roles/{customRoleKey} | Delete a custom role by key. |
| GetCustomRole | GET /roles/{customRoleKey} | Get one custom role by key. |
| GetCustomRoles | GET /roles | Return a complete list of custom roles. |
| PatchCustomRole | PATCH /roles/{customRoleKey} | Modify a custom role by key. |
| PostCustomRole | POST /roles | Create a new custom role. |
void DeleteCustomRole (string customRoleKey)
Delete a custom role by key.
using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;
namespace Example
{
public class DeleteCustomRoleExample
{
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 CustomRolesApi();
var customRoleKey = customRoleKey_example; // string | The custom role key.
try
{
// Delete a custom role by key.
apiInstance.DeleteCustomRole(customRoleKey);
}
catch (Exception e)
{
Debug.Print("Exception when calling CustomRolesApi.DeleteCustomRole: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| customRoleKey | string | The custom role key. |
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]
CustomRole GetCustomRole (string customRoleKey)
Get one custom role by key.
using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;
namespace Example
{
public class GetCustomRoleExample
{
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 CustomRolesApi();
var customRoleKey = customRoleKey_example; // string | The custom role key.
try
{
// Get one custom role by key.
CustomRole result = apiInstance.GetCustomRole(customRoleKey);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CustomRolesApi.GetCustomRole: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| customRoleKey | string | The custom role key. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CustomRoles GetCustomRoles ()
Return a complete list of custom roles.
using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;
namespace Example
{
public class GetCustomRolesExample
{
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 CustomRolesApi();
try
{
// Return a complete list of custom roles.
CustomRoles result = apiInstance.GetCustomRoles();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CustomRolesApi.GetCustomRoles: " + 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]
CustomRole PatchCustomRole (string customRoleKey, List patchDelta)
Modify a custom role by key.
using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;
namespace Example
{
public class PatchCustomRoleExample
{
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 CustomRolesApi();
var customRoleKey = customRoleKey_example; // string | The custom role key.
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 custom role by key.
CustomRole result = apiInstance.PatchCustomRole(customRoleKey, patchDelta);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CustomRolesApi.PatchCustomRole: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| customRoleKey | string | The custom role key. | |
| 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]
CustomRole PostCustomRole (CustomRoleBody customRoleBody)
Create a new custom role.
using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;
namespace Example
{
public class PostCustomRoleExample
{
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 CustomRolesApi();
var customRoleBody = new CustomRoleBody(); // CustomRoleBody | New role or roles to create.
try
{
// Create a new custom role.
CustomRole result = apiInstance.PostCustomRole(customRoleBody);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CustomRolesApi.PostCustomRole: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| customRoleBody | CustomRoleBody | New role or roles to create. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]