Skip to main content
Version: 8.5.0

POST Search a Request

Search by ID

URL: {{server-url}}/v1/request/search/byqual?offset=0&size=25

You can call the above endpoint to search a request in the ServiceOps system. When you search a request, you get a reference filename, which you can pass in the body while creating or updating a request ticket; this associates the file with the ticket.

You need the following key-values:

Header

KeyDescription
AuthorizationBearer {access token obtained after authorization}

Body

KeyDescription
typevalue

Example (Request & Response)

Request

curl --request POST --url 'http://192.16.1.108/api/v1/request/search/byqual?offset=0&size=50'
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODUxNTk0MTksInVzZXJfbmFtZSI6Im5pcmF2LnBhdGVsQG1vdGFkYXRhLmNvbSIsImp0aSI6ImZhZTY2YTdiLTY0NDQtNGY4OS1hNGNmLWZmOGY3NDIyMThhZiIsImNsaWVudF9pZCI6ImZsb3RvLXdlYi1hcHAiLCJzY29wZSI6WyJOTy1TQ09QRSJdLCJ0ZW5hbnRJZGVudGlmaWVyIjoiYXBvbG8ifQ.i65Huu91E5xP2fXk7hY45VBN1wZSRhvDAT1WRCqcuRw'
--header "Content-type: application/json"
--data '{
"qualDetails": {
"type": "FlatQualificationRest",
"quals": [
{
"type": "RelationalQualificationRest",
"leftOperand": {
"type": "VariableOperandRest",
"value": "requester_email"
},
"operator": "in",
"rightOperand": {
"type": "ValueOperandRest",
"value": {
"type": "ListStringValueRest",
"value": [
"bill@motadata.com"
]
}
}
},
{
"type": "RelationalQualificationRest",
"leftOperand": {
"type": "PropertyOperandRest",
"key": "request.supportLevel"
},
"operator": "in",
"rightOperand": {
"type": "ValueOperandRest",
"value": {
"type": "ListEnumValueRest",
"value": [
"tier1",
"tier2"
]
}
}
}
]
}
}'

Response

{
"objectList": [
{
"id": 1000,
"createdTime": 1585113980027,
"updatedTime": 1585113980405,
"requesterEmail": "rosy@motadata.com",
"requesterName": "Rosy",
"ccEmailSet": [],
"subject": "Email is not working",
"impactName": "Low",
"priorityName": "Low",
"statusName": "Open",
"urgencyName": "Low",
"tags": [],
"source": "Technician Portal",
"fileAttachments": [],
"spam": false,
"supportLevel": "tier1",
"name": "INC-1000"
"assigneeEmail": "lizi@motadata.com",
"resolvedTime": "Wed, Jun 14, 2023 03:50 pm",
"closedTime": "Wed, Jun 14, 2023 03:50 pm"
}
],
"totalCount": 919
}

Search by Logon Name or Email Address

You can search for the required request using the Requester's Logon name or email address.

URL: {{server-url}}/v1/request/search/byRequester?requester={email-address/logon-name}

Header

KeyDescription
AuthorizationBearer {access token obtained after authorization}
Content-typeapplication/json

Body

KeyDescription
typevalue

Example (Request & Response for Logon Name)

Request

curl --location 'http://172.16.11.148/api/v1/request/search/byRequester?requester=jerry'

Response

{
"objectList": [
{
"id": 5,
"name": "INC-5",
"createdTime": 1709028918082,
"updatedTime": 1709814609871,
"requesterEmail": "jerry@motadata.com",
"requesterName": "Jerry",
"subject": "Laptop is not working",
"description": "Laptop is not working",
"impactName": "Low",
"priorityName": "Low",
"statusName": "In Progress",
"urgencyName": "Low",
"source": "Technician Portal",
"spam": false,
"supportLevel": "tier0",
"assigneeEmail": "rosy.cordeiro@motadata.com"
},
{
"id": 9,
"name": "INC-9",
"createdTime": 1709316807020,
"updatedTime": 1709549853874,
"requesterEmail": "jerry@motadata.com",
"requesterName": "Jerry",
"subject": "Internet Issue",
"description": "Internet Issue",
"impactName": "Low",
"priorityName": "Medium",
"statusName": "Closed",
"urgencyName": "Low",
"source": "Technician Portal",
"spam": false,
"supportLevel": "tier0",
"assigneeEmail": "rosy.cordeiro@motadata.com"
},
{
"id": 10,
"name": "INC-10",
"createdTime": 1709347110267,
"updatedTime": 1709728209803,
"requesterEmail": "jerry@motadata.com",
"requesterName": "Jerry",
"subject": "Internet is slow",
"description": "Internet is slow",
"impactName": "Low",
"priorityName": "Urgent",
"statusName": "Open",
"urgencyName": "Low",
"source": "Technician Portal",
"spam": false,
"supportLevel": "tier0",
"assigneeEmail": "rosy.cordeiro@motadata.com"
},
{
"id": 17,
"name": "INC-17",
"createdTime": 1709553209823,
"updatedTime": 1709814609732,
"requesterEmail": "jerry@motadata.com",
"requesterName": "Jerry",
"subject": "Internet speed is slow",
"description": "",
"impactName": "Low",
"priorityName": "Medium",
"statusName": "Open",
"urgencyName": "Low",
"source": "Mobile App",
"spam": false,
"supportLevel": "tier0"
}
],
"totalCount": 4
}

Similarly, you can search for requests using the requester's email address.

Search by Custom Field Value

You can search for the required request using the custom field's value. The custom field types supported include, Text Input, Checkbox, Multi-Select Dropdown, Datetime, Dropdown, Number, Radio, and Dependent.

URL: {{server-url}}/api/v1/request/search/byqual?offset=0&size=25

Header

KeyDescription
AuthorizationBearer {access token obtained after authorization}
Content-typeapplication/json

Body

KeyDescription
fieldNameEnter the custom field name in the leftOperand section.
valueEnter the value that is to be searched in the field in the rightOperand section.

Example: (Request & Response)

Request curl --location 'http://172.16.12.255/api/v1/request/search/byqual?offset=0&size=25' \ --header 'Authorization: Apikey eRDJDPVRDTBkl8WE%40nl9VrTqhGbMwz%2FemyAUcZvJVlRGLE5iv7BlM%2Ba3JYoFZCDW4LLuP' \ --header 'Content-Type: application/json' \ --data '{ "qualDetails": { "type": "FlatQualificationRest", "quals": [ { "description": null, "qualContext": null, "type": "RelationalQualificationRest", "leftOperand": { "type": "PropertyOperandRest", "key": "request.statusId" }, "operator": "not_in", "rightOperand": { "type": "ValueOperandRest", "value": { "type": "ListLongValueRest", "value": [ 13 ] } } }, { "type": "RelationalQualificationRest", "leftOperand": { "type": "CustomFieldOperandRest", "fieldName": "New Text Input" }, "operator": "equal_case_insensitive", "rightOperand": { "type": "ValueOperandRest", "value": { "type": "StringValueRest", "value": "In Progress" } } } ] } }'

Response

{ "objectList": [ { "id": 10, "name": "INC-10", "createdTime": 1720249041039, "updatedTime": 1720249098421, "requesterEmail": "jerry@motadata.com", "requesterName": "Jerry", "subject": "Email is not Working", "description": "Email is not Working", "impactName": "Low", "priorityName": "Low", "statusName": "Open", "urgencyName": "Low", "source": "Technician Portal", "spam": false, "supportLevel": "tier0" } ], "totalCount": 1 }