POST/projects/{ProjectId}/sendemail/{EntityCode}/{Id}

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

Emails information on the specified item.

Use the operation to email detailed information on the specified item (a test, a test run, a defect, and so on) to the specified users. The item with the specified ID must exist.

Authentication

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

Security Rights

The authenticating user must have the Read privilege for the item.

Request Format

To email item information to users, send a POST request to the following URL:

http://{server}/rest-api/service/api/v2/projects/{ProjectId}/sendemail/{EntityCode}/{ID}
URL parameters

ProjectId  :  integer, required

The ID of the project to which the item belongs.

EntityCode  :  string, required

The type of the item whose data you want to email. Possible values:

  • Bugs
  • FunctionalSpecs
  • Tests
  • TestSets
  • TestRuns
  • ProjectTasks

Id  :  integer, required

The ID of the item whose data you want to email.

Body parameters

In the request body, pass the SendEntityByIdPostRequest object that lists the IDs of the users who will get information about the item:

{
  "UserIds": [
"int"
]
}

UsersIds   :  array of integers, required

An array of IDs of the users who will get the email.

A sample request:

POST http://yourserver.com/rest-api/service/api/v2/projects/11873/sendemail/Tests/2 HTTP/1.1
Host: yourserver.com
Connection: keep-alive
Content-Type: application/json
Accept: application/json
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==
Content-Length: 0

A sample request made by using cURL:

curl -u [email protected]:p@ssword http://yourserver.com/service/api/v2/projects/11873/sendemail/Tests/2

Response Format

On success, the operation returns an empty response with HTTP status code 200.

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.

See Also

SendEmail REST API Reference

Highlight search results