Testcases
Delete multiple Testcases
Delete multiple Testcases by their IDs.
POST
/
testcases
/
bulk-delete
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 testcase = await client.testcases.delete({ ids: ['123', '124', '125'] });
console.log(testcase.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
)
testcase = client.testcases.delete(
ids=["123", "124", "125"],
)
print(testcase.success)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api2.scorecard.io/api/v2/testcases/bulk-delete"
payload := strings.NewReader("{\n \"ids\": [\n \"123\",\n \"124\",\n \"125\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}curl https://api2.scorecard.io/api/v2/testcases/bulk-delete \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $SCORECARD_API_KEY" \
-d '{
"ids": [
"123",
"124",
"125"
]
}'{
"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.
Body
application/json
IDs of Testcases to delete.
Response
Testcases 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 testcase = await client.testcases.delete({ ids: ['123', '124', '125'] });
console.log(testcase.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
)
testcase = client.testcases.delete(
ids=["123", "124", "125"],
)
print(testcase.success)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api2.scorecard.io/api/v2/testcases/bulk-delete"
payload := strings.NewReader("{\n \"ids\": [\n \"123\",\n \"124\",\n \"125\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}curl https://api2.scorecard.io/api/v2/testcases/bulk-delete \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $SCORECARD_API_KEY" \
-d '{
"ids": [
"123",
"124",
"125"
]
}'{
"success": true
}{
"code": "UNAUTHORIZED",
"message": "Invalid or missing authentication token",
"details": {}
}{
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred while processing your request.",
"details": {}
}