Adrian_Santamaria | 2023-02-21 10:07:02 UTC | #1
Hello
I've discovered that it is possible to use * as a wildcard in the filter query parameters in some requests. For example: GET api/v2/telephony/providers/edges/phones?name=*Adrian* gives me the list of phones with "Adrian" in their name.
I did not find any documentation about this. So my question is: Is this an intended behavior? Can we rely on it? If it does, then, are there any more wildcards available?
Thank you!
tim.smith | 2023-02-21 21:49:45 UTC | #2
It's not documented, but the dev team has confirmed that the wildcard syntax is officially supported.
Adrian_Santamaria | 2023-02-22 09:08:54 UTC | #3
Thank you Tim. Is * the only wildcard available?
tim.smith | 2023-02-22 14:46:24 UTC | #4
yes, as far as I know.
Adrian_Santamaria | 2023-02-22 15:08:52 UTC | #5
I've made another test and it looks like it does not work with all entities... for example: GET /api/v2/routing/queues?name=Sampl*_queue do not match a queue named Sample_queue...
Also... I've found that [] works too, but only for some entities, to define a list of characters... For example:
GET /api/v2/authorization/roles?name=M[ai]ster Admin do match with the role named Master Admin
but
GET /api/v2/telephony/providers/edges/phones?name=W[ei]bRTC_Adrian does not match with the phone named WebRTC_Adrian
I mean, this is quite inconsistent... Could you please check it and confirm which wildcards are valid for which queries?
Thank you
system | 2023-03-25 14:57:22 UTC | #6
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 18499