Create Application Variant Report
curl --request POST \
--url https://api.egp.scale.com/v4/application-variant-reports \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"application_variant_id": "<string>",
"evaluation_dataset_ids": [
"<string>"
],
"account_id": "<string>",
"application_test_case_output_group_ids": [
"<string>"
]
}
'import requests
url = "https://api.egp.scale.com/v4/application-variant-reports"
payload = {
"application_variant_id": "<string>",
"evaluation_dataset_ids": ["<string>"],
"account_id": "<string>",
"application_test_case_output_group_ids": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
application_variant_id: '<string>',
evaluation_dataset_ids: ['<string>'],
account_id: '<string>',
application_test_case_output_group_ids: ['<string>']
})
};
fetch('https://api.egp.scale.com/v4/application-variant-reports', 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/application-variant-reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'application_variant_id' => '<string>',
'evaluation_dataset_ids' => [
'<string>'
],
'account_id' => '<string>',
'application_test_case_output_group_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.egp.scale.com/v4/application-variant-reports"
payload := strings.NewReader("{\n \"application_variant_id\": \"<string>\",\n \"evaluation_dataset_ids\": [\n \"<string>\"\n ],\n \"account_id\": \"<string>\",\n \"application_test_case_output_group_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.egp.scale.com/v4/application-variant-reports")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"application_variant_id\": \"<string>\",\n \"evaluation_dataset_ids\": [\n \"<string>\"\n ],\n \"account_id\": \"<string>\",\n \"application_test_case_output_group_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/application-variant-reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"application_variant_id\": \"<string>\",\n \"evaluation_dataset_ids\": [\n \"<string>\"\n ],\n \"account_id\": \"<string>\",\n \"application_test_case_output_group_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"application_spec_id": "<string>",
"application_variant_id": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"evaluation_datasets": [
{
"generation_status": "Pending",
"evaluation_dataset_version_num": 123,
"evaluation_dataset": {
"name": "<string>",
"schema_type": "GENERATION",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"knowledge_base_id": "<string>",
"evaluation_dataset_metadata": {},
"out_of_date": true,
"vendor": "scale",
"archived_at": "2023-11-07T05:31:56Z",
"schema_sub_type": "summarization"
},
"scored_test_case_count": 123
}
],
"score": 123,
"category_scores": [
{
"category": "accuracy",
"metric_scores": [
{
"metric_type": "answer-correctness",
"category": "accuracy",
"score": 123
}
],
"score": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Applications
Create Application Variant Report
Description
Creates a application variant report
Details
This API can be used to create a application variant report. To use this API, review the request schema and pass in all fields that are required to create a application variant report.
POST
/
v4
/
application-variant-reports
Create Application Variant Report
curl --request POST \
--url https://api.egp.scale.com/v4/application-variant-reports \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"application_variant_id": "<string>",
"evaluation_dataset_ids": [
"<string>"
],
"account_id": "<string>",
"application_test_case_output_group_ids": [
"<string>"
]
}
'import requests
url = "https://api.egp.scale.com/v4/application-variant-reports"
payload = {
"application_variant_id": "<string>",
"evaluation_dataset_ids": ["<string>"],
"account_id": "<string>",
"application_test_case_output_group_ids": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
application_variant_id: '<string>',
evaluation_dataset_ids: ['<string>'],
account_id: '<string>',
application_test_case_output_group_ids: ['<string>']
})
};
fetch('https://api.egp.scale.com/v4/application-variant-reports', 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/application-variant-reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'application_variant_id' => '<string>',
'evaluation_dataset_ids' => [
'<string>'
],
'account_id' => '<string>',
'application_test_case_output_group_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.egp.scale.com/v4/application-variant-reports"
payload := strings.NewReader("{\n \"application_variant_id\": \"<string>\",\n \"evaluation_dataset_ids\": [\n \"<string>\"\n ],\n \"account_id\": \"<string>\",\n \"application_test_case_output_group_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.egp.scale.com/v4/application-variant-reports")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"application_variant_id\": \"<string>\",\n \"evaluation_dataset_ids\": [\n \"<string>\"\n ],\n \"account_id\": \"<string>\",\n \"application_test_case_output_group_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/application-variant-reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"application_variant_id\": \"<string>\",\n \"evaluation_dataset_ids\": [\n \"<string>\"\n ],\n \"account_id\": \"<string>\",\n \"application_test_case_output_group_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"application_spec_id": "<string>",
"application_variant_id": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"evaluation_datasets": [
{
"generation_status": "Pending",
"evaluation_dataset_version_num": 123,
"evaluation_dataset": {
"name": "<string>",
"schema_type": "GENERATION",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"knowledge_base_id": "<string>",
"evaluation_dataset_metadata": {},
"out_of_date": true,
"vendor": "scale",
"archived_at": "2023-11-07T05:31:56Z",
"schema_sub_type": "summarization"
},
"scored_test_case_count": 123
}
],
"score": 123,
"category_scores": [
{
"category": "accuracy",
"metric_scores": [
{
"metric_type": "answer-correctness",
"category": "accuracy",
"score": 123
}
],
"score": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Body
application/json
Response
Successful Response
The unique identifier of the entity.
The date and time when the entity was created in ISO format.
The ID of the account that owns the given entity.
The date and time when the entity was last updated in ISO format.
Show child attributes
Show child attributes
category_scores
(ApplicationCategoryScoreAccuracy · object | ApplicationCategoryScoreRetrieval · object | ApplicationCategoryScoreQuality · object | ApplicationCategoryScoreTrustAndSafety · object)[]
- ApplicationCategoryScoreAccuracy
- ApplicationCategoryScoreRetrieval
- ApplicationCategoryScoreQuality
- ApplicationCategoryScoreTrustAndSafety
Show child attributes
Show child attributes

