POST
/
v4
/
evaluation-datasets
/
{evaluation_dataset_id}
/
approve-batch
import SGPClient from 'sgp';

const client = new SGPClient({
  apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const autoGeneratedDraftTestCaseApproveBatchResponse = await client.evaluationDatasets.approveBatch(
    'evaluation_dataset_id',
    { autogenerated_draft_test_cases: ['string'] },
  );

  console.log(autoGeneratedDraftTestCaseApproveBatchResponse.autogenerated_draft_test_cases);
}

main();
{
  "success": true,
  "autogenerated_draft_test_cases": [
    {
      "autogenerated_draft_test_case_id": "<string>",
      "success": true,
      "failed_chunks": [
        {
          "chunk_text": "<string>",
          "artifact_id": "<string>",
          "artifact_name": "<string>",
          "artifact_content_modification_identifier": "<string>"
        }
      ]
    }
  ]
}

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string | null

Path Parameters

evaluation_dataset_id
string
required

Query Parameters

force
boolean
default:
false

Force approve a batch of autogenerated test case IDs for the evaluation dataset

Body

application/json
autogenerated_draft_test_cases
string[]
required

Ids of auto generated draft test cases to be approved.

Response

200
application/json
Successful Response
success
boolean
required

Whether or not the batch approval was successful

autogenerated_draft_test_cases
object[]
required

List of responses for each of the input draft test cases.