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:
Field | Default 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.
Note
The request parameter include is required in order to retrieve the following information in the response:
- Custom fields
- Status flow
Example: include=customFields, statusFlow
Query variables
Query Variable | Values | Description |
---|---|---|
uniqueId | NA | ID of the incident. Example: CHG0000002401 |
status | New, Open, Pending, Resolved, Closed, On Hold | Current status of incident. Example: Resolved |
priority | Low, Normal, High, Urgent, Very Low | Current priority of incident. Example: High |
subject | NA | A short summary incident. Example: System uptime is critical |
assignedTo | NA | User who has been assigned incident. Example: USR0000000001 |
requester | NA | Requester of the incident. Example: USR0000000001 |
startCreationDate | NA | Filter incidents with creation date. Provide from date. Example: 2016-07-25T07:12:19 0000(GMT) |
endCreationDate | NA | Provide to date. Example: 2016-07-28T07:12:19 0000 (GMT) |
startUpdationDate | NA | Filter incidents with updation date. Provide from date. Example: 2016-08-11T13:50:18 0000(GMT) |
endUpdationDate | NA | Provide to date. Example: 2016-08-15T10:40:20 0000 (GMT) |
hasAlerts | true, false | Incident having alerts. Example: true |
oldStatus | New, Open, Pending, Resolved,On Hold | Previous state of the incident. Example: Open |
oldPriority | Low, Normal, High, Urgent, Very Low | Previous priority of the incident. Example: High |
deviceId | NA | Unique ID of the device. Example: 481af404-33a6-4d61-af77-c483ca6641fa |
source | PORTAL, INTEGRATION, MOBILE, EMAIL | Source of the incident. |
sourcePolicyType | AUTOINCIDENT, INTEGRATION | Source policy type of the incident. |
firstContactFix | true, false | Incident without assigning to another group. Example: true |
startResponseBreachDate | NA | Filter incidents with response breach date. Provide from date. Example: 2016-08-25T08:12:19+0000 (GMT) |
endResponseBreachDate | NA | Provide to date. Example: 2016-09-28T10:40:20 0000 (GMT) |
startResolutionBreachDate | NA | Filter incidents with resolution breach date. Provide from date. Example: 2016-08-25T08:12:19 0000 (GMT) |
endResolutionBreachDate | NA | Provide to date. Example: 2016-09-29T10:40:20 0000 (GMT) |
responseBreach | true, false | Response to incident beyond the time limit. Example: false |
resolutionBreach | true, false | Incident fixed within the time limit. Example: true |
assigneeGroupIds | NA | ID of the group to which the incident is assigned. Example: 1, 2, 3 |
minResponseTime | NA | Minimum response time incident. Example: 300 (time in seconds) |
maxResponseTime | NA | Maximum response time incident. Example: 600 (time in seconds) |
minResolutionTime | NA | Minimum resolution time of incident. Example: 3600 (time in seconds) |
maxResolutionTime | NA | Maximum resolution time incident. Example: 7200 (time in seconds) |
minReOpens | NA | Minimum number of times the incident is reopened. Example: 5 |
maxReOpens | NA | Maximum number of times the incident is reopened. Example: 8 |
startClosedDate | NA | Filter incidents with the closed date. Provide from closed date. Example: 2016-08-12T06:54:59 0000 (GMT) |
endClosedDate | NA | Provide to closed date. Example: 2016-08-15T06:54:59 0000 (GMT) |
startResolvedDate | NA | Filter incidents with the resolved date. Provide from resolved date. Example: 2016-08-12T06:49:59 0000 (GMT) |
endResolvedDate | NA | Provide to resolved date. Example: 2016-08-14T07:49:59 0000 (GMT) |
extTicketId | NA | External ticket ID. |
NA indicates that the value is not applicable.
Notes
To view tickets created within a given date range, provide both startCreationDate and endCreationDate. Otherwise, the tickets created in the last month would be returned.
There are special characters that can be used in a query string:
- (+) represents the next field and must be URL-encoded.
- (:) represents equals. An example is
key : value
. - Space characters must be URL-encoded.
- Date format must be yyyy-MM-ddTHH:mm:ssZ (GMT).
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"
}
}]