godo.Insights.TestLogExportDestinationConfig()
Generated on 1 Dec 2026
from godo version
v1.248.0
Usage
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.
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.
NamestringEndpointstringHeaders[]godo.InsightsLogExportHeaderEnabled*bool
Returns
- *godo.InsightsLogExportTestResult
- *godo.Response
The HTTP response, with pagination
Links,Meta, andRatelimit 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.
SuccessboolSuccessreports whether the destination accepted the test payload.
The gateway may omit false; treat a missing value as false.Error*godo.InsightsLogExportDeliveryErrorErroris set only when Success is false.
Request Sample
Response Example
More Information
See POST /v2/insights/log-export/destinations/test in the API reference for additional detail on responses, headers, parameters, and more.
See the Go package documentation for the source of this method.