swagger: "2.0" info: version: "v1.0" title: ServiceNow - Remedy Incident synchronisation description: An API to share an incident tickets between Remedy and ServiceNow schemes: - http host: "localhost:8080" consumes: - "application/json" produces: - "application/json" paths: /incident: post: tags: - "Incident ticket" summary: "Create a new ticket" description: "Create a new ticket by specifying the 'originIncidentNumber'." parameters: - in: "body" name: "body" description: "Request body" required: true schema: $ref: "#/definitions/newTicket" responses: 201: description: "Incident created" schema: $ref: "#/definitions/ticketResponse" 401: description: "Not authenticated" 404: description: "Not found" 407: description: "Proxy system not authenticated" 500: description: "Internal Server Error" put: tags: - "Incident ticket" summary: "Modify an existing ticket" description: "This call is used to update a ticket that already exists by using the 'targetIncidentNumber'." parameters: - in: "body" name: "body" description: "Request body" required: true schema: $ref: "#/definitions/updateTicket" responses: 200: description: "OK" schema: $ref: "#/definitions/ticketResponse" 401: description: "Not authenticated" 404: description: "Not found" 407: description: "Proxy system not authenticated" 500: description: "Internal Server Error" definitions: newTicket: type: "object" required: - targetSystem - originSystem - transactionId - callerId - originIncidentNumber - shortDescription properties: targetSystem: type: "string" description: "System receiving the request" example: "REMEDYSA" enum: - "REMEDYSA" - "SERVICENOW" originSystem: type: "string" description: "System originating the request" example: "SERVICENOW" enum: - "REMEDYSA" - "SERVICENOW" transactionId: type: "string" description: "Transaction identifier used by client" example: "123ABC" callerId: type: "string" description: "User from calling system" example: "a.gonzalez.bogaz@accenture.com" originIncidentNumber: type: "string" description: "Origin ticket identifier, this is the id of the ticket at the originating system" example: "INC0011558" shortDescription: type: "string" description: "Brief description about the ticket" example: "Superman is sick" detailedDescription: type: "string" description: "More detailed description of the ticket" example: "Superman is sick because he was exposed to Kryptonite" impact: type: "string" description: "Level of impact" example: "1" enum: - "1" - "2" - "3" - "4" urgency: type : "string" description : "Level of urgency" example : "3" enum: - "1" - "2" - "3" - "4" interface: type: "string" description: "interface applicable to requests for RemedySA" example: "interface" signalName: type: "string" description: "signalName applicable to requests for RemedySA" example: "signalName" attachmentFilename: type: "string" description: "Name of file being attached" example: "image1.png" attachmentData: type: "string" format: "base64" description: "Attachment data encoded in base64" example: "fdgrdvh22dhv2dhtdt3h35th4" updateTicket: type: "object" required: - transactionId - originSystem - targetSystem - targetIncidentNumber properties: transactionId: type: "string" description: "Transaction identifier used by client" example: "123ABC" originSystem: type: "string" description: "System originating the request" example: "SERVICENOW,REMEDYSA" targetSystem: type: "string" description: "System receiving the request" example: "REMEDYSA,SERVICENOW" targetIncidentNumber: type: "string" description: "Incident number at the target system" example: "INC0011964" shortDescription: type: "string" description: "Brief description about the ticket" example: "Superman is sick" detailedDescription: type: "string" description: "More detailed description of the ticket" example: "Superman is sick because he was exposed to Kryptonite" impact: type: "string" description: "Level of impact" example: "1" enum: - "1" - "2" - "3" - "4" urgency: type : "string" description : "Level of urgency" example : "3" enum: - "1" - "2" - "3" - "4" attachmentFilename: type: "string" description: "Name of file being attached" example: "image1.png" attachmentData: type: "string" format: "base64" description: "Attachment data encoded in base64" example: "fdgrdvh22dhv2dhtdt3h35th4" state: type: "string" description: "Only applicable for values 2,3,6,7,8. Value 1 is set when an incident is created. Value 2 can only be set if the ticket 'assignedTo' field was prevously set" example: "3" enum: - "2" - "3" - "6" - "7" - "8" assignedTo: type: "string" description: "Who the incident is assigned to" example: "integration.mtn.sa.remedy" closeCode: type: "string" description: "Applicable when setting 'state' to 6. This value is used to indicate the code for resolution." enum: - "Not Resolved – Not Reproducible" - "Not Resolved – Problem Raised" - "Not Resolved – Resolved by Vendor" - "Resolved - Workaround Applied" - "Resolved – Fixed by Caller" - "Resolved – Fixed Without Action" - "Resolved – Permanent Fix Applied" example: "Resolved – Permanent Fix Applied" closeNotes: type: "string" description: "Custom notes for closing ticket." example: "All done!" comments: type: "string" description: "Comments to incident" example: "My comments" workNotes: type: "string" description: "Work notes to incident" example: "My notes" subcategory: type: "string" description: "Incident category" example: "database" interface: type: "string" description: "interface applicable to requests for RemedySA" example: "interface" signalName: type: "string" description: "signalName applicable to requests for RemedySA" example: "signalName" summary: type: "string" description: "summary applicable to requests for RemedySA" example: "summary" detailedSummary: type: "string" description: "detailedSummary applicable to requests for RemedySA" example: "detailedSummary" ticketResponse: type: "object" required: - targetIncidentNumber - statusCode - statusMessage - originTransactionId - targetTransactionId properties: targetIncidentNumber: type: string description: "Target ticket identifier, this is the id of the ticket at the target system" statusCode: type: "string" description: "Status code from target system to indicate transaction status" statusMessage: type: "string" description: "Status response description" example: "processed" originTransactionId: type: "string" description: "Transaction identifier generated by system originating the request" example: "MTN123456" targetTransactionId: type: "string" description: "Transaction identifier generated by target" example: "17af7d89db62885072fa83305b961972"