Search requests
Basic structure
{
"OrderBy":"FullId desc", //Friendlyname, a column configured in the DataView.
"Top":50, //Show the first X records
"Skip":0, //Skip the first X records
"Select":["FullId", "ColumnX", …], //List of columns (friendly names) that should be returned
"Conditions": //SearchConditionGroup with SingleConditions ([Conditions]) and further
//SearchConditionGroup ([Groups])
//All conditions and groups are linked within a group with the LogicalOperator
//Only groups up to the second level are supported, i.e. the SearchConditionGroups in
//[Groups] must not contain any other groups
{
"LogicalOperator":"And", //Logical operator AND/OR between the conditions/groups on the same level
"Conditions":[
//Condition 1
//Condition 2
//Condition n
],
"Groups":[
//further search condition groups with simple conditions ([Condition]),
//within these groups, no further groups can be defined
{
LogicalOperator: …
Conditions: …
Groups: …
}
]
},
"SelectAttributes":
{
//Mapping of ticket fields to additional columns in the result.
//Specify the column name under which the column should be added to the result,
//followed by a list of (ticket field) ObjectGuids (TicketSchemeFields.ObjectGuid).
"start": ["2EC23D69-5F16-41EA-BA9B-F569BC4C03AC", "…"],
"end": ["236D8D52-D9CA-48EE-911D-621B41F91306"],
"type": ["D6D42052-87EE-41A8-8528-8778CE264D2C"],
"aufteilung": ["86F06E7A-3DAB-4C3C-8964-6DD811FAFF73"]
}
}
Note:
Groups are used to link the individual conditions with the logical operator (groups themselves are also linked at the first level with the specified operator). This is similar to the bracketing in Where conditions of SQL statements when using OR and AND.
Conditions
| Time | Principal | Ticket schema |
| Status | Number range | Number |
| Ticket data | SLM | Service Portfolio |
Note:
Conditions must always be nested as follows:
...
"Conditions":
{
"LogicalOperator":"And", //Logischer operator AND/OR zwischen den conditions/groups auf gleichem Level
"Conditions":[
//Bedingung 1
{
"Name": "LastChange",
"Operator":"Greater",
"Value":"2022-02-04T13:26:00",
"OperatorType":"",
"Type": "datetime"
},
//Bedingung 2
{
...
},
//Bedingung n
{
...
}
],
...
-
Creation date of the ticket
{
"Name": "CreationDate",
"Operator":"Greater",
"Value":"2021-03-04T13:26:00",
"OperatorType":"",
"Type": "datetime"
}
-
Last change of the ticket
{
"Name": "LastChange",
"Operator":"Greater",
"Value":"2021-03-04T13:26:00",
"OperatorType":"",
"Type": "datetime"
}
-
Predefined/User defined
For DateTime conditions there is the possibility to enter a date by yourself or to select it with placeholders (e.g. "Today", "Yesterday"). For predefined times, the condition changes as follows:
Condition JSON:
{
"Name": "LastChange",
"Operator":"Within",
"Value":"Today",
"OperatorType"="Predefined"
"Type": "datetime"
}
Possible operators at predefined:
-
Older
-
Within
Possible values for predefined:
-
Today/Yesterday
-
CurrentWeek/LastWeek,
-
CurrentMonth/LastMonth
-
CurrentYear/LastYear
-
CurrentQuarter/LastQuarter
-
LastTwentyFourHours
-
LastThreeDays /LastSevenDays/LastThirtyDays/LastNinetyDays, LastSixtyDays
-
LastTwelveMonths
-
LastMinutesByValue|<value> e.g. LastMinutesByValue|3
-
LastHoursByValue, LastDaysByValue, LastMonthByValue
-
Possible operators for DateTime conditions
User defined:
-
Greater / GreaterEquals
-
Smaller / SmallerEquals
-
Equals / NotEquals
Predefined:
-
Older
-
Within
-
Current status
Possible operators: Equals/NotEquals
Condition JSON:
{
"Name": "Status",
"Operator":"Equals",
"Value":"ObjectGuid of ticket state",
"OperatorType":""
"Type": "list"
}
-
Achieved status
Possible operators: Equals/NotEquals
Condition JSON:
{
"Name": "ReachedStatus",
"Operator":"Equals",
"Value":"ObjectGuid of ticket state",
"OperatorType":""
"Type": "Statuses"
}
-
Status type
Possible operators: Equals/NotEquals
Condition JSON:
{
"Name": "StatusGroup",
"Operator":"Equals",
"Value":"ID of status group", // 1 = new, 2 = in process, 3 = pending 4 = closed
"OperatorType":""
"Type": "list"
}
-
All ticket data
Possible operators: Contains
Condition JSON:
{
"Name": "AllTicketData",
"Operator":"Contains",
"Value":"any string value",
"OperatorType":"",
"Type": "Text"
}
-
File attachment
Possible operators:
-
FileContentAndNameContains
-
FileContentAndNameNotContains
-
FileContentContains
-
FileContentNotContains
-
FileNameContains
-
FileNameNotContains
Condition JSON:
{
"Name": "Attachment",
"Operator":"FileContentAndNameContains",
"Value":"any string value",
"OperatorType":"",
"Type": "File"
}
-
Fields (All ticket fields)
Possible operators: Contains
Condition JSON:
{
"Name": "AllFields",
"Operator":"Contains",
"Value":"any string value",
"OperatorType":"",
"Type": "text"
}
-
Comment
Possible operators: Contains/NotContains
Condition JSON:
{
"Name": "Comment",
"Operator":"Contains",
"Value":"any string value",
"OperatorType":"",
"Type": "text"
}
-
Solution
Possible operators: Contains/NotContains
Condition JSON:
{
"Name": "Solution",
"Operator":"Contains",
"Value":"any string value",
"OperatorType":"",
"Type": "text"
}
-
Message
Possible operators: Contains/NotContains
Condition JSON:
{
"Name": "Message",
"Operator":"Contains",
"Value":"any string value",
"OperatorType":"",
"Type": "text"
}
-
Ticket title
Possible operators:
-
Equals/NotEquals
-
Contains/NotContains
-
StartsWith/NotStartsWith
Condition JSON:
{
"Name": "Title",
"Operator":"Equals",
"Value":"any string value",
"OperatorType":"",
"Type": "text"
}
-
Creator
Possible operators: Equals/NotEquals/Contains
Condition JSON:
{
"Name": "CreatorPrincipal",
"Operator":"Equals",
"Value":"ObjectGuid of principal",
"OperatorType":"",
"Type": "userbrowser"
}
-
Owner
Possible operators:
-
Equals/NotEquals/EqualsRecursive
-
Contains/
Condition JSON:
{
"Name": "OwnerPrincipal",
"Operator":"Equals",
"Value":"ObjectGuid of principal",
"OperatorType":"",
"Type": "userbrowser"
}
No value is specified for the following operators:
-
IsUser/IsNotUser
-
IsGroup/IsNotGroup
-
IsProcessRole/ IsNotProcessRole
-
Responsible
Possible operators: Equals/NotEquals
Condition JSON:
{
"Name": "ResponsiblePrincipal",
"Operator":"Equals",
"Value":"ObjectGuid of principal",
"OperatorType":"",
"Type": "userbrowser"
}
-
Affected user
Possible operators: Equals/NotEquals/Contains
Condition JSON:
{
"Name": "AffectedPrincipal",
"Operator":"Equals",
"Value":"ObjectGuid of principal",
"OperatorType":"",
"Type": "userbrowser"
}
-
Observer
Possible operators: Equals/NotEquals
Condition JSON:
{
"Name": "FollowerPrincipal",
"Operator":"Equals",
"Value":"ObjectGuid of principal",
"OperatorType":"",
"Type": "userbrowser"
}
-
Processor
Possible operators: Equals/NotEquals/ActAsDeputy/ ActAsDeputized
Condition JSON:
{
"Name": "EditorPrincipal",
"Operator":"Equals",
"Value":"ObjectGuid of principal",
"OperatorType":"",
"Type": "userbrowser"
}
-
Predefined principal conditions
Possible operators: Equals/NotEquals
Condition JSON:
{
"Name": "EditorPrincipal",
"Operator":"Equals",
"Value":"LoggedInUser",
"OperatorType"="Predefined",
"Type": "userbrowser"
}
-
ID Area General / All
Possible operators: Equals/NotEquals
Condition JSON:
{
"Name": "IdRange",
"Operator":"Equals",
"Value":" numeric value",
"OperatorType":"",
"Type": "number",
"idRangeId": "00000000-0000-0000-0000-000000000000”
}
-
Specific ID range
Possible operators:
-
Equals/NotEquals
-
Greater/GreaterEquals
-
Smaller/SmallerEquals
Condition JSON:
{
"Name": " IdRange",
"Operator":"Equals",
"Value":"numeric value",
"OperatorType":"",
"Type": "number"
"idRangeId": "ObjectGuid of Id Range”
}
-
Contract
Possible operators:
-
Equals
-
NotEquals
Condition JSON:
{
"Name": "SlmContract",
"Operator":"Equals",
"Value":"Object guid of SLM contract",
"OperatorType":"",
"Type": "list"
}
-
Service
Possible operators:
-
Equals
-
NotEquals
Condition JSON:
{
"Name": "SlmService",
"Operator":"Equals",
"Value":"Object guid of SLM service",
"OperatorType":"",
"Type": "list"
}
-
Priority
Possible operators:
-
Equals
-
NotEquals
Condition JSON:
{
"Name": "Priority",
"Operator":"Equals",
"Value":"Object guid of SLM service priority",
"OperatorType":"",
"Type": "list"
}
-
Scheme general
Possible operators: Equals/NotEquals
Condition JSON:
{
"Name": "TicketSchema",
"Operator":"Equals",
"Value":"Object guid of ticket scheme",
"OperatorType":"",
"Type": "list"
}
-
Ticket schema field
Type: Text
Possible operators:
-
Equals/NotEquals
-
NotIsEmpty/Empty
-
StartsWith/NotStartsWith
-
Contains/NotContains
Condition JSON:
{
"Name": "TicketField",
"Operator":"Equals",
"Value":"any text",
"OperatorType":"",
"Type": "text",
"fieldId": "object guid of ticket scheme field",
"schemaId": "object guid of ticket schema",
}
Type: Number
Possible operators:
-
Greater/GreaterEquals
-
Smaller/SmallerEquals
-
Equals/NotEquals
-
Contains/NotContains
Condition JSON:
{
"Name": "TicketField",
"Operator":"Greater",
"Value":"any text",
"OperatorType":"",
"Type": "Numeric",
"fieldId": "object guid of ticket scheme field",
"schemaId": "object guid of ticket schema",
"format"="#,0.##"
}
Type: Date
Possible operators and predefined values: see under 1.
Condition JSON:
{
"Name": "TicketField",
"Operator":"Greater",
"Value":"any date/datetime text",
"OperatorType":"",
"Type": "datetime",
"fieldId": "object guid of ticket scheme field",
"schemaId": "object guid of ticket schema"
}
-
File attachments
Condition JSON:
{
"Name": "AttachmentsCount",
"Operator":"Greater",
"Value":"numeric value",
"OperatorType":"",
"Type": "number"
}
-
E-mails
Condition JSON:
{
"Name": "MailsCount",
"Operator":"Greater",
"Value":"numeric value",
"OperatorType":"",
"Type": "number"
}
-
Comments
Condition JSON:
{
"Name": "CommentsCount",
"Operator":"Greater",
"Value":"numeric value",
"OperatorType":"",
"Type": "number"
}
-
Expenses
Condition JSON:
{
"Name": "ExpensesCount",
"Operator":"Greater",
"Value":"numeric value",
"OperatorType":"",
"Type": "number"
}
-
Successor tickets
Condition JSON:
{
"Name": "SuccessorCount",
"Operator":"Greater",
"Value":"numeric value",
"OperatorType":"",
"Type": "number"
}
-
Assigned KB article
Condition JSON:
{
"Name": "KBArticleAssigment",
"Operator":"Greater",
"Value":"numeric value",
"OperatorType":"",
"Type": "number"
}
-
Possible operators for TicketAux-Conditions
-
Greater
-
GreaterEquals
-
Smaller
-
SmallerEquals
-
Eqals
-
NotEquals
-
Service
Possible operators: Contains/NotContains
Condition JSON:
{
"Name": "Service",
"Operator":"Contains",
"Value":"any text value",
"OperatorType":"",
"Type": "text"
}
-
Service catalog
Possible operators: Contains/NotContains
Condition JSON:
{
"Name": "ServiceCatalog",
"Operator":"Contains",
"Value":"Object guid of service catalog",
"OperatorType":"",
"Type": "list"
}
-
Service transaction
Possible operators: Contains/NotContains
Condition JSON:
{
"Name": "ServiceTransaction",
"Operator":"Contains",
"Value":"any text value",
"OperatorType":"",
"Type": "text"
}