×

You're using an outdated browser

For a better experience, keep your browser up to date. Check here for the latest version.

Manual

Connectors

Matthias Gaiser

Matthias Gaiser Last update: Aug 4, 2017

Info

Please make sure to read the Introduction to the REST API before starting to use it.

This page describes all rest endpoints which are related to one or multiple connectors. A connector is one half of an integration, responsible for one project.

MethodURLDescription
GET/connectors/{connectorKey}/syncInformationReturns an array of sync information (which local issue belongs to which remote issue) for this connector.
POST/connectors/{connectorKey}/syncInformationImports an array of sync information into this connectors sync information.
DELETE/connectors/{connectorKey}/syncInformationDeletes the sync information for a single entry.

How to find the connector key

All endpoints described here need a connector key. You can find the corresponding connector key by using the integration endpoints. Inside an integration, you can locate two connectorKeys, one for each project.

Detailed description

 Get all sync information

GET /connectors/{connectorKey}/syncInformation

Returns an array of sync information (which local issue belongs to which remote issue) for this connector.

URL ParameterDescriptionDefaultRequired
connectorKeyThe key of the connector you are interested in.-(tick)
localIssueKeyThe key of an issue belonging to this project. If specified, only entries matching this local key will be returned.- 
remoteIssueKeyThe key of an issue belonging to the partner project. If specified, only entries matching this remote key will be returned.- 

Response

The endpoint will return a list of sync information matching your (optionally defined) filter criteria.

[
  {
    "id": 1,
    "connectorKey": "PA-2",
    "localIssueKey": "PA-1",
    "remoteIssueKey": "PB-1",
    "firstSyncDate": 1495002038742,
    "lastOutgoingChange": 1495002035948,
    "lastChangeSeen": 1495002035948,
    "outgoingMessageSequenceId": 1,
    "lastIncomingChange": 1495002053729,
    "incomingMessageSequenceId": 1,
    "incomingChangesIgnored": false
  },
  {
    "id": 2,
    "connectorKey": "PA-2",
    "localIssueKey": "PA-2",
    "remoteIssueKey": "PB-2",
    "firstSyncDate": 1495002042722,
    "lastOutgoingChange": 1495002040675,
    "lastChangeSeen": 1495002040675,
    "outgoingMessageSequenceId": 1,
    "lastIncomingChange": 1495002058847,
    "incomingMessageSequenceId": 1,
    "incomingChangesIgnored": false
  }
]

 Import sync information

POST /connectors/{connectorKey}/syncInformation

Imports all given sync information. This endpoint can be used to set already existing issues in correlation.

URL ParameterDescriptionDefaultRequired
connectorKeyThe key of the connector you are interested in.-(tick)

In order to access the endpoint successfully, you need to provide a request entity as JSON. This entity needs the following parameter:

Entity ParameterTypeDescriptionDefaultRequired
localIssueKey
stringThe issue key of this project.-(tick)
remoteIssueKey
stringThe issue key of the partner project-(tick) 
firstSyncDate
longThe time in millis when the first sync happened. 
lastOutgoingChange
longThe time in millis when the last change has been sent. 
lastChangeSeen
longThe time in millis when the last outgoing change has been checked. 
outgoingMessageSequenceId
integerThe sequence id of the last sent message.- 
lastIncomingChange
longThe time in millis when the last change has been received.- 
incomingMessageSequenceId
integerThe sequence id of the last received message.- 
incomingChangesIgnored
booleanDefines if incoming changes should be discarded, e.g. for deleted issues.false 

Example Request

[
  {
    "localIssueKey": "PA-1",
    "remoteIssueKey": "PB-1",
    "firstSyncDate": 1495002038742,
    "lastOutgoingChange": 1495002035948,
    "lastChangeSeen": 1495002035948,
    "outgoingMessageSequenceId": 1,
    "lastIncomingChange": 1495002053729,
    "incomingMessageSequenceId": 1,
    "incomingChangesIgnored": false
  },
  {
    "localIssueKey": "PA-2",
    "remoteIssueKey": "PB-2",
    "firstSyncDate": 1495002042722,
    "lastOutgoingChange": 1495002040675,
    "lastChangeSeen": 1495002040675,
    "outgoingMessageSequenceId": 1,
    "lastIncomingChange": 1495002058847,
    "incomingMessageSequenceId": 1,
    "incomingChangesIgnored": false
  }
]


Example Response

The endpoint will response with a HTTP status 200 OK if the import succeeded.

 Delete a sync information entry

DELETE /connectors/{connectorKey}/syncInformation

Deletes a single sync information entry.

URL ParameterDescriptionDefaultRequired
connectorKeyThe key of the connector you are interested in.-(tick)
syncInfoIdThe id of the sync information entry. This can be found via the get sync information endpoint.-(tick)


Example Result

The endpoint will response with a HTTP status 200 OK if the import succeeded.

2x3.9
We use cookies to create a secure and effective browsing experience for our website visitors and to understand how you use our site (i.e. Google Analytics). For more information: click here.
Ok