URL
GET https://{api-url}/api/v2/tenants/{tenantId}/problems/search
Sample URLs
https://{api-url}/api/v2/tenants/client_1000/problems/search?pageNo=1&pageSize=10&isDescendingOrder=true&sortName=ticket.id&include=customFields,statusFlow&queryString=status:New,Open+priority: High+requester:USR0000000129+startCreationDate:2016-08-12T07:31:55 0000+endCreationDate:2016-08-15T07:12:19 0000
https://{api-url}/api/v2/tenants/msp_100/problems/search?pageNo=1&pageSize=10&isDescendingOrder=true&sortName=ticket.id&include=customFields,statusFlow&queryString=status:New,Open+priority: High+requester:USR0000000129+startCreationDate:2016-08-12T07:31:55 0000+endCreationDate:2016-08-15T07: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 problem. Example: CHG0000002401 |
status | New, Open, Pending, Resolved, Closed, On Hold | Current status of problem. Example: Resolved |
priority | Low, Normal, High, Urgent, Very Low | Current priority of the problem. Example: High |
subject | NA | A short summary of problem. Example: System uptime is critical |
assignedTo | NA | User who has been assigned the problem. Example: USR0000000001 |
requester | NA | Requester of the problem. Example: USR0000000001 |
startCreationDate | NA | Filter problems 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 problems 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) |
oldStatus | New, Open, Pending, Resolved,On Hold | Previous state of the problem. Example: Open |
oldPriority | Low, Normal, High, Urgent, Very Low | Previous priority of problem. Example: High |
deviceId | NA | Unique ID of the device. Example: 481af404-33a6-4d61-af77-c483ca6641fa |
source | PORTAL, INTEGRATION, MOBILE, EMAIL | Source of the problem. |
sourcePolicyType | AUTOINCIDENT, INTEGRATION | Source policy type of the problem. |
firstContactFix | true, false | Problem fixed without assigning to another group. Example: true |
assigneeGroupIds | NA | Assigned user group who would be responsible to work on the problem. |
minResponseTime | NA | Minimum response time of problem. Example: 300 (time in seconds) |
maxResponseTime | NA | Maximum response time of problem. Example: 600 (time in seconds) |
minResolutionTime | NA | Minimum resolution time of problem. Example: 3600 (time in seconds) |
maxResolutionTime | NA | Maximum resolution time of problem. Example: 7200 (time in seconds) |
minReOpens | NA | Minimum number of times problem is reopened. Example: 5 |
maxReOpens | NA | Maximum number of times problem is reopened. Example: 8 |
startClosedDate | NA | Filter problem 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 problem 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": "PRB0000000250",
"subject": "Windows Services should be upgraded",
"description": "Windows versions should be updated. Our support systems needs to be updated inorder to sync with the latest technologies.",
"status": "Closed",
"oldStatus": "On Hold",
"priority": "Normal",
"oldPriority": "High",
"requester": {
"id": "USR0000000011",
"loginName": "brocadeInc@organization.com",
"lastName": "Inc Admin",
"firstName": "Brocade",
"email": "brocade@gmail.com"
},
"assignedUser": {
"id": "USR0000000011",
"loginName": "brocadeInc@organization.com",
"lastName": "Inc Admin",
"firstName": "Brocade",
"email": "brocade@gmail.com"
},
"assigneeGroup": {
"id": 5,
"name": "Brocade Inc Users",
"description": "Brocade Partner Users"
},
"resources": [{
"id": "481af404-33a6-4d61-af77-c483ca6641fa",
"name": "VTHLPT1000",
"type": "DEVICE"
}, {
"id": "SGP-7adf3762-f310-4c14-9ecd-443eb7c6c208",
"name": "VTH-SERVICES",
"type": "SERVICE"
}, {
"id": "DGP-8d44a504-fd4b-4a78-ba34-2dfdf3ffb85e",
"name": "VTH-ADMIN-DEVS",
"type": "DEVICE_GROUP"
}],
"extTicketId": "BMCXC00907",
"cc": "brocade@gmail.com, brocadeLab@gmail.com",
"ticketArisedTime": "",
"createdUser": {
"loginName": "superadmin",
"lastName": "Admin",
"firstName": "SA",
"email": "escalationmails@gmail.com"
},
"category": {
"id": 10,
"name": "Critical Level"
},
"reason": "Cloded Reason",
"alertIds": [],
"reOpenCount": 1,
"createdDate": "2016-08-12T07:31:55+0000",
"client": {
"id": 8,
"uniqueId": "client_8",
"name": "Brocade Lab",
"activated": true
},
"subCategory": {
"id": 12,
"name": "Medium"
},
"updatedDate": "2016-08-12T07:33:28+0000",
"priorityUpdatedBy": {
"loginName": "superadmin",
"lastName": "Admin",
"firstName": "SA",
"email": "escalationmails@gmail.com"
},
"priorityUpdatedDate": "2016-08-12T07:32:35+0000",
"statusUpdatedBy": {
"loginName": "superadmin",
"lastName": "Admin",
"firstName": "SA",
"email": "escalationmails@gmail.com"
},
"statusUpdatedDate": "2016-08-12T07:33:28+0000",
"closedDate": "2016-08-12T07:33:28+0000",
"slaDetails": {
"resolutionTime": 50,
"responseTime": 44,
"responseBreach": false,
"resolutionBreach": false,
"responseBreachDate": "",
"resolutionBreachDate": ""
},
"source": "PORTAL",
"rootCause": "Windows New technologies is not supported for old versions",
"workaround": "Simply not able migrate for new tech's",
"application": "Windows latest"
}, {
"id": "PRB0000000249",
"subject": "LAN cables are not working properly",
"description": "LAN Cables are not working properly in V-SJ Branch.",
"status": "Resolved",
"oldStatus": "Open",
"priority": "Normal",
"oldPriority": "Normal",
"requester": {
"id": "USR0000000014",
"loginName": "brocadeLab@organization.com",
"lastName": "Lab",
"firstName": "Brocade",
"email": "brocadeLab@gmail.com"
},
"assignedUser": {
"id": "USR0000000014",
"loginName": "brocadeLab@organization.com",
"lastName": "Lab",
"firstName": "Brocade",
"email": "brocadeLab@gmail.com"
},
"assigneeGroup": {
"id": 7,
"name": "Brocade Lab Users",
"description": "All Brocade Lab Users group"
},
"resources": [{
"id": "a17d1896-d18a-4d3e-ae6e-e00465770119",
"name": "SVR-DEMO",
"type": "DEVICE"
}, {
"id": "ad0a218d-7512-435c-9b58-614470ee8658",
"name": "WORK-PC",
"type": "DEVICE"
}],
"extTicketId": "BMCXC00907",
"cc": "brocade@gmail.com, brocadeLab@gmail.com",
"ticketArisedTime": "",
"createdUser": {
"loginName": "superadmin",
"lastName": "Admin",
"firstName": "SA",
"email": "escalationmails@gmail.com"
},
"category": {
"id": 10,
"name": "Critical Level"
},
"reason": "Resolved Reason",
"alertIds": [],
"reOpenCount": 2,
"createdDate": "2016-08-12T07:21:45+0000",
"client": {
"id": 8,
"uniqueId": "client_8",
"name": "Brocade Lab",
"activated": true
},
"subCategory": {
"id": 11,
"name": "High"
},
"updatedDate": "2016-08-12T07:24:54+0000",
"priorityUpdatedBy": {
"id": "USR0000000014",
"loginName": "brocadeLab@oragnization.com",
"lastName": "Lab",
"firstName": "Brocade",
"email": "brocadeLab@gmail.com"
},
"priorityUpdatedDate": "2016-08-12T07:21:45+0000",
"statusUpdatedBy": {
"loginName": "superadmin",
"lastName": "Admin",
"firstName": "SA",
"email": "escalationmails@gmail.com"
},
"statusUpdatedDate": "2016-08-12T07:24:54+0000",
"resolvedDate": "2016-08-12T07:24:54+0000",
"slaDetails": {
"resolutionTime": 136,
"responseTime": 133,
"responseBreach": false,
"resolutionBreach": false,
"responseBreachDate": "",
"resolutionBreachDate": ""
},
"source": "PORTAL",
"rootCause": "LAN cables",
"workaround": "Temporarily working with Wi-Fi Services",
"application": "SVN Check ins"
}],
"totalResults": 20,
"orderBy": "ticket.id",
"pageNo": 1,
"pageSize": 2,
"totalPages": 10,
"nextPage": true,
"nextPageNo": 2,
"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": "PROBLEM",
"displayLabel": "text field",
"name": "text_field_3808",
"fieldType": "TYPE_TEXT",
"mandatory": false,
"editable": true,
"description": "All partners",
"value": "Available",
"defaultValue": ""
}, {
"id": "UDF0000003810",
"classCode": "PROBLEM",
"displayLabel": "numeric",
"name": "numeric_3810",
"fieldType": "TYPE_NUMBER",
"mandatory": false,
"editable": true,
"description": "Testing numeric",
"value": "120",
"defaultValue": ""
}, {
"id": "UDF0000003790",
"classCode": "PROBLEM",
"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": "PROBLEM",
"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": "PROBLEM",
"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": "PROBLEM",
"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": "PROBLEM",
"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": "PROBLEM",
"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": "PROBLEM",
"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-08-12T12: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-08-13T19:19:33+0000",
"updatedBy": {
"loginName": "john.smith",
"lastName": "smith",
"firstName": "john",
"email": "sample@gmail.com",
"phoneNumber": "998-559-1234"
}
}, {
"status": "Open",
"reason": "Re-Opening as not fixed",
"timeSpent": 27,
"createdDate": "2016-08-14T19:19:51+0000",
"updatedBy": {
"loginName": "john.smith",
"lastName": "smith",
"firstName": "john",
"email": "sample@gmail.com",
"phoneNumber": "998-559-2345"
}
}, {
"status": "Resolved",
"reason": "Validated and Resolving as fixed",
"notes": "resolution summary",
"createdDate": "2016-08-15T10:04:50+0000",
"updatedBy": {
"id": "USR0000000018",
"loginName": "superadmin",
"lastName": "Admin",
"firstName": "SP",
"email": "sample@gmail.com"
}
}]