Test Cases

Update a test case

Updates the provided fields of a test case; omitted fields are left unchanged. At least one field is required. Set startUrl or description to null to clear it; an empty-string description is stored as an empty description, not treated as a clear.

Default targets. apiMobileConfig, apiWebConfig, apiDesktopConfig and apiMultiDeviceConfig carry the case's per-target defaults in the same shapes GET /api/cases/{caseId} returns. Per key: omit = unchanged, null = clear, value = replaced whole (no deep merge — to change one app, send that whole config). Send only the keys you are changing; an unchanged config is not re-validated. [] is not a clear for apiMultiDeviceConfig (2-3 entries are required). Device and upload identifiers are the encrypted tokens from GET /api/devices (arn), GET /api/uploads (uploadArn) or a previous GET /api/cases/{caseId}; tokens are non-deterministic and must not be compared for equality. apiDesktopConfig takes only { userDeviceId } from GET /api/devices/user; name/platform/os are resolved server-side. apiMobileConfig binds either a Device Farm device (deviceArn + deviceName) or a registered local phone (userDeviceId, with platform/localDeviceName resolved server-side); never both. apiMobileConfig.platform is ANDROID|IOS; a multi-device entry's mobilePlatform is android|ios. The legacy single-app fields (uploadArn/uploadType/appName/bundleId) are accepted but apps[] is preferred. startUrl values must be http(s). Setting a config requires the matching feature for the organization (BYOD for apiDesktopConfig, for a local phone in apiMobileConfig and for local entries in apiMultiDeviceConfig; multi-device for apiMultiDeviceConfig); clearing never does. type and the configs are not cross-validated today (set both in one call to retarget). Field names from the run trigger or tRPC (userDeviceId, deviceArn, apps, mobileConfig, devices, …) at the top level are rejected with a hint rather than silently ignored.

Validation order: caseId → auth → body schema → tokens → membership → case lookup → configs, one key at a time in the order apiWebConfig, apiMobileConfig, apiDesktopConfig, apiMultiDeviceConfig (a key's feature gate runs before its own upload/device lookups; a config identical to the stored one is skipped) → single write. The first failing key is reported and nothing is written. Both apps[] and the legacy top-level uploadArn are checked for ownership when present.

patch/api/cases/{caseId}

Request

Path parameters

caseIdstring uuid required

Request body

titlestring
descriptionstring nullable

Set to null to clear the description. Omitting the field leaves it unchanged; an empty string is stored as an empty description, not a clear.

scenariostring

Scenario content; interpretation depends on format.

type'web' | 'mobile' | 'desktop' | 'multi_device'
format'gherkin' | 'markdown' | 'plain_text'
startUrlstring uri nullable
directoryIdstring uuid nullable

Move the case into a directory of its workspace; null moves it to the workspace root.

tagsstring[]

Caller-supplied labels, for example the commit and pull request a run was testing. At most 10, each 1-64 characters after trimming; duplicates are collapsed. A request exceeding a bound is refused with 400, never truncated. Tags are returned exactly as stored and are visible to everyone in your organization, so never put secrets in them.

Example request

{
  "tags": [
    "git:sha:3f2c1e9a7b6d5c4e3f2a1b0c9d8e7f6a5b4c3d2e",
    "genesis:pr:1234"
  ]
}

Response

Case updated.

successboolean required

Example response

{
  "success": true,
  "case": {
    "tags": [
      "git:sha:3f2c1e9a7b6d5c4e3f2a1b0c9d8e7f6a5b4c3d2e",
      "genesis:pr:1234"
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.