Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4802

Azure Notification Hubs Rest Interface $filter Parameter on Registrations endpoint

$
0
0

I've been trying to define a $filter for notification hubs to limit the results returned by the API based on a pair of tags.

Given a pair of tags, e.g. _employee_id_32 and _site_id_66, does anyone know of a way to construct a valid filter that requires both of those tags to be present in a registration? If that isn't possible even filtering on a single tag would help.

Documentation here https://learn.microsoft.com/en-us/rest/api/notificationhubs/ has not been of much use, and Deepseek, Grok etc has been of even less, given that from what I understand AzNH implements a limited subset of OData queries.

I'm not using the Microsoft.Azure.NotificationHubs.NotificationHubClient package since it straight up hangs when attempting to retrieve registrations (v4.2.0)

Anyway, I don't have any issues pulling in everything without a filter, no issues with $skiptoken, etc.

But when it comes to $filter everything I've tried results in "The filter query is invalid".

Even one working tag would be better than what I have now, since we have in the 10's of thousands of registrations. Pulling everything takes ~30 seconds so I'd really rather avoid that.

e.g.

  • contains(Tags,'_site_id_66')+and+contains(Tags,'_employee_id_32')
  • Tags+eq+'_site_id_66'
  • Tags+eq+'_employee_id_32'

I figured contains might work since it seems the tags field is a single comma separated string (no idea if true internally), but that would preclude the other two examples from working. Not that any of them work...

P.S. I am aware of the tag endpoint (https://{namespace}.servicebus.windows.net/{NotificationHub}/tags/{tag}/registrations) and if nothing comes of this I'll use that instead.


Viewing all articles
Browse latest Browse all 4802

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>