Read all registrations of a channel

Retrieves all registrations for a channel (for example, ChannelUri, device token, GCM registrationId).

Request

Method Request URI HTTP version
GET https://{namespace}.servicebus.windows.net/{NotificationHub}/registrations/?$filter=ChannelUri eq '{channelUri}'&api-version=2015-01
or
https://{namespace}.servicebus.windows.net/{NotificationHub}/registrations/?$filter=DeviceToken eq '{deviceToken}'&api-version=2015-01
or
https://{namespace}.servicebus.windows.net/{NotificationHub}/registrations/?$filter=GcmRegistrationId eq '{gcmRegistrationId}'&api-version=2015-01

Note the following points:

  • This call supports the $top query string parameter as specified in OData.
  • This call supports a ContinuationToken query string parameter to continue the enumeration.
  • ChannelUri is url-encoded.
  • DeviceToken must be in uppercase hex format.

Request headers

The following table describes required and optional request headers.

Request header Description
Authorization SAS token generated as specified in Shared Access Signature Authentication with Service Bus.
x-ms-version 2015-01

Request body

None.

Response

The response includes an HTTP status code and a set of response headers.

Response codes

Code Description
200 Registrations retrieved successfully.
400 Bad Request. Notification hubs do not support this query
401 Authorization failure. The access key was incorrect.
403 Quota exceeded; request rejected because registration operations rate is too high.

For information about status codes, see Status and Error Codes.

Response headers

Response header Description
Content-type application/atom+xml;type=entry;charset=utf-8
X-MS-ContinuationToken Contains the token to continue the enumeration of registrations, in case there are more.

Response body

Atom feed that wraps the list of registrations in the xml format specified in Create Registration. For example:

<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="/{NotificationTopic}/channels/{channel hash}" />
  <id> https://{tenant}.windows.net/{NotificationTopic}/channels/{channel hash}</id>
  <updated>2012-08-17T17:32:00Z</updated>
  <entry xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:etag="W/&quot;1234567890&quot;">
    <id>https://{tenant}.windows.net/{NotificationTopic}/registrations/{registrationId}</id>
    <title type="text"> /{NotificationTopic}/registrations/{registrationId}</title>
    <updated>2012-08-17T17:32:00Z</updated>
    <content type="application/xml">
    <WindowsRegistrationDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect">
            <ETag>{ETag}</ETag>
        <ExpirationTime>2012-07-16T19:20+01:00</ExpirationTime>
        <RegistrationId>{RegistrationId}</RegistrationId>
            <Tags>myTag, myOtherTag</Tags>
            <ChannelUri>{ChannelUri}</ChannelUri>
        </WindowsRegistrationDescription>
    </content>
  </entry>
  <entry>
    …
  </entry>
</feed>