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

請求

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

路徑參數

projectId
string
必填
專案 ID

標頭

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

請求主體

name
string
必填
測試套件的名稱
testCaseIds
array
要納入套件中的測試案例 ID 陣列

回應

回傳建立的測試套件,狀態碼為 201

範例

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