Jira-gateway provides RESTful APIs for Ticket manager to access Jira Ticketing System
Other domain services should not access jira-gateway
, instead they should use Ticket manager which has much more convenient APIs.
API
https://jira-gateway.apps.brave.safibank.online/swagger/views/swagger-ui/
POST /ticket // create ticket GET /tickets // list tickets, includes paging (sorting and filtering done via JQL) GET /tickets/{id} // get single ticket by ID or KEY
Data model
Ticket
model
{ "id": 19062, # ticket id "key": "BOSD-93", # ticket key, has same semantics as id "projectId": 10016, # fixed for BOSD project "projectKey": "BOSD", "projectName": "BackOffice", "issueTypeId": 10026, # a fixed issue type "issueTypeName": "Service Request", "requestTypeId": 124, # a fixed request type "requestTypeName": "Call Center Issue", "requestTypeDescription": "", "boRequestTypeOrderedList": [ # the customized request types for BOSD { "backofficeRequestTypeId": 10268, "backofficeRequestTypeName": "Onboarding Query" }, { "backofficeRequestTypeId": 10300, "backofficeRequestTypeName": "Selfie / Photo" } ], "summary": "summary created via restful api", "description": "description created via restful api", "customerId": "1111-2222-4444--5555", # the customer of safibank "customerChannel": "Voice", "customerType": "Account Owner", "productType": "Cards", "interactionId": "628daebbcf01a10069ad5fe2", "webLink": "https://safibank.atlassian.net/servicedesk/customer/portal/6/BOSD-93", "agentLink": "https://safibank.atlassian.net/browse/BOSD-93", "currentStatus": "Open", "priorityId": 3, "priorityName": "Medium", "reporter": { "accountId": "628daebbcf01a10069ad5fe2", "displayName": "Gavin Zhang", "emailAddress": "guangquanzhang@gmail.com" }, "approvers": [], "organizations": "", "responsibleTeam": "Back Office CDD Team", "comments": [], "attachments": [], "labels": [], "timeToResolution": { "id": 14, "name": "Time to resolution", "ongoingCycle": { "startTime": 1661226144.648, "breachTime": 1661398944.648, "breached": false, "paused": false, "goalDurationInMillis": 57600000, "elapsedTimeInMillis": 25299, "remainingTimeInMillis": 57574701 }, "completedCycles": [] }, "timeToFirstResponse": { "id": 15, "name": "Time to first response", "ongoingCycle": { "startTime": 1661226144.648, "breachTime": 1661266800, "breached": false, "paused": false, "goalDurationInMillis": 28800000, "elapsedTimeInMillis": 0, "remainingTimeInMillis": 28800000 }, "completedCycles": [] }, "createdAt": 1661226144.648, "updatedAt": 1661226147.051 }
See further mappings in Backoffice tickets mapping to Jira models .
Implementation
The gateway interacts with Jira through HTTP requests against Jira APIs:
uri-of-create-ticket: https://safibank.atlassian.net/rest/api/3/issue uri-of-create-service-request: https://safibank.atlassian.net/rest/servicedeskapi/request base-uri-of-get-service-request: https://safibank.atlassian.net/rest/servicedeskapi/request base-uri-of-get-ticket: https://safibank.atlassian.net/rest/api/3/issue uri-of-search-ticket: https://safibank.atlassian.net/rest/api/3/search
The gateway is configured to work with BOSD Jira project. It's not designed to work with multiple projects.
Credentials
user name and token stored in vault secrets
TODO: Replace Gavin Zhang (Unlicensed)'s Personal Jira account used for this by a proper system/admin account SAF-513 - Use a System account credentials to create Jira tickets Backlog
Resources
Internal
BO Ticket portal (you need access)
External
Jira cloud REST API (provides commonly-used Jira operations)
https://developer.atlassian.com/cloud/jira/service-desk/rest/intro/
Jira Software Cloud REST API (provides more additional Jira operations: sprint, epic, scrum related etc.)