チャネルのすべての登録を読み取る
チャネルのすべての登録 (ChannelUri、デバイス トークン、GCM registrationId など) を取得します。
Request
Method | 要求 URI | HTTP バージョン |
---|---|---|
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 |
以下の点に注意してください。
- この呼び出しは OData に指定されている $top クエリ文字列パラメーターをサポートします。
- この呼び出しは、列挙を継続するための ContinuationToken クエリ文字列パラメーターをサポートします。
- ChannelUri は URL エンコードされます。
- DeviceToken は大文字の 16 進形式である必要があります。
要求ヘッダー
必須要求ヘッダーと省略可能な要求ヘッダーを次の表に示します。
要求ヘッダー | 説明 |
---|---|
承認 | Service Bus を使用した Shared Access Signature Authentication で指定されたとおりに生成された SAS トークン。 |
x-ms-version | 2015-01 |
要求本文
[なし] :
Response
応答には、HTTP 状態コードおよび一連の応答ヘッダーが含まれています。
応答コード
コード | 説明 |
---|---|
200 | 登録が正常に取得されました。 |
400 | 正しくない要求。 通知ハブではこのクエリをサポートしていません。 |
401 | 認証エラー。 アクセス キーが正しくありませんでした。 |
403 | クォータを超えました。登録の操作レートが高すぎるため、要求は拒否されました。 |
状態コードの詳細については、「 状態コードとエラー コード」を参照してください。
応答ヘッダー
応答ヘッダー | 説明 |
---|---|
Content-type | application/atom+xml;type=entry;charset=utf-8 |
X-MS-ContinuationToken | 登録の列挙がさらにある場合、列挙を続行するためのトークンが含まれます。 |
応答本文
登録の一覧を「 登録の作成」で指定された xml 形式でラップする Atom フィード。 次に例を示します。
<?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/"1234567890"">
<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>