Skip to content
The docs are now organized by product area. Old links still work. Report a broken link

Defects API

List, read, create and update the defects of a Qualflare project over the REST API, with severity, status and category filters and every defect field.

Last updated

The Defects API lets you list, read, create and update defects in a Qualflare project over REST at https://api.qualflare.com/api/v1/defects, authenticated with a project access token.

Base path/api/v1/defects and /api/v1/defect/{seq}
ReadsAny token. Token creator: Viewer+ · project (requires the Viewer role or higher in the project)
WritesCreating and updating defects: a token created with Allow writes. Token creator: Editor+ · project (requires the Editor role or higher in the project)
Pages14 defects per page, newest first, as items and paging
LimitsRate limits and request sizes
ErrorsErrors and status codes
CLIqf <identifier> defects list, qf <identifier> defect get <seq> (Defects commands)
MCPlist_defects, get_defect, create_defect, update_defect (MCP server reference)

The four endpoints, each with its own section below:

EndpointWhat it does
GET /api/v1/defectsList defects
GET /api/v1/defect/{seq}Get a defect
POST /api/v1/defectsCreate a defect
PUT /api/v1/defect/{seq}Update a defect

List defects

List defects returns one page of the project's defects, newest first unless you sort them.

GET /api/v1/defects

Needs a project access token whose creator has the Viewer role or higher in the project.

NameTypeDefaultRequiredDescription
pagequery, integer1NoPage number, 1 to 1,000
severity[]query, stringNolow, medium, high or critical. Repeat it for more, up to 10
status[]query, stringNoactive, action_required, false_positive, closed or reopened. Repeat it for more, up to 10
environment[]query, stringNoAn environment identifier. Repeat it for more, up to 50
category[]query, stringNoassertion_failure, locator_failure, timeout, flaky, environment_error, precondition_failure, script_error, data_error, ci_infrastructure, regression, unknown, low_value_case or redundant_case. Repeat it for more, up to 50
sortByquery, stringseqNoseq, name, severity, status, category, environment, createdAt or updatedAt
sortDirquery, booleanNotrue sorts in descending order, false in ascending order. Left out, the list comes newest first without sortBy, and in ascending order with it
curl -sS -g "https://api.qualflare.com/api/v1/defects?severity[]=critical&status[]=active" \
  -H "Authorization: Bearer $QF_TOKEN"

Returns 200: A page of defects: items and paging, 14 defects per page.

  • The filter names end in [] and can repeat: severity[]=high&severity[]=critical. The curl example passes -g so curl sends the brackets as they are.
  • category[] takes the categories Qualflare gives defects, and environment[] an environment identifier.

Get a defect

Get a defect returns one defect by its number, and for a defect from a failure cluster, that cluster's label, status and severity.

GET /api/v1/defect/{seq}

Needs a project access token whose creator has the Viewer role or higher in the project.

NameTypeDefaultRequiredDescription
seqpath, integerYesThe defect number
curl -sS "https://api.qualflare.com/api/v1/defect/7" \
  -H "Authorization: Bearer $QF_TOKEN"

Returns 200: The defect.

{
  "seq": 7,
  "name": "Checkout total ignores the coupon",
  "severity": "high",
  "status": "active",
  "category": "unknown",
  "rootCauses": [],
  "automation": "manual",
  "isClosed": false,
  "description": "The order total stays at the full price after a valid coupon is applied.",
  "expected": "The total drops by 10%.",
  "actual": "The total is unchanged.",
  "teamSeq": 2,
  "teamName": "Payments",
  "environmentId": 3,
  "environmentName": "Staging",
  "clusterId": null,
  "clusterLabel": null,
  "clusterStatus": null,
  "clusterSeverity": null,
  "closedAt": null,
  "reopenedAt": null,
  "reopenedReason": null,
  "createdAt": "2026-10-28T09:30:05Z",
  "updatedAt": "2026-10-28T10:02:44Z"
}
  • A number that isn't a defect of the project answers 404 with defect not found.

Create a defect

Create a defect files a new defect in the project.

POST /api/v1/defects

Needs a project access token created with Allow writes, whose creator has the Editor role or higher in the project.

NameTypeDefaultRequiredDescription
namebody, stringYes1 to 128 characters; the API accepts 255, but longer text fails to save
severitybody, stringYeslow, medium, high or critical
environmentUidbody, stringNoAn environment identifier, up to 100 characters
descriptionbody, stringNoUp to 10,000 characters
expectedbody, stringNoThe expected result, up to 10,000 characters
actualbody, stringNoThe actual result, up to 10,000 characters
curl -sS -X POST "https://api.qualflare.com/api/v1/defects" \
  -H "Authorization: Bearer $QF_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Checkout total ignores the coupon", "severity": "high", "environmentUid": "staging"}'

Returns 201: The new defect.

  • name and severity are required. name holds up to 128 characters (the API accepts 255, but longer text fails to save). environmentUid is an environment identifier; description, expected and actual take up to 10,000 characters each.
  • A new defect starts active, in the unknown category.
  • An environmentUid that isn't an environment of the project answers 400 with environment not found, here and in Update a defect.

Update a defect

Update a defect changes the fields you send and returns the defect.

PUT /api/v1/defect/{seq}

Needs a project access token created with Allow writes, whose creator has the Editor role or higher in the project.

NameTypeDefaultRequiredDescription
seqpath, integerYesThe defect number
namebody, stringNoUp to 128 characters; the API accepts 255, but longer text fails to save
descriptionbody, stringNoUp to 10,000 characters
severitybody, stringNolow, medium, high or critical
statusbody, stringNoactive, action_required, false_positive or closed
expectedbody, stringNoUp to 10,000 characters
actualbody, stringNoUp to 10,000 characters
environmentUidbody, stringNoAn environment identifier, up to 100 characters
curl -sS -X PUT "https://api.qualflare.com/api/v1/defect/7" \
  -H "Authorization: Bearer $QF_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status": "closed"}'

Returns 200: The updated defect.

  • status takes active, action_required, false_positive or closed; reopened can't be sent. A reopened defect goes back to active.
  • A number that isn't a defect of the project answers 404 with defect not found.

A create can't be retried safely: if a POST succeeded but you didn't get the answer, a retry creates a second defect.

Defect fields

Every defect the Defects API returns has these fields:

FieldTypeNotes
seqintegerThe defect number in the project
namestringUp to 128 characters
severitystringlow, medium, high or critical
statusstringactive, action_required, false_positive or closed (Defect statuses)
categorystringOne of the 13 values category[] takes in List defects
rootCausesarray of stringsThe root causes recorded for the defect
automationstringmanual or automated
isClosedbooleantrue for a closed defect
description, expected, actualstringThe description, expected result and actual result, or null
teamSeq, teamNameinteger, stringThe owning team, or null
environmentId, environmentNameinteger, stringThe defect's environment, or null
clusterIdintegerThe failure cluster the defect came from, or null
clusterLabel, clusterStatus, clusterSeveritystringThat cluster's label, status and severity on Get a defect; null in list items
closedAtstringWhen the defect was closed or marked false positive, or null while it is open
reopenedAt, reopenedReasonstringWhen and why the defect was last reopened, or null
createdAt, updatedAtstringRFC 3339 timestamps

CLI and MCP equivalents

The qf CLI and the MCP server run the same reads, and the MCP server the same writes, so they return the same JSON:

RESTqf command and MCP tool
GET /api/v1/defectsqf <identifier> defects list; list_defects
GET /api/v1/defect/{seq}qf <identifier> defect get <seq>; get_defect
POST /api/v1/defectsNo qf command; create_defect
PUT /api/v1/defect/{seq}No qf command; update_defect