Subscription Create
Subscription to the content instance of ADN-AE1
Each Light ADN-AE creates a subscription child resource under its container resource. The Light ADN-AE1 configures the nu (short for notificationURI) attribute of the subscription with the resource identifier of it's AE resource. This will result in the Light ADN-AE receiving a notification from the MN-CSE whenever a new contentInstance resource is created in the container. The Light ADN-AE also configures the nct (short for notification content type) attribute of the subscription to a value of 1 to indicate that all attributes of the subscribed to resource are to be included in a notification.
HTTP Request with XML payload
POST /home_gateway/light_ae1/light?rcn=0 HTTP/1.1 Host: mn.provider.com:8080 X-M2M-Origin: Clight_ae1 Content-Type: application/vnd.onem2m-res+xml; ty=23 X-M2M-RI: mncse-67891 <m2m:sub xmlns:m2m="http://www.onem2m.org/xml/protocols" rn="lightstate_sub"> <enc> <net>3</net> </enc> <nu>Clight_ae1</nu> <nct>1</nct> </m2m:sub>
HTTP Response
HTTP/1.1 201 Created X-M2M-RI: mncse-67891 X-M2M-RSC: 2001 Content-Location: /mn-cse/sub-856593979
HTTP Request with JSON payload
POST /home_gateway/light_ae1/light?rcn=0 HTTP/1.1 Host: mn.provider.com:8080 X-M2M-Origin: Clight_ae1 Content-Type: application/vnd.onem2m-res+json; ty=23 X-M2M-RI: mncse-67891 { "m2m:sub": { "rn": "lightstate_sub", "enc": { "net": 3 }, "nu": ["Clight_ae1"], "nct": 1 } }
HTTP Response
HTTP/1.1 201 Created Content-Type: application/vnd.onem2m-res+xml X-M2M-RI: mncse-67891 X-M2M-RSC: 2001 Content-Location: /mn-cse/sub-856593979
Subscription to the content instance of ADN-AE2
Each Light ADN-AE creates a subscription child resource under its container resource. The Light ADN-AE2 configures the nu (short for notificationURI) attribute of the subscription with the resource identifier of it's AE resource. This will result in the Light ADN-AE receiving a notification from the MN-CSE whenever a new contentInstance resource is created in the container. The Light ADN-AE also configures the nct (short for notification content type) attribute of the subscription to a value of 1 to indicate that all attributes of the subscribed to resource are to be included in a notification.
HTTP Request with XML payload
POST /home_gateway/light_ae2/light?rcn=0 HTTP/1.1 Host: mn.provider.com:8080 X-M2M-Origin: Clight_ae2 Content-Type: application/vnd.onem2m-res+xml; ty=23 X-M2M-RI: mncse-29387 <m2m:sub xmlns:m2m="http://www.onem2m.org/xml/protocols" rn="lightstate_sub"> <enc> <net>3</net> </enc> <nu>Clight_ae1</nu> <nct>1</nct> </m2m:sub>
HTTP Response
HTTP/1.1 201 Created X-M2M-RI: mncse-29387 X-M2M-RSC: 2001 Content-Location: /mn-cse/sub-856463728
HTTP Request with JSON payload
POST /home_gateway/light_ae2/light?rcn=0 HTTP/1.1 Host: mn.provider.com:8080 X-M2M-Origin: Clight_ae2 Content-Type: application/vnd.onem2m-res+json; ty=23 X-M2M-RI: mncse-29387 { "m2m:sub": { "rn": "lightstate_sub", "enc": { "net": 3 }, "nu": ["Clight_ae2"], "nct": 1 } }
HTTP Response
HTTP/1.1 201 Created Content-Type: application/vnd.onem2m-res+xml X-M2M-RI: mncse-29387 X-M2M-RSC: 2001 Content-Location: /mn-cse/sub-856463728