Applies to QAComplete 14.4, last modified on June 20, 2024

Updates the specified defect.

Use the operation to replace the contents of an existing defect with new contents in QAComplete.

To update individual fields of a defect, use the …/defects/{Id} (PATCH) operation. To add a new defect, use the …/defects (POST) operation.


Basic authentication using a user’s login and password. See Authentication for details.

Security Rights

The authenticating user must belong to a security group that has the Update privilege for Defects.

Request Format

To update the defect, send a PUT request to the following URL:

URL parameters

ProjectId  :  integer, required

The ID of the project, to which the defect belongs.

Id  :  integer, required

The ID of the defect you want to update.

Body parameters

In the request body, pass the RequestDefectPut JSON object that describes the defect’s new contents:

  "Title": "string",
  "Status": "string",
  "ActFinish": "Date",
  "ActHrs": "float",
  "ActStart": "Date",
  "ActualResults": "string",
  "AssigneeUserId": "int",
  "CustomFields": [
      "Id": "string",
      "Name": "string",
      "Value": "string"
  "Description": "string",
  "EstFinish": "Date",
  "EstHrs": "float",
  "EstHrsRemaining": "float",
  "EstStart": "Date",
  "ExpectedResults": "string",
  "FolderId": "int",
  "FunctionalAreaCode": "string",
  "HowFoundCode": "string",
  "IssueCode": "string",
  "ModuleCode": "string",
  "PctComplete": "int",
  "PriorityCode": "string",
  "Resolution": "string",
  "ResolutionCode": "string",
  "SeverityCode": "string",
  "SoftwareVersionCode": "string",
  "StepsToRepro": "string"

Some string property values (for example, Status) are based on choice lists defined in your QAComplete project. You can find these values in Defects > Show Defects > Actions > Manage Choice Lists in QAComplete.

The property values you do not specify are set to their default values.

Title  :  string, required

The defect title (subject).

Status  :  string, required

The defect status based on a choice list.

ActFinish  :  dateTime

Actual date when the defect was fixed.

ActHrs  :  float

Actual hours spent fixing the defect.

ActStart  :  dateTime

Actual start date for defect fixing.

ActualResults  :  string

Actual outcome of actions performed when the defect was found. Can include HTML markup.

AssigneeUserId  :  integer

The ID of the user, to whom the defect is assigned. 0 if the defect is not assigned to anyone.

CustomFields  :  object

An array of CustomFields objects that describe custom fields and their values:

  "Id": "string",
  "Name": "string",
  "Value": "string"

Id  :  string, required

The unique identifier of the custom field. Must be in the CustomN format, where N is the custom field’s number (index).

Name  :  string

The field name.

Value  :  string

The field value.

Description  :  string

Long description of the defect. Can include HTML markup.

EstFinish  :  dateTime

Estimated finish date for defect fixing.

EstHrs  :  float

Estimated hours to fix the defect.

EstHrsRemaining  :  float

Estimated remaining hours for defect fixing.

EstStart  :  dateTime

Estimated start date for working on the defect.

ExpectedResults  :  string

Expected results of the software if it did not have this defect.

FolderId  :  integer

The ID of the folder containing the defect, or 0 if the defect is not in any folder.

FunctionalAreaCode  :  string

The functional area where the defect was found. This value is based on a choice list.

IssueCode  :  string

The defect type based on a choice list.

HowFoundCode  :  string

How the defect was found. This value is based on a choice list.

ModuleCode  :  string

The module where the defect was found. This value is based on a choice list.

PriorityCode  :  string

The defect priority.

PctComplete  :  integer

Percentage complete of defect fixing.

Resolution  :  string

The defect’s resolution details. Can include HTML markup.

SeverityCode  :  string

The defect severity based on a choice list.

ResolutionCode  :  string

The defect’s resolution status based on a choice list.

SoftwareVersionCode  :  string

The project version that the defect affects. This value is based on a choice list.

StepsToRepro  :  string

Steps to reproduce the defect. Can include HTML markup.

A sample request:

PUT http://yourserver.com/rest-api/service/api/v1/projects/11873/defects/17 HTTP/1.1
Host: yourserver.com
Connection: keep-alive
Content-Type: application/json
Accept: application/json
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==
Content-Length: 250

  "Title": "Floating toolbar improvements",
  "Status": "Active",
  "AssigneeUserId": "25264",
  "Description": "The design of the floating toolbar needs improvement so that it’s clearer what the user needs to do.",
  "PriorityCode": "2-Fix Soon"

A sample request made by using cURL:

curl -u [email protected]:p@ssword -d @defect.txt -H "Content-Type: application/json" -H "Accept: application/json" http://yourserver.com/service/api/v1/projects/11873/defects/17

Response Format

On success, the operation responds with HTTP status code 200 and returns a JSON object with the updated defect information.

A sample response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 1198

  "id": 8,
  "title": "Floating toolbar improvements",
  "status": "Active",
  "__permissions": {
    "acl": 7
  "act_finish": "0001-01-01T00:00:00.0000000",
  "act_hrs": 0,
  "act_start": "0001-01-01T00:00:00.0000000",
  "actual_results": "",
  "assigned_to_name": "Smith, John",
  "assignee_user_id": 25264,
  "closed_by": 0,
  "custom_fields": [],
  "date_closed": "0001-01-01T00:00:00.0000000",
  "date_created": "2015-09-07T00:52:27.0700000",
  "date_opened": "2015-09-07T00:52:27.0700000",
  "date_resolved": "0001-01-01T00:00:00.0000000",
  "date_updated": "2015-09-07T00:52:27.0700000",
  "description": "The design of the floating toolbar needs improvement so that it’s clearer what the user needs to do.",
  "est_finish": "0001-01-01T00:00:00.0000000",
  "est_hrs": 0,
  "est_hrs_remaining": 0,
  "est_start": "0001-01-01T00:00:00.0000000",
  "folder_id": 0,
  "import_id": 0,
  "nbr_events": 0,
  "nbr_files": 0,
  "nbr_notes": 0,
  "nbr_tasks": 0,
  "opened_by": 0,
  "opened_by_company": "EDGB",
  "opened_by_email": "[email protected]",
  "opened_by_name": "Smith, John",
  "original_id": 0,
  "owner_name": "Smith, John",
  "owner_user_id": 25264,
  "pct_complete": 0,
  "priority_code": "2-Fix Soon",
  "project_id": 11873,
  "resolved_by": 0,
  "severity_code": " ",
  "update_user_id": 25264,
  "user_name": "Smith, John"

Error responses

If the operation fails, it returns the appropriate status code and (optionally) the error description in the response body.

If the project with the specified ProjectId does not exist or the authenticating user does not have rights to access the project, the operation returns the Access is denied error.

If a defect with the specified Id does not exist, the operation returns the File or directory not found error.

See Also

Defects Resources

Highlight search results