Search tasks

This endpoint is used to search for the tasks.

Leave Feedback

URL

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

Sample URLs

https://{api-url}/api/v2/tenants/client_1000/tasks/search?pageNo=1&pageSize=10&isDescendingOrder=true&sortName=ticket.id&include=customFields,statusFlow&queryString=status:New,Open+priority: High+requester:USR0000000129+startCreationDate:2016-08-12T08:18:20 0000+endCreationDate:2016-08-15T07:12:19 0000
https://{api-url}/api/v2/tenants/msp_100/tasks/search?pageNo=1&pageSize=10&isDescendingOrder=true&sortName=ticket.id&include=customFields,statusFlow&queryString=status:New,Open+priority: High+requester:USR0000000129+startCreationDate:2016-08-12T08:18:20 0000+endCreationDate:2016-08-15T07: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 VariablesValuesDescription
uniqueIdNAID of task.
Example: TASK0000001045
statusNew, Open, Pending, Resolved, Closed, On HoldCurrent status of task.
Example: Closed, Resolved
priorityLow, Normal, High, Urgent, Very LowCurrent priority of task.
Example: High, Urgent
subjectNAA short summary of task.
Example: Enhancement in existing functionalities
assignedToNAUser who has been assigned task.
Example: USR0000000001
requesterNAUser who requests the task.
Example: USR0000000001
startCreationDateNAFilter the tasks with creation date. Provide from date.
Example: 2016-08-12T08:18:20 0000 (GMT)
endCreationDateNAProvide to date.
Example: 2016-08-15T07:12:19 0000 (GMT)
startUpdationDateNAFilter the tasks with updation date. Provide from date.
Example: 2016-08-12T08:19:01 0000 (GMT)
endUpdationDateNAProvide to date.
Example: 2016-08-15T10:40:20 0000 (GMT)
oldStatusNew, Open, Pending, Resolved, On HoldPrevious status of task.
Example: Resolved
oldPriorityLow, Normal, High, Urgent, Very LowPrevious priority of task.
Example: Urgent
deviceIdNAUnique ID of the device.
Example: 481af404-33a6-4d61-af77-c483ca6641fa
sourcePORTAL, INTEGRATION, MOBILE, EMAILSource of the task.
sourcePolicyTypeAUTOINCIDENT, INTEGRATIONSource policy type of task.
firstContactFixtrue, falseProblem fixed without assigning to another group.
Example: true
assigneeGroupIdsNAID of the group to which the problem is assigned.
Example: 1, 2, 3
minResponseTimeNAMinimum response time of task.
Example: 300 (Time in seconds)
maxResponseTimeNAMaximum response time of task.
Example: 600 (Time in seconds)
minResolutionTimeNAMinimum resolution time of task.
Example: 3600 (Time in seconds)
maxResolutionTimeNAMaximum resolution time of task.
Example: 7200 (Time in seconds)
minReOpensNAMinimum number of times tasks is reopened.
Example: 5
maxReOpensNAMaximum number of times tasks is reopened.
Example: 8
startClosedDateNAFilter the tasks with the closed date.
Example: 2016-08-16T06:54:59 0000 (GMT)
endClosedDateNAProvide to closed date.
Example: 2016-08-18T06:54:59 0000 (GMT)
startResolvedDateNAFilter the tasks with the resolved date. Provide from resolved date.
Example: 2016-08-16T06:49:59 0000 (GMT)
endResolvedDateNAProvide to resolved date.
Example: 2016-08-18T07:49:59 0000 (GMT)
extTicketIdNAExternal ticket ID.

Status code

200 OK

Sample response

{
	"results": [{
			"id": "TASK0000000252",
			"subject": "Enhancement in existing functionalities",
			"description": "Existing functionalities are more error prone, and needs to be upgraded.",
			"status": "Closed",
			"oldStatus": "New",
			"priority": "Urgent",
			"oldPriority": "Urgent",
			"requester": {
				"id": "USR0000000011",
				"loginName": "brocadeInc@organization.com",
				"lastName": "Inc Admin",
				"firstName": "Brocade",
				"email": "brocade@gmail.com"
			},
			"assignedUser": {
				"id": "USR0000000013",
				"loginName": "brocadePAdmin@gmail.com",
				"lastName": "Inc PAdmin",
				"firstName": "Brocade",
				"email": "brocadePAdmin@gmail.com"
			},
			"assigneeGroup": {
				"id": 6,
				"name": "Brocade Inc Escalation Users",
				"description": "Brocade Inc Escalation 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": "000042526342",
			"cc": "brocadeLab@gmail.com, escalationmails@gmail.com",
			"ticketArisedTime": "",
			"createdUser": {
				"loginName": "superadmin",
				"lastName": "Admin",
				"firstName": "SA",
				"email": "escalationmails@gmail.com"
			},
			"reason": "Close Task",
			"alertIds": [],
			"reOpenCount": 0,
			"createdDate": "2016-08-15T08:18:20+0000",
			"client": {
				"id": 8,
				"uniqueId": "client_8",
				"name": "Brocade Lab",
				"activated": true
			},
			"updatedDate": "2016-08-12T08:19:01+0000",
			"priorityUpdatedBy": {
				"id": "USR0000000011",
				"loginName": "brocadeInc@organization.com",
				"lastName": "Inc Admin",
				"firstName": "Brocade",
				"email": "brocade@gmail.com"
			},
			"priorityUpdatedDate": "2016-08-12T08:18:20+0000",
			"statusUpdatedBy": {
				"loginName": "superadmin",
				"lastName": "Admin",
				"firstName": "SA",
				"email": "escalationmails@gmail.com"
			},
			"statusUpdatedDate": "2016-08-12T08:19:01+0000",
			"closedDate": "2016-08-12T08:19:01+0000",
			"slaDetails": {
				"resolutionTime": 41,
				"responseTime": 40,
				"responseBreach": false,
				"resolutionBreach": false,
				"responseBreachDate": "",
				"resolutionBreachDate": ""
			},
			"source": "PORTAL",
			"startDate": "2016-08-17T11:30:00+0000",
			"endDate": "2016-08-31T04:05:00+0000",
			"estimatedHours": 30,
			"timeSpent": 0
		},
		{
			"id": "TASK0000000251",
			"subject": "Add Support for Partner level alert escalation policies",
			"description": "Escalation policies enhancement",
			"status": "On Hold",
			"oldStatus": "Open",
			"priority": "Urgent",
			"oldPriority": "Normal",
			"requester": {
				"id": "USR0000000013",
				"loginName": "brocadePAdmin@gmail.com",
				"lastName": "Inc PAdmin",
				"firstName": "Brocade",
				"email": "brocadePAdmin@gmail.com"
			},
			"assignedUser": {
				"id": "USR0000000013",
				"loginName": "brocadePAdmin@gmail.com",
				"lastName": "Inc PAdmin",
				"firstName": "Brocade",
				"email": "brocadePAdmin@gmail.com"
			},
			"assigneeGroup": {
				"id": 5,
				"name": "Brocade Inc Users",
				"description": "Brocade Partner Users"
			},
			"resources": [{
					"id": "a17d1896-d18a-4d3e-ae6e-e00465770119",
					"name": "SVR-DEMO",
					"type": "DEVICE"
				},
				{
					"id": "b1483cfe-5f2e-46d5-8aaa-c294f90ba271",
					"name": "VMSCAN-PC",
					"type": "DEVICE"
				}
			],
			"extTicketId": "000042526342",
			"cc": "brocade@gmail.com, escalationmails@gmail.com",
			"ticketArisedTime": "",
			"createdUser": {
				"loginName": "superadmin",
				"lastName": "Admin",
				"firstName": "SA",
				"email": "escalationmails@gmail.com"
			},
			"reason": "On Hold task",
			"alertIds": [],
			"reOpenCount": 1,
			"createdDate": "2016-08-14T08:14:34+0000",
			"suspendEndDate": "2016-08-24T08:16:00+0000",
			"client": {
				"id": 8,
				"uniqueId": "client_8",
				"name": "Brocade Lab",
				"activated": true
			},
			"updatedDate": "2016-08-12T08:16:25+0000",
			"priorityUpdatedBy": {
				"loginName": "superadmin",
				"lastName": "Admin",
				"firstName": "SA",
				"email": "escalationmails@gmail.com"
			},
			"priorityUpdatedDate": "2016-08-12T08:15:17+0000",
			"statusUpdatedBy": {
				"loginName": "superadmin",
				"lastName": "Admin",
				"firstName": "SA",
				"email": "escalationmails@gmail.com"
			},
			"statusUpdatedDate": "2016-08-12T08:16:25+0000",
			"slaDetails": {
				"resolutionTime": 61,
				"responseTime": 60,
				"responseBreach": false,
				"resolutionBreach": false,
				"responseBreachDate": "",
				"resolutionBreachDate": ""
			},
			"source": "PORTAL",
			"startDate": "2016-08-12T18:30:00+0000",
			"endDate": "2016-08-30T18:56:00+0000",
			"estimatedHours": 30,
			"timeSpent": 0
		},
		{
			"id": "TASK0000000244",
			"subject": "Move Client Users to Partner Users",
			"description": "Required to move client users to partner based on the filter criteria provided  : \nfilter criteria  : name not contians client",
			"status": "Resolved",
			"oldStatus": "Open",
			"priority": "Normal",
			"oldPriority": "Low",
			"requester": {
				"loginName": "superadmin",
				"lastName": "Admin",
				"firstName": "SA",
				"email": "escalationmails@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": "000042526342",
			"cc": "escalationmails@gmail.com, brocade@gmail.com",
			"ticketArisedTime": "",
			"createdUser": {
				"loginName": "superadmin",
				"lastName": "Admin",
				"firstName": "SA",
				"email": "escalationmails@gmail.com"
			},
			"reason": "Resolve Task",
			"alertIds": [],
			"reOpenCount": 1,
			"createdDate": "2016-08-12T11:22:28+0000",
			"client": {
				"id": 8,
				"uniqueId": "client_8",
				"name": "Brocade Lab",
				"activated": true
			},
			"updatedDate": "2016-08-12T08:10:17+0000",
			"priorityUpdatedBy": {
				"loginName": "superadmin",
				"lastName": "Admin",
				"firstName": "SA",
				"email": "escalationmails@gmail.com"
			},
			"priorityUpdatedDate": "2016-08-12T08:06:18+0000",
			"statusUpdatedBy": {
				"loginName": "superadmin",
				"lastName": "Admin",
				"firstName": "SA",
				"email": "escalationmails@gmail.com"
			},
			"statusUpdatedDate": "2016-08-12T08:08:38+0000",
			"resolvedDate": "2016-08-12T08:08:38+0000",
			"slaDetails": {
				"resolutionTime": 1197960,
				"responseTime": 1197943,
				"responseBreach": false,
				"resolutionBreach": false,
				"responseBreachDate": "",
				"resolutionBreachDate": ""
			},
			"source": "PORTAL",
			"startDate": "2016-07-13T04:43:00+0000",
			"endDate": "2016-08-31T04:04:00+0000",
			"estimatedHours": 10,
			"timeSpent": 40,
			"project": {
				"id": 3,
				"name": "ITSM Enhancements"
			}
		}
	],
	"totalResults": 3,
	"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 may also have following information.

For include=customFields:

{
	"customFields": [{
			"id": "UDF0000003808",
			"classCode": "TASK",
			"displayLabel": "text field",
			"name": "text_field_3808",
			"fieldType": "TYPE_TEXT",
			"mandatory": false,
			"editable": true,
			"description": "all partners",
			"value": "available",
			"defaultValue": ""
		},
		{
			"id": "UDF0000003810",
			"classCode": "TASK",
			"displayLabel": "numeric",
			"name": "numeric_3810",
			"fieldType": "TYPE_NUMBER",
			"mandatory": false,
			"editable": true,
			"description": "testing numeric",
			"value": "120",
			"defaultValue": ""
		},
		{
			"id": "UDF0000003790",
			"classCode": "TASK",
			"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": "TASK",
			"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": "TASK",
			"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": "TASK",
			"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": "TASK",
			"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": "TASK",
			"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": "TASK",
			"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"
		}
	]
}

For include=statusFlow:

{
	"customFields": [{
			"id": "UDF0000003808",
			"classCode": "TASK",
			"displayLabel": "text field",
			"name": "text_field_3808",
			"fieldType": "TYPE_TEXT",
			"mandatory": false,
			"editable": true,
			"description": "all partners",
			"value": "available",
			"defaultValue": ""
		},
		{
			"id": "UDF0000003810",
			"classCode": "TASK",
			"displayLabel": "numeric",
			"name": "numeric_3810",
			"fieldType": "TYPE_NUMBER",
			"mandatory": false,
			"editable": true,
			"description": "testing numeric",
			"value": "120",
			"defaultValue": ""
		},
		{
			"id": "UDF0000003790",
			"classCode": "TASK",
			"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": "TASK",
			"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": "TASK",
			"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": "TASK",
			"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": "TASK",
			"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": "TASK",
			"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": "TASK",
			"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"
		}
	]
}