跳轉到主要內容
PUT
/
v1
/
projects
/
{projectId}
/
test-suites
/
{testSuiteId}
更新測試套件
curl --request PUT \
  --url https://api.pathors.com/v1/projects/{projectId}/test-suites/{testSuiteId} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "testCaseIds": [
    {}
  ]
}
'
{
  "data": {}
}

請求

PUT https://api.pathors.com/v1/projects/{projectId}/test-suites/{testSuiteId}

路徑參數

projectId
string
必填
專案 ID
testSuiteId
string
必填
測試套件 ID

標頭

Authorization
string
必填
使用您的 Developer Key 進行 Bearer 令牌認證

請求主體

name
string
測試套件更新後的名稱
testCaseIds
array
更新後的測試案例 ID 陣列(會取代所有現有的關聯)

回應

data
object
更新後的測試套件物件。

範例

curl -X PUT https://api.pathors.com/v1/projects/{projectId}/test-suites/{testSuiteId} \
  -H "Authorization: Bearer dk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated regression suite",
    "testCaseIds": ["test-case-uuid-1", "test-case-uuid-3"]
  }'
{
  "data": {
    "id": "test-suite-uuid",
    "projectId": "project-uuid",
    "name": "Updated regression suite",
    "testCases": [
      { "id": "test-case-uuid-1" },
      { "id": "test-case-uuid-3" }
    ],
    "createdAt": "2026-03-23T00:00:00.000Z",
    "updatedAt": "2026-03-23T00:00:00.000Z"
  }
}