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

Resource you can POST to, resulting in the creation of a new Incident synchronized to a Ticket in an external system (POST creates the background task only, which is then completed asynchronously as linking can be take a long time).

Methods

POST


Starts a task for creating an incident from an external ticket.

  • 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

Create 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-a0a500e0754aID 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)

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

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