Skip to main content
PATCH
/
api
/
test-cases
/
v2
/
{id}
Update Test Case Tags
curl --request PATCH \
  --url https://dash.empirical.run/api/test-cases/v2/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "tags": [
    "<string>"
  ]
}
'
{
  "data": {
    "test_case": {
      "id": "a30a6eba6312f6b87ea5-55e241fbe3f4b8ae61ee",
      "name": "search works",
      "file_path": "search.spec.ts",
      "suites": ["Search"],
      "playwright_project": "chromium",
      "tags": ["smoke", "critical"]
    },
    "source_file_updated": true
  }
}
Updates the tags for a given test case. This updates both the database record and the Playwright test source file on GitHub (by adding/removing the tag property in the test options).
{
  "data": {
    "test_case": {
      "id": "a30a6eba6312f6b87ea5-55e241fbe3f4b8ae61ee",
      "name": "search works",
      "file_path": "search.spec.ts",
      "suites": ["Search"],
      "playwright_project": "chromium",
      "tags": ["smoke", "critical"]
    },
    "source_file_updated": true
  }
}

Example

curl -X PATCH \
  https://dash.empirical.run/api/test-cases/v2/a30a6eba6312f6b87ea5-55e241fbe3f4b8ae61ee \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $EMPIRICALRUN_KEY" \
  -d '{
    "tags": ["smoke", "critical"]
  }'

Authorizations

Authorization
string
header
required

API key from the Empirical dashboard.

Path Parameters

id
string
required

Playwright test ID (pw_test_id).

Body

application/json

Tags to set.

tags
string[]
required

Response

Updated test case.

data
object
required