Motadata Docs

POST Search a Request

{{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

Key Description
Authorization Bearer {access token obtained after authorization}

Body

Key Description
type value

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": "Sunt molestiae similique repudiandae.",
"impactName": "Low",
"priorityName": "Low",
"statusName": "Open",
"urgencyName": "Low",
"tags": [],
"source": "Technician Portal",
"fileAttachments": [],
"spam": false,
"supportLevel": "tier1",
"name": "INC-1000"
}
],
"totalCount": 919
}