Content Instance Create
Create a content instance of ADN-AE1
The Light ADN-AE1 publishes its current state to a contentInstance resource which it creates under its container resource. In this example, the state of the Light is OFF.
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=4 X-M2M-RI: mncse-24345 <m2m:cin xmlns:m2m="http://www.onem2m.org/xml/protocols"> <cnf>text/plain:0</cnf> <con>OFF</con> </m2m:cin>
HTTP Response
HTTP/1.1 201 Created X-M2M-RSC: 2001 X-M2M-RI: mncse-24345 Content-Location: /mn-cse/cin-394798749
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=4 X-M2M-RI: mncse-24345 { "m2m:cin": { "cnf": "text/plain:0" "con": "OFF", } }
HTTP Response
HTTP/1.1 201 Created X-M2M-RSC: 2001 X-M2M-RI: mncse-24345 Content-Location: /mn-cse/cin-394798749
Create a content instance of ADN-AE2
The Light ADN-AE2 publishes its current state to a contentInstance resource which it creates under its container resource. In this example, the state of the Light is OFF.
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=4 X-M2M-RI: mncse-22345 <m2m:cin xmlns:m2m="http://www.onem2m.org/xml/protocols"> <cnf>text/plain:0</cnf> <con>OFF</con> </m2m:cin>
HTTP Response
HTTP/1.1 201 Created X-M2M-RSC: 2001 X-M2M-RI: mncse-22345 Content-Location: /mn-cse/cin-256599578
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=4 X-M2M-RI: mncse-22345 { "m2m:cin": { "cnf": "text/plain:0", "con": "OFF" } }
HTTP Response
HTTP/1.1 201 Created X-M2M-RSC: 2001 X-M2M-RI: mncse-22345 Content-Location: /mn-cse/cin-256599578