刪除測試案例
curl --request DELETE \
--url https://api.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId}"
headers = {"Authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<authorization>'}};
fetch('https://api.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId}', 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.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body刪除測試案例
依 ID 刪除測試案例
DELETE
/
v1
/
projects
/
{projectId}
/
test-cases
/
{testCaseId}
刪除測試案例
curl --request DELETE \
--url https://api.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId}"
headers = {"Authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<authorization>'}};
fetch('https://api.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId}', 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.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body請求
DELETE https://api.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId}
路徑參數
專案 ID
測試案例 ID
標頭
使用您的 Developer Key 進行 Bearer 令牌認證
回應
回傳確認訊息。範例
curl -X DELETE https://api.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId} \
-H "Authorization: Bearer dk_your_key"
{
"message": "Test case deleted"
}
⌘I
