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 |
Client CreateOAuth2Client(ctx).OauthClientPost(oauthClientPost).Execute()
Create a LaunchDarkly OAuth 2.0 client
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)
}
Other parameters are passed through a pointer to a apiCreateOAuth2ClientRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
oauthClientPost | OauthClientPost |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteOAuthClient(ctx, clientId).Execute()
Delete OAuth 2.0 client
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)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
clientId | string | The client ID |
Other parameters are passed through a pointer to a apiDeleteOAuthClientRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Client GetOAuthClientById(ctx, clientId).Execute()
Get client by ID
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)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
clientId | string | The client ID |
Other parameters are passed through a pointer to a apiGetOAuthClientByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClientCollection GetOAuthClients(ctx).Execute()
Get clients
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)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetOAuthClientsRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Client PatchOAuthClient(ctx, clientId).PatchOperation(patchOperation).Execute()
Patch client by ID
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)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
clientId | string | The client ID |
Other parameters are passed through a pointer to a apiPatchOAuthClientRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
patchOperation | []PatchOperation | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]