Test Webhook Endpoint
WebhookEndpointTestResult webhooks().test(WebhookTestParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/webhook_endpoints/{webhook_endpoint_id}/test
Test Webhook Endpoint
package com.openai.example;
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.webhooks.WebhookEndpointTestResult;
import com.openai.models.webhooks.WebhookTestParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
WebhookTestParams params = WebhookTestParams.builder()
.webhookEndpointId("whe_123")
.eventType(WebhookTestParams.EventType.BATCH_COMPLETED)
.build();
WebhookEndpointTestResult webhookEndpointTestResult = client.webhooks().test(params);
}
}{
"event_type": "event_type",
"object": "webhook_endpoint.test",
"status_code": 0,
"success": true,
"webhook_endpoint_id": "webhook_endpoint_id"
}Returns Examples
{
"event_type": "event_type",
"object": "webhook_endpoint.test",
"status_code": 0,
"success": true,
"webhook_endpoint_id": "webhook_endpoint_id"
}