Search requests

Basic structure

Copy
General
{
   "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:

Copy
...
"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
         {
             ...
         }
      ],
...

 

  1. Time

  1. Creation date of the ticket

{

"Name": "CreationDate",

"Operator":"Greater",

"Value":"2021-03-04T13:26:00",

"OperatorType":"",

"Type": "datetime"

}

  1. Last change of the ticket

{

"Name": "LastChange",

"Operator":"Greater",

"Value":"2021-03-04T13:26:00",

"OperatorType":"",

"Type": "datetime"

}

  1. 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

  1. Possible operators for DateTime conditions

User defined:

  • Greater / GreaterEquals

  • Smaller / SmallerEquals

  • Equals / NotEquals

Predefined:

  • Older

  • Within

 

  1. Status

  1. Current status

Possible operators: Equals/NotEquals

Condition JSON:

{

"Name": "Status",

"Operator":"Equals",

"Value":"ObjectGuid of ticket state",

"OperatorType":""

"Type": "list"

}

  1. Achieved status

Possible operators: Equals/NotEquals

Condition JSON:

{

"Name": "ReachedStatus",

"Operator":"Equals",

"Value":"ObjectGuid of ticket state",

"OperatorType":""

"Type": "Statuses"

}

  1. 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"

}

 

  1. Ticket data

  1. All ticket data

Possible operators: Contains

Condition JSON:

{

"Name": "AllTicketData",

"Operator":"Contains",

"Value":"any string value",

"OperatorType":"",

"Type": "Text"

}

  1. File attachment

Possible operators:

  • FileContentAndNameContains

  • FileContentAndNameNotContains

  • FileContentContains

  • FileContentNotContains

  • FileNameContains

  • FileNameNotContains

Condition JSON:

{

"Name": "Attachment",

"Operator":"FileContentAndNameContains",

"Value":"any string value",

"OperatorType":"",

"Type": "File"

}

  1. Fields (All ticket fields)

Possible operators: Contains

Condition JSON:

{

"Name": "AllFields",

"Operator":"Contains",

"Value":"any string value",

"OperatorType":"",

"Type": "text"

}

  1. Comment

Possible operators: Contains/NotContains

Condition JSON:

{

"Name": "Comment",

"Operator":"Contains",

"Value":"any string value",

"OperatorType":"",

"Type": "text"

}

  1. Solution

Possible operators: Contains/NotContains

Condition JSON:

{

"Name": "Solution",

"Operator":"Contains",

"Value":"any string value",

"OperatorType":"",

"Type": "text"

}

  1. Message

Possible operators: Contains/NotContains

Condition JSON:

{

"Name": "Message",

"Operator":"Contains",

"Value":"any string value",

"OperatorType":"",

"Type": "text"

}

  1. Ticket title

Possible operators:

  • Equals/NotEquals

  • Contains/NotContains

  • StartsWith/NotStartsWith

Condition JSON:

{

"Name": "Title",

"Operator":"Equals",

"Value":"any string value",

"OperatorType":"",

"Type": "text"

}

 

  1. Principal

  1. Creator

Possible operators: Equals/NotEquals/Contains

Condition JSON:

{

"Name": "CreatorPrincipal",

"Operator":"Equals",

"Value":"ObjectGuid of principal",

"OperatorType":"",

"Type": "userbrowser"

}

  1. 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

  1. Responsible

Possible operators: Equals/NotEquals

Condition JSON:

{

"Name": "ResponsiblePrincipal",

"Operator":"Equals",

"Value":"ObjectGuid of principal",

"OperatorType":"",

"Type": "userbrowser"

}

  1. Affected user

Possible operators: Equals/NotEquals/Contains

Condition JSON:

{

"Name": "AffectedPrincipal",

"Operator":"Equals",

"Value":"ObjectGuid of principal",

"OperatorType":"",

"Type": "userbrowser"

}

  1. Observer

Possible operators: Equals/NotEquals

Condition JSON:

{

"Name": "FollowerPrincipal",

"Operator":"Equals",

"Value":"ObjectGuid of principal",

"OperatorType":"",

"Type": "userbrowser"

}

  1. Processor

Possible operators: Equals/NotEquals/ActAsDeputy/ ActAsDeputized

Condition JSON:

{

"Name": "EditorPrincipal",

"Operator":"Equals",

"Value":"ObjectGuid of principal",

"OperatorType":"",

"Type": "userbrowser"

}

  1. Predefined principal conditions

Possible operators: Equals/NotEquals

Condition JSON:

{

"Name": "EditorPrincipal",

"Operator":"Equals",

"Value":"LoggedInUser",

"OperatorType"="Predefined",

"Type": "userbrowser"

}

 

  1. Number range

  1. 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

}

  1. 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

}

 

  1. SLM

  1. Contract

Possible operators:

  • Equals

  • NotEquals

Condition JSON:

{

"Name": "SlmContract",

"Operator":"Equals",

"Value":"Object guid of SLM contract",

"OperatorType":"",

"Type": "list"

}

  1. Service

Possible operators:

  • Equals

  • NotEquals

Condition JSON:

{

"Name": "SlmService",

"Operator":"Equals",

"Value":"Object guid of SLM service",

"OperatorType":"",

"Type": "list"

}

  1. Priority

Possible operators:

  • Equals

  • NotEquals

Condition JSON:

{

"Name": "Priority",

"Operator":"Equals",

"Value":"Object guid of SLM service priority",

"OperatorType":"",

"Type": "list"

}

 

  1. Ticket schema

  1. Scheme general

Possible operators: Equals/NotEquals

Condition JSON:

{

"Name": "TicketSchema",

"Operator":"Equals",

"Value":"Object guid of ticket scheme",

"OperatorType":"",

"Type": "list"

}

  1. 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"

}

 

  1. Number

  1. File attachments

Condition JSON:

{

"Name": "AttachmentsCount",

"Operator":"Greater",

"Value":"numeric value",

"OperatorType":"",

"Type": "number"

}

  1. E-mails

Condition JSON:

{

"Name": "MailsCount",

"Operator":"Greater",

"Value":"numeric value",

"OperatorType":"",

"Type": "number"

}

  1. Comments

Condition JSON:

{

"Name": "CommentsCount",

"Operator":"Greater",

"Value":"numeric value",

"OperatorType":"",

"Type": "number"

}

  1. Expenses

Condition JSON:

{

"Name": "ExpensesCount",

"Operator":"Greater",

"Value":"numeric value",

"OperatorType":"",

"Type": "number"

}

  1. Successor tickets

Condition JSON:

{

"Name": "SuccessorCount",

"Operator":"Greater",

"Value":"numeric value",

"OperatorType":"",

"Type": "number"

}

  1. Assigned KB article

Condition JSON:

{

"Name": "KBArticleAssigment",

"Operator":"Greater",

"Value":"numeric value",

"OperatorType":"",

"Type": "number"

}

  1. Possible operators for TicketAux-Conditions

  • Greater

  • GreaterEquals

  • Smaller

  • SmallerEquals

  • Eqals

  • NotEquals

 

  1. Service Portfolio

  1. Service

Possible operators: Contains/NotContains

Condition JSON:

{

"Name": "Service",

"Operator":"Contains",

"Value":"any text value",

"OperatorType":"",

"Type": "text"

}

  1. Service catalog

Possible operators: Contains/NotContains

Condition JSON:

{

"Name": "ServiceCatalog",

"Operator":"Contains",

"Value":"Object guid of service catalog",

"OperatorType":"",

"Type": "list"

}

  1. Service transaction

Possible operators: Contains/NotContains

Condition JSON:

{

"Name": "ServiceTransaction",

"Operator":"Contains",

"Value":"any text value",

"OperatorType":"",

"Type": "text"

}