Jason Willis Posted January 5, 2022 Share Posted January 5, 2022 Hoping someone can help with this as I can't find a clear answer... I have a simple query to call from the servicedesk/tickets endpoint, but I'm unable to get the filter working with a DateTime column. In the code block below, Filter 1 (on the TickerNumber) & Filter 2 (on the SLA Status) both work fine and give the expected results, but Filter 3 (on Actual Resolution) returns a (400): Bad Request error. It does this whether I create the datetime programmatically as in Filter3, or hard-code it as in Filter4. let Token = "TOKEN GOES HERE", BaseURL = "https://psa.pulseway.com/api/", Path = "servicedesk/tickets", Day = Date.Day(Date.From(DateTime.LocalNow())), Month = Date.Month(Date.From(DateTime.LocalNow())), Year = Date.Year(Date.From(DateTime.LocalNow())), Date = DateTime.ToText(#datetime(Year, Month, Day, 00, 00, 00), "yyyy-MM-ddThh:mm:ss"), Filter1 = "?$filter=endswith(TicketNumber, '2022')", Filter2 = "?$filter=StatusSLAEventId gt 1", Filter3 = "?$filter=ResolutionActualTime gte " & Date, Filter4 = "?$filter=ResolutionActualTime gte 2022-01-03T00:00:00.000Z", Source = Json.Document(Web.Contents(BaseURL & Path & Filter4, [Headers = [Authorization="Bearer " & Token]])) in Source Does anyone know where I'm going wrong? Thank you in advance! Jamie Taylor 1 Link to comment Share on other sites More sharing options...
Jamie Taylor Posted January 6, 2022 Share Posted January 6, 2022 Hey @Jason Willis, have raised a support ticket for your query. Our team will assist you with this. Thank you! Link to comment Share on other sites More sharing options...
Jason Willis Posted January 6, 2022 Author Share Posted January 6, 2022 Just seen the email, thank you @Jamie Taylor Jamie Taylor 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now