Skip to main content
PATCH
/
api
/
v2
/
test-cases
/
{id}
Update test case tags
curl --request PATCH \
  --url https://api.empirical.run/api/v2/test-cases/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "tags": [
    "<string>"
  ]
}
'
{
  "data": {
    "test_case": {
      "id": "<string>",
      "name": "<string>",
      "file_path": "<string>",
      "suites": [
        "<string>"
      ],
      "playwright_project": "<string>",
      "tags": [
        "<string>"
      ],
      "created_at": "<string>",
      "updated_at": "<string>",
      "first_seen_commit_sha": "<string>",
      "last_seen_commit_sha": "<string>",
      "dependencies": {
        "playwright_serial": {
          "group_id": "<string>",
          "title_path": [
            "<string>"
          ],
          "file_path": "<string>",
          "playwright_project": "<string>",
          "dependency_order": 123,
          "group_size": 123,
          "depends_on": [
            "<string>"
          ]
        }
      }
    },
    "source_file_updated": true
  },
  "error": {
    "message": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Playwright test ID (pw_test_id), the 41-character hash identifying the test case.

Minimum string length: 1

Body

application/json
tags
string[]
required

Array of tags to assign to the test case.

Response

The updated test case.

data
object
required

The updated test case.

error
object

Present alongside a non-null data only when the update partially failed (e.g. the source file could not be updated).