Content Instance Retrieve
The smartphone application can retrieve the latest light states via sending a RETRIEVE request targeting a container's la (short for latest) virtual resource.
The smartphone can also retrieve a group of latest light states via sending a group RETRIEVE request targeting a virtual resource fanOutPoint (short for fopt).
Retrieve the latest content instance of ADN-AE1
The latest content instance of a container resource for a light ADN-AE1 can be retrieved by the following request
HTTP Request
GET /~/mn-cse/home_gateway/light_ae1/light/la HTTP/1.1 Host: in.provider.com:8080 X-M2M-Origin: /in-cse/CSmartphone_AE X-M2M-RI: mncse-11223 Accept: application/xml
HTTP Response with XML payload
HTTP/1.1 200 OK X-M2M-RSC: 2000 X-M2M-RI: mncse-11223 Content-Type: application/xml <?xml version="1.0" encoding="UTF-8"?> <m2m:cin xmlns:m2m="http://www.onem2m.org/xml/protocols" rn="cin_20161011T151738_0"> <ty>4</ty> <ri>cin_20161011T151738_0</ri> <pi>cnt_20161011T150836_0</pi> <ct>20161011T151738</ct> <lt>20161011T151738</lt> <et>20161012T151738</et> <st>0</st> <cnf>text/plain:0</cnf> <cs>3</cs> <con>OFF</con> </m2m:cin>
HTTP Request
GET /~/mn-cse/home_gateway/light_ae1/light/la HTTP/1.1 Host: in.provider.com:8080 X-M2M-Origin: /in-cse/CSmartphone_AE X-M2M-RI: mncse-11223 Accept: application/json
HTTP Response with JSON payload
HTTP/1.1 200 OK X-M2M-RSC: 2000 X-M2M-RI: mncse-11223 Content-Type: application/json { "m2m:cin": { "rn" : "cin_20161011T151738_0", "ty" : 4, "ri" : "cin_20161011T151738_0", "pi" : "cnt_20161011T150836_0", "ct" : "20161011T151738", "lt" : "20161011T151738", "et" : "20161012T151738", "st" : 0, "cnf" : "text/plain:0", "cs" : 3, "con" : "OFF" } }
Retrieve the latest content instance of ADN-AE2
The latest content instance of a container resource for a light ADN-AE2 can be retrieved by the following request
HTTP Request
GET /~/mn-cse/home_gateway/light_ae2/light/la HTTP/1.1 Host: in.provider.com:8080 X-M2M-Origin: /in-cse/CSmartphone_AE X-M2M-RI: mncse-22336 Accept: application/xml
HTTP Response with XML payload
HTTP/1.1 200 OK X-M2M-RSC: 2000 X-M2M-RI: mncse-22336 Content-Type: application/xml <?xml version="1.0" encoding="UTF-8"?> <m2m:cin xmlns:m2m="http://www.onem2m.org/xml/protocols" rn="cin_20161011T151823_0"> <ty>4</ty> <ri>cin_20161011T151823_0</ri> <pi>cnt_20161011T151021_0</pi> <ct>20161011T151823</ct> <lt>20161011T151823</lt> <et>20161012T151823</et> <st>0</st> <cnf>text/plain:0</cnf> <cs>3</cs> <con>OFF</con> </m2m:cin>
HTTP Request
GET /~/mn-cse/home_gateway/light_ae2/light/la HTTP/1.1 Host: in.provider.com:8080 X-M2M-Origin: /in-cse/CSmartphone_AE X-M2M-RI: mncse-22336 Accept: application/json
HTTP Response with JSON payload
HTTP/1.1 200 OK X-M2M-RSC: 2000 X-M2M-RI: mncse-22336 Content-Type: application/json { "m2m:cin": { "rn" : "cin_20161011T151823_0", "ty" : 4, "ri" : "cin_20161011T151823_0", "pi" : "cnt_20161011T151021_0", "ct" : "20161011T151823", "lt" : "20161011T151823", "et" : "20161012T151823", "st" : 0, "cnf" : "text/plain:0", "cs" : 3, "con" : "OFF" } }
Retrieve a group of latest content instances for all light states
A group of latest content instances can be achieved via sending a group RETRIEVE request following procedures as below
HTTP Request
GET /~/mn-cse/home_gateway/gateway_ae/containers_grp/fopt/la HTTP/1.1 Host: in.provider.com:8080 X-M2M-Origin: /in-cse/CSmartphone_AE X-M2M-RI: mncse-55667 Accept: application/xml
HTTP Response with XML payload
HTTP/1.1 200 OK X-M2M-RSC: 2000 X-M2M-RI: mncse-55667 Content-Type: application/xml <?xml version="1.0" encoding="UTF-8"?> <m2m:agr xmlns:m2m="http://www.onem2m.org/xml/protocols"> <m2m:rsp> <rsc>2000</rsc> <rqi>mncse-55667</rqi> <pc> <m2m:cin rn="cin_20161011T151738_0"> <ty>4</ty> <ri>cin_20161011T151738_0</ri> <pi>cnt_20161011T150836_0</pi> <ct>20161011T151738</ct> <lt>20161011T151738</lt> <et>20161012T151738</et> <st>0</st> <cnf>text/plain:0</cnf> <cs>3</cs> <con>OFF</con> </m2m:cin> </pc> <to>/mn-cse/cnt-582759912/la</to> <fr>/in-cse/CSmartphone_AE</fr> </m2m:rsp> <m2m:rsp> <rsc>2000</rsc> <rqi>mncse-55667</rqi> <pc> <m2m:cin rn="cin_20161011T151823_0"> <ty>4</ty> <ri>cin_20161011T151823_0</ri> <pi>cnt_20161011T151021_0</pi> <ct>20161011T151823</ct> <lt>20161011T151823</lt> <et>20161012T151823</et> <st>0</st> <cnf>text/plain:0</cnf> <cs>3</cs> <con>OFF</con> </m2m:cin> </pc> <to>/mn-cse/cnt-582769893/la</to> <fr>/in-cse/CSmartphone_AE</fr> </m2m:rsp> </m2m:agr>
HTTP Request
GET /~/mn-cse/home_gateway/gateway_ae/containers_grp/fopt/la HTTP/1.1 Host: in.provider.com:8080 X-M2M-Origin: /in-cse/CSmartphone_AE X-M2M-RI: mncse-55667 Accept: application/json
HTTP Response with JSON payload
HTTP/1.1 200 OK X-M2M-RSC: 2000 X-M2M-RI: mncse-55667 Content-Type: application/json { "m2m:agr": { "m2m:rsp": [ { "rsc": "2000", "rqi": "mncse-55667", "pc": { "m2m:cin": { "rn" : "cin_20161011T151738_0", "ty" : 4, "ri" : "cin_20161011T151738_0", "pi" : "cnt_20161011T150836_0", "ct" : "20161011T151738", "lt" : "20161011T151738", "et" : "20161012T151738", "st" : 0, "cnf" : "text/plain:0", "cs" : 3, "con" : "OFF" } }, "to": "/mn-cse/cnt-582759912/la", "fr": "/in-cse/CSmartphone_AE" }, { "rsc": "2000", "rqi": "mncse-55667", "pc": { "m2m:cin": { "rn" : "cin_20161011T151823_0", "ty" : 4, "ri" : "cin_20161011T151823_0", "pi" : "cnt_20161011T151021_0", "ct" : "20161011T151823", "lt" : "20161011T151823", "et" : "20161012T151823", "st" : 0, "cnf" : "text/plain:0", "cs" : 3, "con" : "OFF" } }, "to": "/mn-cse/cnt-582769893/la", "fr": "/in-cse/CSmartphone_AE", } ] } }