URL

GET https://{api-url}/api/v2/tenants/{tenantId}/incidents/search

Sample URLs

https://{api-url}/api/v2/tenants/client_1000/incidents/search?pageNo=1&pageSize=10&isDescendingOrder=true&sortName=ticket.id&include=customFields,statusFlow&queryString=status:New,Open+priority: High+requester:USR0000000129+startCreationDate:2016-07-25T07:12:19 0000+endCreationDate:2016-07-28T07:12:19 0000
https://{api-url}/api/v2/tenants/msp_100/incidents/search?pageNo=1&pageSize=10&isDescendingOrder=true&sortName=ticket.id&include=customFields,statusFlow&queryString=status:New,Open+priority: High+requester:USR0000000129+startCreationDate:2016-07-25T07:12:19 0000+endCreationDate:2016-07-28T07:12:19 0000

Parameters

All parameters are optional:

FieldDefault Value
pageNo={pageNo}1
pageSize={pageSize}100
isDescendingOrder={true/false}true
sortName={field}ticket.id
queryString={queryString}NA
include={fields}NA

NA indicates that the value is not applicable.

Query variables

Query VariableValuesDescription
uniqueIdNAID of the incident.
Example: CHG0000002401
statusNew, Open, Pending, Resolved, Closed, On HoldCurrent status of incident.
Example: Resolved
priorityLow, Normal, High, Urgent, Very LowCurrent priority of incident.
Example: High
subjectNAA short summary incident.
Example: System uptime is critical
assignedToNAUser who has been assigned incident.
Example: USR0000000001
requesterNARequester of the incident.
Example: USR0000000001
startCreationDateNAFilter incidents with creation date. Provide from date.
Example: 2016-07-25T07:12:19 0000(GMT)
endCreationDateNAProvide to date.
Example: 2016-07-28T07:12:19 0000 (GMT)
startUpdationDateNAFilter incidents with updation date. Provide from date.
Example: 2016-08-11T13:50:18 0000(GMT)
endUpdationDateNAProvide to date.
Example: 2016-08-15T10:40:20 0000 (GMT)
hasAlertstrue, falseIncident having alerts.
Example: true
oldStatusNew, Open, Pending, Resolved,On HoldPrevious state of the incident.
Example: Open
oldPriorityLow, Normal, High, Urgent, Very LowPrevious priority of the incident.
Example: High
deviceIdNAUnique ID of the device.
Example: 481af404-33a6-4d61-af77-c483ca6641fa
sourcePORTAL, INTEGRATION, MOBILE, EMAILSource of the incident.
sourcePolicyTypeAUTOINCIDENT, INTEGRATIONSource policy type of the incident.
firstContactFixtrue, falseIncident without assigning to another group.
Example: true
startResponseBreachDateNAFilter incidents with response breach date. Provide from date.
Example: 2016-08-25T08:12:19+0000 (GMT)
endResponseBreachDateNAProvide to date.
Example: 2016-09-28T10:40:20 0000 (GMT)
startResolutionBreachDateNAFilter incidents with resolution breach date. Provide from date.
Example: 2016-08-25T08:12:19 0000 (GMT)
endResolutionBreachDateNAProvide to date.
Example: 2016-09-29T10:40:20 0000 (GMT)
responseBreachtrue, falseResponse to incident beyond the time limit.
Example: false
resolutionBreachtrue, falseIncident fixed within the time limit.
Example: true
assigneeGroupIdsNAID of the group to which the incident is assigned.
Example: 1, 2, 3
minResponseTimeNAMinimum response time incident.
Example: 300 (time in seconds)
maxResponseTimeNAMaximum response time incident.
Example: 600 (time in seconds)
minResolutionTimeNAMinimum resolution time of incident.
Example: 3600 (time in seconds)
maxResolutionTimeNAMaximum resolution time incident.
Example: 7200 (time in seconds)
minReOpensNAMinimum number of times the incident is reopened.
Example: 5
maxReOpensNAMaximum number of times the incident is reopened.
Example: 8
startClosedDateNAFilter incidents with the closed date. Provide from closed date.
Example: 2016-08-12T06:54:59 0000 (GMT)
endClosedDateNAProvide to closed date.
Example: 2016-08-15T06:54:59 0000 (GMT)
startResolvedDateNAFilter incidents with the resolved date. Provide from resolved date.
Example: 2016-08-12T06:49:59 0000 (GMT)
endResolvedDateNAProvide to resolved date.
Example: 2016-08-14T07:49:59 0000 (GMT)
extTicketIdNAExternal ticket ID.

NA indicates that the value is not applicable.

Sample responses

{
	"results": [{
		"id": "INC0000000104",
		"subject": "System uptime is critical  : 0day(s);1hour(s);23minute(s);",
		"description": " System uptime is critical  : 0day(s);1hour(s);23minute(s);\nAuto Stopped Services:\n\nMicrosoft .NET Framework NGEN v4.0.30319_X86\n\nMicrosoft .NET Framework NGEN v4.0.30319_X64\n\nGoogle Update Service (gupdate)\n\nSkype Updater\n\nSoftware Protection\n\nNTRU TSS v1.2.1.37 TCS",
		"status": "Resolved",
		"oldStatus": "Open",
		"priority": "Low",
		"oldPriority": "Low",
		"requester": {
			"loginName": "john.smith",
			"lastName": "Smith",
			"firstName": "John",
			"email": "john.smith@gmail.com"
		},
		"assignedUser": {
			"id": "USR0000000014",
			"loginName": "brocadeLab@organization.com",
			"lastName": "Lab",
			"firstName": "Brocade",
			"email": "brocadeLab@gmail.com"
		},
		"assigneeGroup": {
			"id": 5,
			"name": "Brocade Inc Users",
			"description": "Brocade Partner Users"
		},
		"resources": [
                             {
                       "id": "5c7da798-c479-4d67-aa72-0ac7f7fb74c7",
                       "name": "VMtest",
                       "type": "VMWAREHOST",
                       "metaData": {},
                       "resourceType": "VMWAREHOST",
                       "hostName": "VMtest",
                       "resourceName": "",
                       "aliasName": ""
                            },
                            {
                       "id": "402c0d1a-bb31-4f02-b214-39433d23b922",
                       "name": "CREDtest",
                       "type": "Android",
                       "metaData": {},
                       "resourceType": "Android",
                       "hostName": "CREDtest",
                       "resourceName": "",
                       "aliasName": ""
                           },
                           {
                       "id": "61fec02a-4370-4dfb-be4d-1bb9fe3e05aa",
                       "name": "TestHost",
                       "type": "Desktop",
                       "metaData": {},
                       "resourceType": "Desktop",
                       "hostName": "TestHost",
                       "resourceName": "TestResource",
                       "aliasName": "TestAlias"
                          }
                          ],
		"extTicketId": "000042526342",
		"dueDate": "2016-07-30T13:51:00+0000",
		"cc": "brocade@gmail.com, escalationmails@gmail.com",
		"ticketArisedTime": "",
		"createdUser": {
			"loginName": "john.smith",
			"lastName": "Smith",
			"firstName": "John",
			"email": "john.smith@gmail.com"
		},
		"category": {
			"id": 1,
			"name": "Urgency"
		},
		"alertIds": [100],
		"toEmail": "escalationmails@gmail.com",
		"reOpenCount": 1,
		"createdDate": "2016-07-25T07:12:19+0000",
		"notes": "",
		"serviceRestoreDate": "2016-08-17T13:51:00+0000",
		"resolutionSummary": "",
		"client": {
			"id": 8,
			"uniqueId": "client_8",
			"name": "Brocade Lab",
			"activated": true
		},
		"subCategory": {
			"id": 4,
			"name": "P1"
		},
		"sourcePolicyType": "AUTOINCIDENT",
		"sourcePolicyTypeId": "21",
		"updatedDate": "2016-08-11T13:50:18+0000",
		"priorityUpdatedBy": {
			"loginName": "john.smith",
			"lastName": "Smith",
			"firstName": "John",
			"email": "john.smith@gmail.com"
		},
		"priorityUpdatedDate": "2016-07-25T07:12:19+0000",
		"statusUpdatedBy": {
			"loginName": "superadmin",
			"lastName": "Admin",
			"firstName": "SA",
			"email": "escalationmails@gmail.com"
		},
		"statusUpdatedDate": "2016-08-11T13:50:18+0000",
		"resolvedDate": "2016-08-11T13:50:18+0000",
		"slaDetails": {
			"slaPolicy": {
				"id": 6,
				"name": "P4_INCIDENT_SLA",
				"timezone": {
					"id": "19",
					"name": "Asia/Calcutta",
					"label": "GMT +05:30 India",
					"code": "IST"
				},
				"businessSchedule": {
					"id": 0,
					"shiftType": 0,
					"startTime": "10:00:00",
					"endTime": "20:00:00",
					"sunday": false,
					"monday": true,
					"tuesday": true,
					"wednesday": true,
					"thursday": true,
					"friday": true,
					"saturday": false
				}
			},
			"resolutionTime": 491861,
			"responseTime": 491834,
			"responseBreach": false,
			"resolutionBreach": false,
			"responseBreachDate": "2016-07-25T08:12:19+0000",
			"resolutionBreachDate": "2016-07-25T09:12:19+0000"
		},
		"policy": {
			"id": 21,
			"name": "All Alert Auto Incidents",
			"policyType": "AUTO_INCIDENT_TO_ALERT",
			"createdDate": "2016-07-24T09:02:38+0000",
			"updatedDate": "2016-07-25T16:50:49+0000",
			"executionOrder": 2,
			"active": true
		},
		"source": "PORTAL",
		"sourceEntityType": "ALERT",
		"sourceEntityTypeId": "100",
		"businessImpact": {
			"id": 2,
			"name": "Impact 2",
			"description": "MSP level impact"
		},
		"urgency": {
			"id": 1,
			"name": "Urgency 1",
			"description": "Client level urgency 1"
		}
	}, {
		"id": "INC0000000094",
		"subject": "System uptime is critical  : 0day(s);4hour(s);58minute(s);",
		"description": " System uptime is critical  : 0day(s);4hour(s);58minute(s);\nAuto Stopped Services:\n\nMicrosoft .NET Framework NGEN v4.0.30319_X86\n\nMicrosoft .NET Framework NGEN v4.0.30319_X64",
		"status": "Closed",
		"oldStatus": "Open",
		"priority": "Normal",
		"oldPriority": "Normal",
		"requester": {
			"loginName": "john.smith",
			"lastName": "Smith",
			"firstName": "John",
			"email": "john.smith@gmail.com"
		},
		"assignedUser": {
			"id": "USR0000000014",
			"loginName": "brocadeLab@organization.com",
			"lastName": "Lab",
			"firstName": "Brocade",
			"email": "brocadeLab@gmail.com"
		},
		"assigneeGroup": {
			"id": 5,
			"name": "Brocade Inc Users",
			"description": "Brocade Partner Users"
		},
		"resources": [{
			"id": "43d49023-4c47-4dbf-a59b-9c40610e1ab8",
			"name": "VTHLPT009",
			"type": "DEVICE"
		}],
		"extTicketId": "000042526342",
		"dueDate": "2016-08-23T13:56:00+0000",
		"cc": "",
		"ticketArisedTime": "",
		"createdUser": {
			"loginName": "john.smith",
			"lastName": "Smith",
			"firstName": "John",
			"email": "john.smith@gmail.com"
		},
		"reason": "Working fine, Hence closing incident",
		"category": {
			"id": 1,
			"name": "Urgency"
		},
		"alertIds": [94],
		"toEmail": "escalation@gmail.com",
		"reOpenCount": 0,
		"createdDate": "2016-07-24T10:24:26+0000",
		"notes": "",
		"serviceRestoreDate": "2016-08-23T13:56:00+0000",
		"resolutionSummary": "",
		"client": {
			"id": 8,
			"uniqueId": "client_8",
			"name": "Brocade Lab",
			"activated": true
		},
		"subCategory": {
			"id": 4,
			"name": "P1"
		},
		"sourcePolicyType": "AUTOINCIDENT",
		"sourcePolicyTypeId": "21",
		"updatedDate": "2016-08-11T13:57:35+0000",
		"priorityUpdatedBy": {
			"loginName": "john.smith",
			"lastName": "Smith",
			"firstName": "John",
			"email": "john.smith@gmail.com"
		},
		"priorityUpdatedDate": "2016-07-24T10:24:26+0000",
		"statusUpdatedBy": {
			"loginName": "superadmin",
			"lastName": "Admin",
			"firstName": "SA",
			"email": "escalationmails@gmail.com"
		},
		"statusUpdatedDate": "2016-08-11T13:57:35+0000",
		"closedDate": "2016-08-11T13:57:35+0000",
		"slaDetails": {
			"slaPolicy": {
				"id": 4,
				"name": "P2_INCIDENT_SLA",
				"timezone": {
					"id": "19",
					"name": "Asia/Calcutta",
					"label": "GMT +05:30 India",
					"code": "IST"
				},
				"businessSchedule": {
					"id": 0,
					"shiftType": 0,
					"startTime": "10:00:00",
					"endTime": "20:00:00",
					"sunday": false,
					"monday": true,
					"tuesday": true,
					"wednesday": true,
					"thursday": true,
					"friday": true,
					"saturday": false
				}
			},
			"resolutionTime": 466055,
			"responseTime": 466056,
			"responseBreach": false,
			"resolutionBreach": false,
			"responseBreachDate": "2016-07-25T10:54:26+0000",
			"resolutionBreachDate": "2016-07-25T11:54:26+0000"
		},
		"policy": {
			"id": 21,
			"name": "All Alert Auto Incidents",
			"policyType": "AUTO_INCIDENT_TO_ALERT",
			"createdDate": "2016-07-24T09:02:38+0000",
			"updatedDate": "2016-07-25T16:50:49+0000",
			"executionOrder": 2,
			"active": true
		},
		"source": "PORTAL",
		"sourceEntityType": "ALERT",
		"sourceEntityTypeId": "94"
	}],
	"totalResults": 2,
	"orderBy": "ticket.id",
	"pageNo": 1,
	"pageSize": 10,
	"totalPages": 1,
	"nextPage": false,
	"previousPageNo": 0,
	"descendingOrder": true
}

If the query parameter consists of parameter include=customFields, statusFlow then each response entity returns the following information.

A sample response with include=customFields:

"customFields": [{
		"id": "UDF0000003808",
		"classCode": "INCIDENT",
		"displayLabel": "text field",
		"name": "text_field_3808",
		"fieldType": "TYPE_TEXT",
		"mandatory": false,
		"editable": true,
		"description": "All partners",
		"value": "available",
		"defaultValue": ""
	}, {
		"id": "UDF0000003810",
		"classCode": "INCIDENT",
		"displayLabel": "numeric",
		"name": "numeric_3810",
		"fieldType": "TYPE_NUMBER",
		"mandatory": false,
		"editable": true,
		"description": "Testing numeric",
		"value": "120",
		"defaultValue": ""
	}, {
		"id": "UDF0000003790",
		"classCode": "INCIDENT",
		"displayLabel": "drop-down-api-lab",
		"name": "drop_down_api_lab_3790",
		"fieldType": "TYPE_DROPDOWN",
		"mandatory": false,
		"editable": true,
		"description": "Test case",
		"options": [{
			"label": "first",
			"value": "1"
		}, {
			"label": "second",
			"value": "2"
		}],
		"value": "1",
		"defaultValue": "",
		"selectedOption": {
			"label": "first",
			"value": "1"
		}
	}, {
		"id": "UDF0000003791",
		"classCode": "INCIDENT",
		"displayLabel": "text-api-lab",
		"name": "text_api_lab_3791",
		"fieldType": "TYPE_TEXT",
		"mandatory": false,
		"editable": true,
		"description": "Test case for text field",
		"value": "request custom field - text-updated",
		"defaultValue": "Test Text"
	}, {
		"id": "UDF0000003792",
		"classCode": "INCIDENT",
		"displayLabel": "multi line text-api-lab",
		"name": "multi_line_text_api_lab_3792",
		"fieldType": "TYPE_TEXTAREA",
		"mandatory": false,
		"editable": true,
		"description": "Test case for multi line text",
		"value": "text",
		"defaultValue": "multi \nline \ntext"
	}, {
		"id": "UDF0000003793",
		"classCode": "INCIDENT",
		"displayLabel": "Numeric-api-lab",
		"name": "numeric_api_lab_3793",
		"fieldType": "TYPE_NUMBER",
		"mandatory": false,
		"editable": true,
		"description": "Numeric test case",
		"value": "1",
		"defaultValue": "1"
	}, {
		"id": "UDF0000003794",
		"classCode": "INCIDENT",
		"displayLabel": "checkbox-api-lab",
		"name": "checkbox_api_lab_3794",
		"fieldType": "TYPE_CHECKBOX",
		"mandatory": false,
		"editable": true,
		"description": "Test case for check box",
		"options": [{
			"label": "yes",
			"value": "1"
		}],
		"value": "1",
		"defaultValue": "0",
		"selectedOption": {
			"label": "yes",
			"value": "1"
		}
	}, {
		"id": "UDF0000003795",
		"classCode": "INCIDENT",
		"displayLabel": "Date-ap-lab",
		"name": "date_ap_lab_3795",
		"fieldType": "TYPE_DATE",
		"mandatory": false,
		"editable": true,
		"description": "Test case for date field",
		"value": "2016-02-26T00:00:00+0000",
		"defaultValue": "2016-02-26T00:00:00+0000"
	}, {
		"id": "UDF0000003796",
		"classCode": "INCIDENT",
		"displayLabel": "dateTime-api-lab",
		"name": "datetime_api_lab_3796",
		"fieldType": "TYPE_DATETIME",
		"mandatory": false,
		"editable": true,
		"description": "Test case for Date and time",
		"value": "2016-02-26T12:13:00+0000",
		"defaultValue": "2016-02-26T12:13:00+0000"
}]

A sample response with include=statusFlow:

"statusFlow": [{
		"status": "New",
		"timeSpent": 1492634,
		"createdDate": "2016-07-24T12:42:19+0000",
		"updatedBy": {
			"loginName": "john.smith",
			"lastName": "Smith",
			"firstName": "John",
			"email": "john.smith@gmail.com"
		}
	}, {
		"status": "Resolved",
		"reason": "Resolving as fixed",
		"notes": "resolution summary",
		"timeSpent": 18,
		"createdDate": "2016-07-24T19:19:33+0000",
		"updatedBy": {
			"loginName": "john.smith",
			"lastName": "smith",
			"firstName": "john",
			"email": "john@gmail.com"
		}
	}, {
		"status": "Open",
		"timeSpent": 27,
		"reason": "Re-opening as per comments",
		"createdDate": "2016-07-25T09:19:51+0000",
		"updatedBy": {
			"loginName": "john.smith",
			"lastName": "smith",
			"firstName": "john",
			"email": "john@gmail.com"
		}
	}, {
		"status": "Resolved",
		"reason": "Problem identified and fixed",
		"notes": "resolution summary",
		"createdDate": "2016-07-25T10:50:18+0000",
		"updatedBy": {
			"id": "USR0000000018",
			"loginName": "superadmin",
			"lastName": "Admin",
			"firstName": "SP",
			"email": "sample@gmail.com"
		}
}]