All URIs are relative to https://app.launchdarkly.com
Method | HTTP request | Description |
---|---|---|
DeleteWebhook | Delete /api/v2/webhooks/{id} | Delete webhook |
GetAllWebhooks | Get /api/v2/webhooks | List webhooks |
GetWebhook | Get /api/v2/webhooks/{id} | Get webhook |
PatchWebhook | Patch /api/v2/webhooks/{id} | Update webhook |
PostWebhook | Post /api/v2/webhooks | Creates a webhook |
DeleteWebhook(ctx, id).Execute()
Delete webhook
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string | The ID of the webhook to delete
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhooksApi.DeleteWebhook(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhooksApi.DeleteWebhook``: %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. | |
id | string | The ID of the webhook to delete |
Other parameters are passed through a pointer to a apiDeleteWebhookRequest 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]
Webhooks GetAllWebhooks(ctx).Execute()
List webhooks
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhooksApi.GetAllWebhooks(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhooksApi.GetAllWebhooks``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAllWebhooks`: Webhooks
fmt.Fprintf(os.Stdout, "Response from `WebhooksApi.GetAllWebhooks`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetAllWebhooksRequest 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]
Webhook GetWebhook(ctx, id).Execute()
Get webhook
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string | The ID of the webhook
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhooksApi.GetWebhook(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhooksApi.GetWebhook``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetWebhook`: Webhook
fmt.Fprintf(os.Stdout, "Response from `WebhooksApi.GetWebhook`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The ID of the webhook |
Other parameters are passed through a pointer to a apiGetWebhookRequest 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]
Webhook PatchWebhook(ctx, id).PatchOperation(patchOperation).Execute()
Update webhook
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string | The ID of the webhook to update
patchOperation := []openapiclient.PatchOperation{*openapiclient.NewPatchOperation("replace", "/exampleField", interface{}(new example value))} // []PatchOperation |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhooksApi.PatchWebhook(context.Background(), id).PatchOperation(patchOperation).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhooksApi.PatchWebhook``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PatchWebhook`: Webhook
fmt.Fprintf(os.Stdout, "Response from `WebhooksApi.PatchWebhook`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The ID of the webhook to update |
Other parameters are passed through a pointer to a apiPatchWebhookRequest 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]
Webhook PostWebhook(ctx).WebhookPost(webhookPost).Execute()
Creates a webhook
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
webhookPost := *openapiclient.NewWebhookPost("http://www.example.com", true, true) // WebhookPost |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhooksApi.PostWebhook(context.Background()).WebhookPost(webhookPost).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhooksApi.PostWebhook``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostWebhook`: Webhook
fmt.Fprintf(os.Stdout, "Response from `WebhooksApi.PostWebhook`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPostWebhookRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
webhookPost | WebhookPost |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]