Kaseya Community

RestAPI: Filtering archived tickets in service desk & ODATA filters

  • Is it currently possible to get a list of archived tickets to filter against in the 9.3 REST api - Whenever we make a request it returns all tickets in the service desk for that query and I'm not seeing any simple way of filtering out anything thats been archived.

    Also Odata 'ne' doesn't appear to be working - I've tried every variation I could think of NE, NOT, NOTLIKE, NLIKE, NO.

  • Hi

    There isn't a way to filter out archived tickets at the moment but we can certainly add this to our feature backlog. This will either result in a new REST resource specifically for archived tickets (which sort of mirrors the UI), or add an filterable 'Archived' property to the ServiceDeskTicket model.

    As to the OData filter, we deliberately do not allow the use of the 'ne' OData comparison operator to prevent expensive data reads against the database. If you attempt to use the operator, you should be seeing a response like this.

    {

     "ResponseCode": 400,

     "Status": "Failed",

     "Error": "Logical operator 'NotEqual' is not allowed. To allow it, set the 'AllowedLogicalOperators' property on EnableQueryAttribute or QueryValidationSettings."

    }

  • 1) Yes, please add this as it would massively cut down on the amount of request i'm making.

    2) I guess I'll need to do that filtering on the clientside