Skip to content

Latest commit

 

History

History
350 lines (220 loc) · 8.92 KB

OAuth2ClientsBetaApi.md

File metadata and controls

350 lines (220 loc) · 8.92 KB

\OAuth2ClientsBetaApi

All URIs are relative to https://app.launchdarkly.com

Method HTTP request Description
CreateOAuth2Client Post /api/v2/oauth/clients Create a LaunchDarkly OAuth 2.0 client
DeleteOAuthClient Delete /api/v2/oauth/clients/{clientId} Delete OAuth 2.0 client
GetOAuthClientById Get /api/v2/oauth/clients/{clientId} Get client by ID
GetOAuthClients Get /api/v2/oauth/clients Get clients
PatchOAuthClient Patch /api/v2/oauth/clients/{clientId} Patch client by ID

CreateOAuth2Client

Client CreateOAuth2Client(ctx).OauthClientPost(oauthClientPost).Execute()

Create a LaunchDarkly OAuth 2.0 client

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    oauthClientPost := *openapiclient.NewOauthClientPost() // OauthClientPost | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.OAuth2ClientsBetaApi.CreateOAuth2Client(context.Background()).OauthClientPost(oauthClientPost).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OAuth2ClientsBetaApi.CreateOAuth2Client``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateOAuth2Client`: Client
    fmt.Fprintf(os.Stdout, "Response from `OAuth2ClientsBetaApi.CreateOAuth2Client`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateOAuth2ClientRequest struct via the builder pattern

Name Type Description Notes
oauthClientPost OauthClientPost

Return type

Client

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]

DeleteOAuthClient

DeleteOAuthClient(ctx, clientId).Execute()

Delete OAuth 2.0 client

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    clientId := "clientId_example" // string | The client ID

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.OAuth2ClientsBetaApi.DeleteOAuthClient(context.Background(), clientId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OAuth2ClientsBetaApi.DeleteOAuthClient``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
clientId string The client ID

Other Parameters

Other parameters are passed through a pointer to a apiDeleteOAuthClientRequest struct via the builder pattern

Name Type Description Notes

Return type

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

GetOAuthClientById

Client GetOAuthClientById(ctx, clientId).Execute()

Get client by ID

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    clientId := "clientId_example" // string | The client ID

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.OAuth2ClientsBetaApi.GetOAuthClientById(context.Background(), clientId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OAuth2ClientsBetaApi.GetOAuthClientById``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetOAuthClientById`: Client
    fmt.Fprintf(os.Stdout, "Response from `OAuth2ClientsBetaApi.GetOAuthClientById`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
clientId string The client ID

Other Parameters

Other parameters are passed through a pointer to a apiGetOAuthClientByIdRequest struct via the builder pattern

Name Type Description Notes

Return type

Client

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]

GetOAuthClients

ClientCollection GetOAuthClients(ctx).Execute()

Get clients

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.OAuth2ClientsBetaApi.GetOAuthClients(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OAuth2ClientsBetaApi.GetOAuthClients``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetOAuthClients`: ClientCollection
    fmt.Fprintf(os.Stdout, "Response from `OAuth2ClientsBetaApi.GetOAuthClients`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetOAuthClientsRequest struct via the builder pattern

Return type

ClientCollection

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]

PatchOAuthClient

Client PatchOAuthClient(ctx, clientId).PatchOperation(patchOperation).Execute()

Patch client by ID

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    clientId := "clientId_example" // string | The client ID
    patchOperation := []openapiclient.PatchOperation{*openapiclient.NewPatchOperation("replace", "/exampleField", interface{}(new example value))} // []PatchOperation | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.OAuth2ClientsBetaApi.PatchOAuthClient(context.Background(), clientId).PatchOperation(patchOperation).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OAuth2ClientsBetaApi.PatchOAuthClient``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PatchOAuthClient`: Client
    fmt.Fprintf(os.Stdout, "Response from `OAuth2ClientsBetaApi.PatchOAuthClient`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
clientId string The client ID

Other Parameters

Other parameters are passed through a pointer to a apiPatchOAuthClientRequest struct via the builder pattern

Name Type Description Notes

patchOperation | []PatchOperation | |

Return type

Client

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]