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

Latest commit

 

History

History
335 lines (252 loc) · 9.65 KB

File metadata and controls

335 lines (252 loc) · 9.65 KB

LaunchDarkly.Api.Api.CustomRolesApi

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.

DeleteCustomRole

void DeleteCustomRole (string customRoleKey)

Delete a custom role by key.

Example

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 );
            }
        }
    }
}

Parameters

Name Type Description Notes
customRoleKey string The custom role key.

Return type

void (empty response body)

Authorization

Token

HTTP request headers

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

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

GetCustomRole

CustomRole GetCustomRole (string customRoleKey)

Get one custom role by key.

Example

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 );
            }
        }
    }
}

Parameters

Name Type Description Notes
customRoleKey string The custom role key.

Return type

CustomRole

Authorization

Token

HTTP request headers

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

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

GetCustomRoles

CustomRoles GetCustomRoles ()

Return a complete list of custom roles.

Example

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 );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

CustomRoles

Authorization

Token

HTTP request headers

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

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

PatchCustomRole

CustomRole PatchCustomRole (string customRoleKey, List patchDelta)

Modify a custom role by key.

Example

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 );
            }
        }
    }
}

Parameters

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/&#39;

Return type

CustomRole

Authorization

Token

HTTP request headers

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

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

PostCustomRole

CustomRole PostCustomRole (CustomRoleBody customRoleBody)

Create a new custom role.

Example

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 );
            }
        }
    }
}

Parameters

Name Type Description Notes
customRoleBody CustomRoleBody New role or roles to create.

Return type

CustomRole

Authorization

Token

HTTP request headers

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

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