Export (0) Print
Expand All

Subscription-ID Header

Exchange Server 2003

Subscription-ID Header

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release. The WebDAV Subscription-ID header specifies a number that is assigned by the server to uniquely identify a subscription. The client uses this number to identify the subscription when using the POLL Method and the UNSUBSCRIBE Method. The server uses this number to identify the subscription when using the NOTIFY Method and in response messages.

Syntax

Subscription-ID:="Subscription-ID:" 1*DIGIT

A client can request two subscriptions, which are distinguishable only by the subscription-ID, on the same resource for the same kind of event. This makes it easier for multiple clients on the same machine to independently subscribe to all the events they need. The Subscription-ID header is always included by the server so that it is clear which client is subscribed to which event.

Multiple IDs can be specified in the Subscription-ID header of a SUBSCRIBE Method (renew), a POLL Method or an UNSUBSCRIBE Method request, as follows:

Subscription-ID: 1, 18, 243

The following table lists the instances in which the Subscription-ID header may be used.

Instance Description
SUBSCRIBE Method If the Subscription-ID header is present and all the IDs match the content location given, the server renews the subscriptions.
200 (OK) response to a SUBSCRIBE Method The successful response to a SUBSCRIBE Method must include the subscription ID numbers in the body, whether the user is trying to create a new subscription or to renew one or more old subscriptions.
412 (Precondition Failed) response to a SUBSCRIBE Method If the client includes only invalid ID numbers in the Subscription-ID header when trying to renew a subscription, the server request will fail. The failure response includes the Subscription-ID header with every invalid ID number listed. For example, if the client tries to renew 1234 and 518, and neither is valid, the server responds with 412 (Precondition Failed) and with "Subscription-ID: 1234, 518" as a header.
POLL Method The Subscription-ID header must be present. All subscription-IDs should have the same content location.
200 (OK) response to a POLL Method within a 207 (Multi-Status) response and the Subscription-ID header is not present The server returns a 207 (Multi-Status) response with only the subscription ID numbers for subscriptions on which events happened. For example, if the user polls on 518, 1234, and 2282, but events happened only on subscriptions 518 and 1234, then the server response will include 518 and 1234 in the body.
412 (Precondition Failed) response to a POLL Method This is the same as the 412 (Precondition Failed) response to the SUBSCRIBE Method and the UNSUBSCRIBE Method. The server response includes invalid subscription ID numbers.
NOTIFY Method The Subscription-ID header must be present. It includes the list of all subscription ID numbers that are subscribed to the event that fired.

Example

The following example renews subscription 21.

SUBSCRIBE /public/subtest HTTP/1.1
Host: www.contoso.com
Subscription-id: 21
Show:
© 2015 Microsoft