Updated:

Version 2.13.01

Base API url path <JIRA_BASE_URL>/rest/microsoft-teams/1.0

GET /configuration?projectKey

Where projectKey is an optional filter.

Gets global or project configurations.

[
  {
    "id": 1,
    "webHookUrl": "https://outlook.office.com/webhook/...",
    "projectKey": "05f11044-da77-41a8-ac66-a9388ffd0925 for all projects or comma-separated project keys",
    "projectKeyExclude": "",
    "name": "Demo",
    "noMessageDetails": false,
    "events": [
      "ISSUE_COMMENT_DELETED",
      "ISSUE_CREATED",
      "ISSUE_COMMENTED",
      "ISSUE_COMMENT_EDITED"
    ],
    "filters": {
      "issuePriorities": [],
      "issueTypes": [],
      "issueStatuses": [],
      "components": [],
      "customFields": [],
      "messageFields": [],
      "assignees": [],
      "creators": [],
      "labels": [
        "perro"
      ]
    }
  }
]
CODE

POST /configuration

Creates or saves a configuration

The example payload

{
  "id": 2,
  "webHookUrl": "https://outlook.office.com/webhook/4e7caca6-cb1f-4ad4-b42d-5e374d1f9b40@ba81fbde-b65f-4376-8c0e-3c0d4cf20b8a/IncomingWebhook/54e95dd9380f4927aad2e5489e2237e2/ab6917ca-c480-4e1d-9968-3d36aa8f561d",
  "projectKey": "HOLA,PROJ",
  "projectKeyExclude": "",
  "name": "THE NAME",
  "noMessageDetails": false,
  "events": [
    "ISSUE_COMMENTED",
    "ISSUE_COMMENT_DELETED",
    "ISSUE_CREATED",
    "ISSUE_COMMENT_EDITED",
    "ISSUE_GENERICEVENT"
  ],
  "filters": {
    "issuePriorities": [
      "2",
      "3"
    ],
    "issueTypes": [
      "10001"
    ],
    "issueStatuses": [
      "3"
    ],
    "components": [],
    "customFields": [],
    "messageFields": [],
    "assignees": [
      "admin"
    ],
    "creators": [],
    "labels": []
  }
}
CODE

DELETE /configuration

Deletes an existing configuration

The body should be in the JSON format

{
  "id": "<CONFIGURATION_ID>"
}
CODE

GET /supported-events

Gets supported event types

[{
  "id": "ISSUE_CREATED",
  "label": "Issue created"
}]
JSON

Currently supported events are

ISSUE_CREATED("Issue created"),
ISSUE_UPDATED("Issue updated"),
ISSUE_ASSIGNED("Issue assigned"),
ISSUE_CLOSED("Issue closed"),
ISSUE_COMMENTED("Issue commented"),
ISSUE_DELETED("Issue deleted"),
ISSUE_MOVED("Issue moved"),
ISSUE_REOPENED("Issue re-opened"),
ISSUE_RESOLVED("Issue resolved"),
ISSUE_COMMENT_EDITED("Comment edited"),
ISSUE_COMMENT_DELETED("Comment deleted"),
ISSUE_WORKLOGGED("Work logged"),
ISSUE_GENERICEVENT("Generic (includes status change)"), // Workflow changes (status)
ISSUE_WORKSTARTED("Work started"),
ISSUE_WORKSTOPPED("Work stopped"),
;
CODE

GET /excluded-projects

Gets excluded projects for the App. If the project is excluded it cannot use Microsoft Teams Jira Connector.

The response is

[{
 "id": "the config id",
 "projectKey": "the project key to exclude"
}]
CODE

POST /excluded-projects

Saves excluded projects.

The body should contain the project to exclude and the id of the config id updating or 0 (or be absent)

[{
 "projectKey": "THE_PROJECT_KEY_TO_EXCLUDE"
}]

[{
 "id": 234,
 "projectKey": "THE_PROJECT_KEY_TO_EXCLUDE"
}]
CODE