最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Azure Notification Hubs Rest Interface $filter Parameter on Registrations endpoint - Stack Overflow

programmeradmin2浏览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 / 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/{NotificationHub}/tags/{tag}/registrations) and if nothing comes of this I'll use that instead.

发布评论

评论列表(0)

  1. 暂无评论