PATCH/projects/{ProjectId}/releases/{Id}

Applies to QAComplete 14.5, last modified on August 06, 2024

Updates a release in QAComplete.

Use the operation to update the needed fields of an existing release in QAComplete.

To update all the fields, use the …/releases/{Id} (PUT) operation.

To add a new release, use the …/releases (POST) operation.

Authentication

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 Releases.

Request Format

To update the release, send a PATCH request to the following URL:

http://{server}/rest-api/service/api/v1/projects/{ProjectId}/releases/{Id}
URL parameters

ProjectId  :  integer, required

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

Id  :  integer, required

The ID of the release, which fields you want to update.

Body parameters

In the request body, pass the RequestReleasePatch JSON object that specifies the release’s fields to be updated:


{
  "FolderId": "int",
  "ParentId": "int",
  "Title": "string",
  "Description": "string",
  "OwnerUserId": "int",
  "AssigneeUserId": "int",
  "IsAutoAdjustEstDates": "boolean",
  "StatusCode": "string",
  "IsActive": "boolean",
  "CustomFields": [
{
  "Id": "string",
  "Name": "string",
  "Value": "string"
}
  ],
  "EstStartDate": "Date",
  "EstFinishDate": "Date",
  "SeqNum": "int"
}

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

The property values you do not specify remain unchanged.

FolderId  :  integer

The ID of the folder you want to contain the release. 0, if the release should not be placed in a folder.

ParentId  :  integer

The ID of the new release’s parent release.

ReleaseType  :  string

Should be Release, Iteration, or Build.

Note: For builds and iterations, make sure to specify ParentId.

Title  :  string

The release’s title.

Description  :  string

The release’s description.

OwnerUserId  :  integer

The ID of the release’s owner.

AssigneeUserId  :  integer

The ID of the release’s assignee user.

IsAutoAdjustEstDates  :  boolean

Defines whether QAComplete should automatically adjust estimated dates for this release. Default value: false.

StatusCode  :  string

The release’s status code.

IsActive  :  boolean

Defines whether the release is active. Default value: false.

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.

EstStartDate  :  dateTime

Estimated start date for working on the release.

EstFinishDate  :  dateTime

Estimated finish date for working on the release.

SeqNum  :  integer

Number of the release in sequence.

A sample request:

PATCH http://yourserver.com/rest-api/service/api/v1/projects/11873/releases/145911 HTTP/1.1
Host: yourserver.com
Connection: keep-alive
Content-Type: application/json
Accept: application/json
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==
Content-Length: 183

       {         "Title": "Build after PATCH",         "Description": "A sample description",         "StatusCode": "Closed (Canceled)",         "AssigneeUserId": 135028       }      

A sample request made by using cURL:

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

Response Format

If successful, the operation responds with HTTP status code 200 and returns a JSON object with the updated release information.

A sample response:

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



  "update_user_id": 135027,
  "is_active": false,

{
  "id": 145911,
  "project_id": 101814,
  "folder_id": 0,
  "release_id": 145910,
  "parent_id": 145910,
  "release_type": "Build",
  "title": "Build after PATCH",
  "description": "A sample description",
  "owner_user_id": 135027,
  "assignee_user_id": 135028,
  "is_auto_adjust_est_dates": false,
  "date_created": "2017-04-10T08:36:13.9630000",
  "date_updated": "2017-04-10T09:16:05.0000000",
  "create_user_id": 135027,
  "update_user_id": 135027,
  "is_active": false,
  "status_code": "Closed (Canceled)",
  "est_start_date": "2017-02-17T18:00:00.0000000",
  "est_finish_date": "2017-02-19T06:00:00.0000000",
  "seq_num": 4,
  "import_id": 0,
  "parent_name": "Sample Release",
  "updated_user_name": "Smith, John",
  "created_user_name": "Smith, John",
  "custom_fields": [],
  "__permissions": {
"acl": 7
  }
}

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 release with the specified Id does not exist, the operation returns the File or directory not found error.

See Also

Releases Resources

Highlight search results