Resource: External System Link Ticket Link ( /api/externalsystemlink/{externalSystemLinkId}/ticket/{ticketId}/link )

Allows the creation of a new incident in ET that is synchronized to a ticket in an external system (JIRA, TFS or Rally).

This resource supports the following methods: POST

Methods

POST


Creates a background task for creating an incident from an external ticket. Note: this task completes asynchronously and may take some time to complete.

  • TestManagement/ExecuteTests

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

StatusDescription
202 - AcceptedReturned if the task was created successfully.
403 - ForbiddenIf you do not have permission to execute this job, or the parameters are invalid.

Example - Start background task to create new incident linked to ticket

An example of creating a new incident synchronized with a ticket. Note: When the task completes, retrieving the progress of the task will include a link to the Incident that was created and an additional value, 'IncidentId'.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{ticketId}16841ID of the ticket to link to. In cases of systems such as JIRA, this is the internal identifier, not the 'Key' for the ticket (issue).
{externalSystemLinkId}c63e805c-e5d3-4919-9d10-a0a500e0754aThis is the unique identifier of the external system link in ET.

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Complete": false,
  "TotalElements": 0,
  "ProcessedElements": 0,
  "StartedAt": "2012-08-06T11:28:45Z",
  "ProgressInPercent": 0.0,
  "Id": "ticketlinking_cba3035a-bf63-4006-89b1-b291aaac0460",
  "Message": null,
  "Self": "http://localhost/api/backgroundtask/ticketlinking_cba3035a-bf63-4006-89b1-b291aaac0460"
}

Status Code

202 - Accepted

Example - Create new incident linked to ticket (when task completed immediately)

This example shows the progress response of linking once completed, including the additional details of the Incident that was created.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{ticketId}16841ID of the ticket to link to. In cases of systems such as JIRA, this is the internal identifier, not the 'Key' for the ticket (issue).
{externalSystemLinkId}9b01796c-a9ae-40cb-a6ad-a802346c0c33This is the unique identifier of the external system link in ET.

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Complete": true,
  "StartedAt": "2012-08-06T11:39:45Z",
  "FinishedAt": "2012-08-06T11:39:53Z",
  "ProgressInPercent": 1.0,
  "Id": "ticketlinking_9b01796c-a9ae-40cb-a6ad-a802346c0c33",
  "Message": "Completed",
  "IncidentId": "029b2c43-38be-4c94-b547-a0a50185fb9e",
  "Self": "http://localhost/api/backgroundtask/ticketlinking_9b01796c-a9ae-40cb-a6ad-a802346c0c33",
  "Links": [
    {
      "Href": "http://localhost/api/incident/029b2c43-38be-4c94-b547-a0a50185fb9e",
      "Rel": "Incident"
    }
  ]
}

Status Code

202 - Accepted

  • No labels