dots.v2.genAi.evaluation_test_cases.post()

Generated on 13 Nov 2026 from DoTs version v1.24.0

Usage

client.v2.genAi.evaluation_test_cases.post(body: ApiCreateEvaluationTestCaseInputPublic, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | ApiCreateEvaluationTestCaseOutput>

Description

To create an evaluation test-case send a POST request to /v2/gen-ai/evaluation_test_cases.

Parameters

agentWorkspaceName string optional

Example: example name

datasetUuid string optional

Example: 123e4567-e89b-12d3-a456-426614174000

Dataset against which the test‑case is executed.

description string optional

Example: example string

Description of the test case.

metrics array of strings optional

Example: ["example string"]

Full metric list to use for evaluation test case.

name string optional

Example: example name

Name of the test case.

starMetric object optional
Show child properties
metricUuid string optional

Example: 123e4567-e89b-12d3-a456-426614174000

name string optional

Example: example name

successThreshold number optional

Example: 123

The success threshold for the star metric.
This is a value that the metric must reach to be considered successful.

successThresholdPct integer optional

Example: 123

The success threshold for the star metric.
This is a percentage value between 0 and 100.

workspaceUuid string optional

Example: 123e4567-e89b-12d3-a456-426614174000

The workspace uuid.

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.genAi.evaluation_test_cases.post({
    agentWorkspaceName: "example name",
    datasetUuid: "123e4567-e89b-12d3-a456-426614174000",
    description: "example string",
    metrics: [
        "example string",
    ],
    name: "example name",
    starMetric: {
        metricUuid: "123e4567-e89b-12d3-a456-426614174000",
        name: "example name",
        successThreshold: 123,
        successThresholdPct: 123,
    },
    workspaceUuid: "123e4567-e89b-12d3-a456-426614174000",
});

Response Example

Show Response Example
{
  "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000"
}

More Information

See /v2/gen-ai/evaluation_test_cases in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.