Get Autogenerated Draft Test Case
curl --request GET \
--url https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}import requests
url = "https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"evaluation_dataset_id": "<string>",
"test_case_data": {
"input": "<string>",
"artifact_ids_filter": [
"<string>"
],
"expected_output": "<string>",
"expected_extra_info": {
"chunks": [
{
"text": "<string>",
"metadata": {}
}
],
"schema_type": "CHUNKS"
}
},
"approved": true,
"content_metadata": {},
"id": "<string>",
"account_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"schema_type": "GENERATION",
"topic_str": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Evaluation Datasets
Get Autogenerated Draft Test Case
Description
Get the test case by its id.
GET
/
v4
/
evaluation-datasets
/
{evaluation_dataset_id}
/
autogenerated-draft-test-cases
/
{autogenerated_draft_test_case_id}
Get Autogenerated Draft Test Case
curl --request GET \
--url https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}import requests
url = "https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases/{autogenerated_draft_test_case_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"evaluation_dataset_id": "<string>",
"test_case_data": {
"input": "<string>",
"artifact_ids_filter": [
"<string>"
],
"expected_output": "<string>",
"expected_extra_info": {
"chunks": [
{
"text": "<string>",
"metadata": {}
}
],
"schema_type": "CHUNKS"
}
},
"approved": true,
"content_metadata": {},
"id": "<string>",
"account_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"schema_type": "GENERATION",
"topic_str": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Response
Successful Response
The ID of the associated evaluation dataset.
The data for the test case in a format matching the provided schema_type
- ArtifactSchemaGeneration
- SchemaGenerationBase
Show child attributes
Show child attributes
Boolean to track whether or not the draft test case is approved
Metadata for the chunks and artifacts that were used to generate this draft test case.
The unique identifier of the entity.
The ID of the account that owns the given entity.
The date and time when the entity was created in ISO format.
The date and time when the entity was last updated in ISO format.
The user who originally created the entity.
The type of identity that created the entity.
Available options:
user, service_account Allowed value:
"GENERATION"
