---
title: godo.Insights.TestLogExportDestinationConfig()
description: TestLogExportDestinationConfig sends one test payload to a destination that has not been created yet, using the endpoint and headers in config without …
product: Reference
url: https://docs.digitalocean.com/reference/godo/reference/insights/insights-test-log-export-destination-config/
last_updated: "2026-12-01"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# godo.Insights.TestLogExportDestinationConfig()

Generated on 1 Dec 2026 from godo version [`v1.248.0`](https://github.com/digitalocean/godo/releases/tag/v1.248.0)

## Usage

```go
client.Insights.TestLogExportDestinationConfig(ctx context.Context, config *godo.InsightsLogExportDestinationConfig) (*godo.InsightsLogExportTestResult, *godo.Response, error)
```

## Description

`TestLogExportDestinationConfig` sends one test payload to a destination that has not been created yet, using the endpoint and headers in config without storing them. A successful test does not guarantee `CreateLogExportDestination` will succeed: the name, the destination limit, and endpoint uniqueness are not checked. A failed delivery returns HTTP 200 with Err nil; check `InsightsLogExportTestResult`.Success. The call is rate limited per team (429).

This method sends a POST request to [`/v2/insights/log-export/destinations/test`](https://docs.digitalocean.com/reference/api/reference/insights/index.html.md#insights_validate_logExportDestinationConfig).

## Parameters

`config` \*godo.InsightsLogExportDestinationConfig required

### Fields of `godo.InsightsLogExportDestinationConfig`

`InsightsLogExportDestinationConfig` is a destination configuration to test before the destination is created. Only Endpoint and Headers are used; Name and Enabled are accepted and ignored.

`Name` string

Omitted from JSON when empty. JSON key: `name`

`Endpoint` string

JSON key: `endpoint`

`Headers` \[]godo.InsightsLogExportHeader

Omitted from JSON when empty. JSON key: `headers`

`Enabled` \*bool

Omitted from JSON when empty. JSON key: `enabled`

## Returns

\*godo.InsightsLogExportTestResult

\*godo.Response

The HTTP response, with pagination `Links`, `Meta`, and `Rate` limit information.

error

Non-nil when the request fails. API errors are returned as `*godo.ErrorResponse`.

### Fields of `godo.InsightsLogExportTestResult`

`InsightsLogExportTestResult` is the result of sending a test payload to a destination.

A failed delivery returns HTTP 200 with Err nil. Check Success (absent in JSON means false) and Error. The endpoint is rate limited per team and may return 429.

`Success` bool

`Success` reports whether the destination accepted the test payload.
The gateway may omit false; treat a missing value as false.

JSON key: `success`

`Error` \*godo.InsightsLogExportDeliveryError

`Error` is set only when Success is false.

Omitted from JSON when empty. JSON key: `error`

## Request Sample

## Show Request Sample

```go
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/digitalocean/godo"
)

func main() {
	client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN"))
	ctx := context.TODO()

	result, _, err := client.Insights.TestLogExportDestinationConfig(ctx, &godo.InsightsLogExportDestinationConfig{
		Endpoint: "<your-endpoint>",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", result)
}
```

## Response Example

## Show Response Example

```json
{
  "success": true
}
```

## More Information

See [`POST /v2/insights/log-export/destinations/test`](https://docs.digitalocean.com/reference/api/reference/insights/index.html.md#insights_validate_logExportDestinationConfig) in the API reference for additional detail on responses, headers, parameters, and more.

See the [Go package documentation](https://pkg.go.dev/github.com/digitalocean/godo#InsightsServiceOp.TestLogExportDestinationConfig) for the source of this method.