Resource: Automated Test Run Attachments ( /api/automatedtestrun/{runId}/attachments )
A collection resource representing the attachments of an Automated Test Run.
This resource supports the following methods: GET, POST
Methods
GET
Retrieves a list of attachments for a particular Automated Test Run.
Required Permissions
- TestManagement/View
Status Codes
These are the expected status codes returned by the service - in addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).
Status | Description |
---|---|
200 - OK | Returned if the request was completed successfully. |
403 - Forbidden | Returned if ET could not complete the request (normally due to a validation failure or the necessary permissions to complete the request have not been met). |
404 - NotFound | Returned if the ID for the run was not found in the database. |
Retrieves a list of attachments for a particular Automated Test Run.
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{runId} | 1459858c-9526-412e-afdd-09415593c2d3 | The unique identifier (GUID) of the Automated Test Run. |
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json; charset=utf-8 |
Response Body
Code Block | ||
---|---|---|
| ||
[ { "RunId": "1459858c-9526-412e-afdd-09415593c2d3", "Id": "9cb7f1cb-984d-4c47-9275-82d6409ed6be", "Name": "File 1", "FileName": "File 1.txt", "ContentType": "text/plain", "CreatedAt": "2013-02-01T11:00:00Z", "CreatedById": "89fda208-2f7a-42e9-8d0a-3518b80b0765", "Size": 111, "Self": "http://localhost/api/automatedtestrun/1459858c-9526-412e-afdd-09415593c2d3/attachment/9cb7f1cb-984d-4c47-9275-82d6409ed6be", "Content": "http://localhost/api/attachment/9cb7f1cb-984d-4c47-9275-82d6409ed6be/contents" }, { "RunId": "1459858c-9526-412e-afdd-09415593c2d3", "Id": "e6040570-48fb-48b4-af1e-fa90fe4ae7dd", "Name": "File 2", "FileName": "File 2.txt", "ContentType": "text/plain", "CreatedAt": "2013-02-01T11:00:00Z", "CreatedById": "89fda208-2f7a-42e9-8d0a-3518b80b0765", "Size": 148, "Self": "http://localhost/api/automatedtestrun/1459858c-9526-412e-afdd-09415593c2d3/attachment/e6040570-48fb-48b4-af1e-fa90fe4ae7dd", "Content": "http://localhost/api/attachment/e6040570-48fb-48b4-af1e-fa90fe4ae7dd/contents" }, { "RunId": "1459858c-9526-412e-afdd-09415593c2d3", "Id": "72d41457-1840-4a86-8080-788f3d974ba6", "Name": "File 3", "FileName": "File 3.txt", "ContentType": "text/plain", "CreatedAt": "2013-02-01T11:00:00Z", "CreatedById": "89fda208-2f7a-42e9-8d0a-3518b80b0765", "Size": 185, "Self": "http://localhost/api/automatedtestrun/1459858c-9526-412e-afdd-09415593c2d3/attachment/72d41457-1840-4a86-8080-788f3d974ba6", "Content": "http://localhost/api/attachment/72d41457-1840-4a86-8080-788f3d974ba6/contents" } ] |
Status Code
200 - OK
POST
Adds a new attachment to a particular Automated Test Run.
Required Permissions
- TestManagement/ManageExecution
Status Codes
These are the expected status codes returned by the service - in addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).
Status | Description |
---|---|
201 - Created | Returned if the request was completed successfully. |
403 - Forbidden | Returned if ET could not complete the request (normally due to a validation failure or the necessary permissions to complete the request have not been met). |
404 - NotFound | Returned if the ID for the run was not found in the database. |
415 - UnsupportedMediaType | Returned if the request is not mime multipart. |
Adds a new attachment to a particular Automated Test Run.
Request Headers
Key | Value | Description |
---|---|---|
Content-Type | multipart/mixed; boundary=65bf6b94-c91c-442c-abe7-f41444d7c71f |
Request Parameters
Key | Value | Description |
---|---|---|
{runId} | 1459858c-9526-412e-afdd-09415593c2d3 | The unique identifier (GUID) of the Automated Test Run. |
Request Body
Code Block | ||
---|---|---|
| ||
--65bf6b94-c91c-442c-abe7-f41444d7c71f Content-Disposition: attachment; filename=screenshot1.png; name="screenshot 1"; size=122454 Content-Type: image/png Content-Length: 3 ... --65bf6b94-c91c-442c-abe7-f41444d7c71f Content-Disposition: attachment; filename=notes.txt; name=notes; size=3 Content-Type: text/plain Content-Length: 3 ABC --65bf6b94-c91c-442c-abe7-f41444d7c71f-- |
Response Headers
Key | Value | Description |
---|---|---|
Location | http://localhost/api/automatedtestrun/1459858c-9526-412e-afdd-09415593c2d3/attachments | The location of the new attachment resource |
Status Code
201 - Created