Testsets
Delete Testset
DELETE
/
testsets
/
{testsetId}
JavaScript
import Scorecard from 'scorecard-ai';
const client = new Scorecard({
apiKey: process.env['SCORECARD_API_KEY'], // This is the default and can be omitted
});
const testset = await client.testsets.delete('246');
console.log(testset.success);import os
from scorecard_ai import Scorecard
client = Scorecard(
api_key=os.environ.get("SCORECARD_API_KEY"), # This is the default and can be omitted
)
testset = client.testsets.delete(
"246",
)
print(testset.success)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api2.scorecard.io/api/v2/testsets/{testsetId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl https://api2.scorecard.io/api/v2/testsets/$TESTSET_ID \
-X DELETE \
-H "Authorization: Bearer $SCORECARD_API_KEY"{
"success": true
}{
"code": "UNAUTHORIZED",
"message": "Invalid or missing authentication token",
"details": {}
}{
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred while processing your request.",
"details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the Testset to delete.
Example:
"246"
Response
Testset deleted successfully
Whether the deletion was successful.
Was this page helpful?
⌘I
JavaScript
import Scorecard from 'scorecard-ai';
const client = new Scorecard({
apiKey: process.env['SCORECARD_API_KEY'], // This is the default and can be omitted
});
const testset = await client.testsets.delete('246');
console.log(testset.success);import os
from scorecard_ai import Scorecard
client = Scorecard(
api_key=os.environ.get("SCORECARD_API_KEY"), # This is the default and can be omitted
)
testset = client.testsets.delete(
"246",
)
print(testset.success)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api2.scorecard.io/api/v2/testsets/{testsetId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl https://api2.scorecard.io/api/v2/testsets/$TESTSET_ID \
-X DELETE \
-H "Authorization: Bearer $SCORECARD_API_KEY"{
"success": true
}{
"code": "UNAUTHORIZED",
"message": "Invalid or missing authentication token",
"details": {}
}{
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred while processing your request.",
"details": {}
}