Get Incident Ticket Data

The GetIncidentTicketData API allows users to retrieve data of incident tickets that have been saved using the Save Incident API. The API supports various filters such as start date, end date, ticket number, assignment group, sys_id, and ModuleId to retrieve specific data. The API returns ticket data including ticket number, summary, description, assigned group, status code, creation date, last modified date, closed date, sys_id, and custom columns.

API version V1.0

API: GetIncidentTicketData
Purpose: To get data of Incident tickets that are dumped using Save Incident API.
API URL: http://<API URL>:<API Port>/iAutomateAPI/Request/GetIncidentTicketData/7
Authentication type: Basic
Method Type: GET
Input Params in Query string:

You can pass the following filters in the URL to get desired data:

  • start_date
  • end_date
  • ticktet_number
  • assignment_group
  • sys_id
  • ModuleId
Filter field Supported Filter operator
start_date >= ,< , >, <=, =
end_date >= ,< , >, <=, =
Ticket_number =
assignment_group =
sys_id =
ModuleId =
Example: http://<API URL>:<API Port>/iAutomateAPI/Request/GetIncidentTicketData/7?ModuleId=1& start_date>=2020-01-29 07:12:23.607&end_date<=2019-11-18 06:24:52&

ModuleId=1 for Incident Management and ModuleId=9 for Event Management.

Output:

{

"statusCode": 200,

"status": "Success",

"message": null,

"result": [

{

"TicketNumber": "1006976",

"Summary": "Restart Spooler service on target server ",

"Description": "Restart Spooler service on target server",

"AssignedGroup": "945e4f5b7ba0108fd5bfce83af21369",

"StatusCode": "1",

"CreationDate": "2020-05-04 10:40:30.000",

"LastModifiedDate": "2020-05-04 04:41:50.000",

"ClosedDate": "2020-05-06 10:41:53.000",

"sys_id": "945e9006d4b89a98fe7574c1cc284",

"Col1": "",

"Col2": "",

"Col3": "",

"Col4": "",

"Col5": "",

"iAutomate_CreatedDateInGMT": "2020-05-04 05:25:36.350",

"iAutomate_UpdatedDateInGMT": "2020-05-04 05:25:36.350"

}

]

}

Column Column Type Expected/Sample value Remarks
TicketNumber string INC0303863 This field contains ticket number
Summary string testing This field contains summary of ticket
Description string testing This field contains summary of ticket
AssignedGroup string 123456 This field contains assignment group of ticket
StatusCode string 1 This field contains status of ticket
CreationDate string 2019-11-18 06:24:52 This field contains creation date of ticket
LastModifiedDate string 2019-11-18 07:24:52 This field contains date whenever updating happen on ticket
ClosedDate string 2019-11-18 07:24:52 This field contains date whenever ticket gets resolved
sys_id string 2b535ab3dbc988506d7550d3dc96190e This field contains unique number
Col1 string You can use it for any custom value
Col2 string You can use it for any custom value
Col3 string You can use it for any custom value
Col4 string You can use it for any custom value
Col5 string You can use it for any custom value
iAutomate_CreatedDateInGMT string 2020-05-04 05:25:36.350 It return date in GMT
iAutomate_UpdatedDateInGMT string 2020-05-04 05:25:36.350 It return date in GMT

API version V2.0

API: GetIncidentTicketData
Purpose: To get data of Incident tickets that are dumped using Save Incident API.
API URL: http://<API URL>:<API Port>/v2/incident/orgentityid/1
Authentication type: Basic
Method Type: GET
Input Params in Query string:

You can pass the following filters in the URL to get desired data:

  • start_date
  • end_date
  • ticktet_number
  • assignment_group
  • sys_id
  • ModuleId
Filter field Supported Filter operator
start_date >= ,< , >, <=, =
end_date >= ,< , >, <=, =
Ticket_number =
assignment_group =
sys_id =
ModuleId =
Example: http://<API URL>:<API Port>/ v2/incident/orgentityid/1?ModuleId=1& start_date>=2020-01-29 07:12:23.607&end_date<=2019-11-18 06:24:52&

ModuleId=1 for Incident Management and ModuleId=9 for Event Management.

Output:

{

"Count": 1,

"Result": [

{

"TicketNumber": "INC0303869",

"Summary": "The Alert with description Backup job for Database has failed on the server 161.82.106.210 Significance Causal\" \"Zabbix\" has been resolved and closed",

"Description": "testing data",

"AssignedGroup": "",

"StatusCode": "1",

"CreationDate": "2019-11-18 06:24:52.000",

"LastModifiedDate": "2019-11-18 06:24:52.000",

"ClosedDate": "",

"sys_id": "2b535ab3dbc988506d7550d3dc96190e",

"Col1": "",

"Col2": "",

"Col3": "",

"Col4": "",

"Col5": "",

"Col6": "",

"Col7": "",

"Col8": "",

"Col9": "",

"Col10": "",

"Col11": "",

"Col12": "",

"Col13": "",

"Col14": "",

"Col15": "",

"Col16": "",

"Col17": "",

"Col18": "",

"Col19": "",

"Col20": "",

"iAutomate_CreatedDateInGMT": "2023-06-12 08:30:53.367",

"iAutomate_UpdatedDateInGMT": "2023-06-12 08:30:53.367"

}

],

"Status": "Success",

"Message": "Success"

}

Column Column Type Expected/Sample value Remarks
Count int 1 Total number of tickets returned in Result key
Result Collection [{}] Tickets returned based on filters
Status string Success/Fail This field provide status
Message string message Success/Fail message

Result Key data Description

Column Column Type Expected/Sample value Remarks
TicketNumber string INC0303863 This field contains ticket number
Summary string testing This field contains summary of ticket
Description string testing This field contains summary of ticket
AssignedGroup string 123456 This field contains assignment group of ticket
StatusCode string 1 This field contains status of ticket
CreationDate string 2019-11-18 06:24:52 This field contains creation date of ticket
LastModifiedDate string 2019-11-18 07:24:52 This field contains date whenever updating happen on ticket
ClosedDate string 2019-11-18 07:24:52 This field contains date whenever ticket gets resolved
sys_id string 2b535ab3dbc988506d7550d3dc96190e This field contains unique number
Col1 string You can use it for any custom value
Col2 string You can use it for any custom value
Col3 string You can use it for any custom value
Col4 string You can use it for any custom value
Col5 string You can use it for any custom value
iAutomate_CreatedDateInGMT string 2020-05-04 05:25:36.350 It returns date in GMT
iAutomate_UpdatedDateInGMT string 2020-05-04 05:25:36.350 It returns date in GMT