Hi Harshan, Its true that for our use case we only change the ownership type and owner at the time of disenrol or re-enrollment of a device. However IMO, this API is used to modify enrollment. Hence if someone needs to change the enrollment info, it should be allowed.
Also we currently update device state such as ACTIVE/REMOVED in EMM 200. Regards, On Thu, Mar 31, 2016 at 7:49 PM, Harshan Liyanage <[email protected]> wrote: > Hi Guys, > > I don't think it's correct to update the enrollment info of a device, > unless it's disenrolled and re-enrolled. Are there any use-case (currently) > we need to update enrollment info other than the following? > > 1. Change of ownership type > 2. Change of owner > 3. Update the device status (ACTIVE/INACTIVE/BLOCKED) > > In both 1 & 2 cases we need to disenroll and re-enroll the device. However > for 3rd use-case we could use this API to update the device status. But > AFAIK we are not updating the status yet. > > Thanks, > > Harshan Liyanage > Software Engineer > Mobile: *+94724423048* > Email: [email protected] > Blog : http://harshanliyanage.blogspot.com/ > *WSO2, Inc. :** wso2.com <http://wso2.com/>* > lean.enterprise.middleware. > > On Thu, Mar 31, 2016 at 6:43 AM, Milan Perera <[email protected]> wrote: > >> Created a JIRA [1] to track this. >> >> [1] https://wso2.org/jira/browse/EMM-1305 >> >> Regards, >> >> On Thu, Mar 31, 2016 at 4:35 PM, Milan Perera <[email protected]> wrote: >> >>> Hi Mariangela, >>> >>> I will attend to this. Thank you for pointing it out. >>> >>> Regards, >>> >>> On Thu, Mar 31, 2016 at 4:13 PM, Mariangela Hills <[email protected]> >>> wrote: >>> >>>> Hi Milan & Kasun, >>>> >>>> I believe that this REST API - PUT >>>> /mdm-android-agent/enrollment/{deviceId} is mainly used to update the >>>> enrollment details of an Android device. When I executed this API with the >>>> attached JSON, I got a success message [1]; however, only the device >>>> management details had got updated while the enrollment details were >>>> unchanged [2]. Please note that my device info was as shown in [3] before >>>> executing the PUT command. If the enrollment details can not be updated, >>>> there is no point in having this API as it simply duplicated the PUT >>>> /mdm-android-agent/device/{id} REST API. Please look into this issue >>>> when time permits. >>>> >>>> >>>> ---------------------------------------- >>>> [1] >>>> curl -X PUT -H "Content-Type: application/json" -H "Authorization: >>>> Bearer 224fc1aadc8811dd26f1a4d040b679e9" -k -d @'u.json' -v >>>> https://localhost:9443/mdm-android-agent/enrollment/359298055243973 >>>> * About to connect() to localhost port 9443 (#0) >>>> * Trying ::1... >>>> * Connection refused >>>> * Trying 127.0.0.1... >>>> * connected >>>> * Connected to localhost (127.0.0.1) port 9443 (#0) >>>> * SSLv3, TLS handshake, Client hello (1): >>>> * SSLv3, TLS handshake, Server hello (2): >>>> * SSLv3, TLS handshake, CERT (11): >>>> * SSLv3, TLS handshake, Server key exchange (12): >>>> * SSLv3, TLS handshake, Server finished (14): >>>> * SSLv3, TLS handshake, Client key exchange (16): >>>> * SSLv3, TLS change cipher, Client hello (1): >>>> * SSLv3, TLS handshake, Finished (20): >>>> * SSLv3, TLS change cipher, Client hello (1): >>>> * SSLv3, TLS handshake, Finished (20): >>>> * SSL connection using EDH-RSA-DES-CBC3-SHA >>>> * Server certificate: >>>> * subject: C=US; ST=CA; L=Mountain View; O=WSO2; CN=localhost >>>> * start date: 2010-02-19 07:02:26 GMT >>>> * expire date: 2035-02-13 07:02:26 GMT >>>> * common name: localhost (matched) >>>> * issuer: C=US; ST=CA; L=Mountain View; O=WSO2; CN=localhost >>>> * SSL certificate verify result: unable to get local issuer >>>> certificate (20), continuing anyway. >>>> > PUT /mdm-android-agent/enrollment/359298055243973 HTTP/1.1 >>>> > User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 >>>> OpenSSL/0.9.8| zlib/1.2.5 >>>> > Host: localhost:9443 >>>> > Accept: */* >>>> > Content-Type: application/json >>>> > Authorization: Bearer 224fc1aadc8811dd26f1a4d040b679e9 >>>> > Content-Length: 308 >>>> > >>>> * upload completely sent off: 308 out of 308 bytes >>>> < HTTP/1.1 200 OK >>>> < Date: Thu, 31 Mar 2016 10:22:03 GMT >>>> < Content-Type: application/json >>>> < Content-Length: 90 >>>> < Server: WSO2 Carbon Server >>>> < >>>> * Connection #0 to host localhost left intact >>>> {"responseCode":"Accepted","responseMessage":"Device enrollment has >>>> updated successfully"}* Closing connection #0 >>>> * SSLv3, TLS alert, Client hello (1): >>>> >>>> >>>> ------------------------------------- >>>> [2] >>>> curl -X GET -H "Content-Type: application/json" -H "Authorization: >>>> Bearer 224fc1aadc8811dd26f1a4d040b679e9" -k -v >>>> https://localhost:9443/mdm-android-agent/device/359298055243973 >>>> * About to connect() to localhost port 9443 (#0) >>>> * Trying ::1... >>>> * Connection refused >>>> * Trying 127.0.0.1... >>>> * connected >>>> * Connected to localhost (127.0.0.1) port 9443 (#0) >>>> * SSLv3, TLS handshake, Client hello (1): >>>> * SSLv3, TLS handshake, Server hello (2): >>>> * SSLv3, TLS handshake, CERT (11): >>>> * SSLv3, TLS handshake, Server key exchange (12): >>>> * SSLv3, TLS handshake, Server finished (14): >>>> * SSLv3, TLS handshake, Client key exchange (16): >>>> * SSLv3, TLS change cipher, Client hello (1): >>>> * SSLv3, TLS handshake, Finished (20): >>>> * SSLv3, TLS change cipher, Client hello (1): >>>> * SSLv3, TLS handshake, Finished (20): >>>> * SSL connection using EDH-RSA-DES-CBC3-SHA >>>> * Server certificate: >>>> * subject: C=US; ST=CA; L=Mountain View; O=WSO2; CN=localhost >>>> * start date: 2010-02-19 07:02:26 GMT >>>> * expire date: 2035-02-13 07:02:26 GMT >>>> * common name: localhost (matched) >>>> * issuer: C=US; ST=CA; L=Mountain View; O=WSO2; CN=localhost >>>> * SSL certificate verify result: unable to get local issuer >>>> certificate (20), continuing anyway. >>>> > GET /mdm-android-agent/device/359298055243973 HTTP/1.1 >>>> > User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 >>>> OpenSSL/0.9.8| zlib/1.2.5 >>>> > Host: localhost:9443 >>>> > Accept: */* >>>> > Content-Type: application/json >>>> > Authorization: Bearer 224fc1aadc8811dd26f1a4d040b679e9 >>>> > >>>> < HTTP/1.1 200 OK >>>> < Date: Thu, 31 Mar 2016 10:24:01 GMT >>>> < Content-Type: application/json >>>> < Content-Length: 488 >>>> < Server: WSO2 Carbon Server >>>> < >>>> * Connection #0 to host localhost left intact >>>> {"id":1,"name":"test123","type":"android","description":"updated1","deviceIdentifier":"359298055243973","enrolmentInfo":{"id":1,"dateOfEnrolment":1457160869352,"dateOfLastUpdate":1457160869352,"ownership":"BYOD","status":"ACTIVE","owner":"admin"},"properties":[{"name":"IMEI","value":"359298055243973"},{"name":"IMSI","value":"22334455"},{"name":"DEVICE_MODEL"},{"name":"OS_VERSION"},{"name":"VENDOR"},{"name":"SERIAL"},{"name":"DEVICE_INFO"},{"name":"DEVICE_NAME"},{"name":"GCM_TOKEN"}]}* >>>> Closing connection #0 >>>> * SSLv3, TLS alert, Client hello (1): >>>> >>>> -------------------------------------------- >>>> [3] >>>> curl -X GET -H "Content-Type: application/json" -H "Authorization: >>>> Bearer 224fc1aadc8811dd26f1a4d040b679e9" -k -v >>>> https://localhost:9443/mdm-android-agent/device/ >>>> * About to connect() to localhost port 9443 (#0) >>>> * Trying ::1... >>>> * Connection refused >>>> * Trying 127.0.0.1... >>>> * connected >>>> * Connected to localhost (127.0.0.1) port 9443 (#0) >>>> * SSLv3, TLS handshake, Client hello (1): >>>> * SSLv3, TLS handshake, Server hello (2): >>>> * SSLv3, TLS handshake, CERT (11): >>>> * SSLv3, TLS handshake, Server key exchange (12): >>>> * SSLv3, TLS handshake, Server finished (14): >>>> * SSLv3, TLS handshake, Client key exchange (16): >>>> * SSLv3, TLS change cipher, Client hello (1): >>>> * SSLv3, TLS handshake, Finished (20): >>>> * SSLv3, TLS change cipher, Client hello (1): >>>> * SSLv3, TLS handshake, Finished (20): >>>> * SSL connection using EDH-RSA-DES-CBC3-SHA >>>> * Server certificate: >>>> * subject: C=US; ST=CA; L=Mountain View; O=WSO2; CN=localhost >>>> * start date: 2010-02-19 07:02:26 GMT >>>> * expire date: 2035-02-13 07:02:26 GMT >>>> * common name: localhost (matched) >>>> * issuer: C=US; ST=CA; L=Mountain View; O=WSO2; CN=localhost >>>> * SSL certificate verify result: unable to get local issuer >>>> certificate (20), continuing anyway. >>>> > GET /mdm-android-agent/device/ HTTP/1.1 >>>> > User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 >>>> OpenSSL/0.9.8| zlib/1.2.5 >>>> > Host: localhost:9443 >>>> > Accept: */* >>>> > Content-Type: application/json >>>> > Authorization: Bearer 224fc1aadc8811dd26f1a4d040b679e9 >>>> > >>>> < HTTP/1.1 200 OK >>>> < Date: Thu, 31 Mar 2016 10:16:44 GMT >>>> < Content-Type: application/json >>>> < Content-Length: 3566 >>>> < Server: WSO2 Carbon Server >>>> < >>>> * Connection #0 to host localhost left intact >>>> [{"id":1,"name":"titan_umts","type":"android","description":"titan_umts","deviceIdentifier":"359298055243973","enrolmentInfo":{"id":1,"dateOfEnrolment":1457160869352,"dateOfLastUpdate":1457160869352,"ownership":"BYOD","status":"ACTIVE","owner":"admin"},"properties":[{"name":"IMEI","value":"359298055243973"},{"name":"IMSI","value":"413025702363929"},{"name":"DEVICE_MODEL","value":"XT1064"},{"name":"OS_VERSION","value":"6.0"},{"name":"VENDOR","value":"motorola"},{"name":"SERIAL"},{"name":"DEVICE_INFO","value":"[{\"name\":\"IMEI\",\"value\":\"359298055243973\"},{\"name\":\"IMSI\",\"value\":\"413025702363929\"},{\"name\":\"DEVICE_MODEL\",\"value\":\"XT1064\"},{\"name\":\"VENDOR\",\"value\":\"motorola\"},{\"name\":\"OS_VERSION\",\"value\":\"6.0\"},{\"name\":\"DEVICE_NAME\",\"value\":\"titan_umts\"},{\"name\":\"BATTERY_LEVEL\",\"value\":\"38\"},{\"name\":\"INTERNAL_TOTAL_MEMORY\",\"value\":\"5.51\"},{\"name\":\"INTERNAL_AVAILABLE_MEMORY\",\"value\":\"0.42\"},{\"name\":\"EXTERNAL_TOTAL_MEMORY\",\"value\":\"0.0\"},{\"name\":\"EXTERNAL_AVAILABLE_MEMORY\",\"value\":\"0.0\"},{\"name\":\"OPERATOR\",\"value\":\"Dialog\"}]"},{"name":"DEVICE_NAME","value":"titan_umts"},{"name":"GCM_TOKEN"}]},{"id":2,"name":"hwRIO-L01","type":"android","description":"hwRIO-L01","deviceIdentifier":"867115026844132","enrolmentInfo":{"id":2,"dateOfEnrolment":1458806582459,"dateOfLastUpdate":1458883781782,"ownership":"BYOD","status":"REMOVED","owner":"admin"},"properties":[{"name":"IMEI","value":"867115026844132"},{"name":"IMSI","value":"413027001101134"},{"name":"DEVICE_MODEL","value":"HUAWEI >>>> RIO-L01"},{"name":"OS_VERSION","value":"5.1"},{"name":"VENDOR","value":"HUAWEI"},{"name":"LATITUDE","value":"6.9302368"},{"name":"LONGITUDE","value":"79.8617277"},{"name":"SERIAL"},{"name":"DEVICE_INFO","value":"[{\"name\":\"IMEI\",\"value\":\"867115026844132\"},{\"name\":\"IMSI\",\"value\":\"413027001101134\"},{\"name\":\"DEVICE_MODEL\",\"value\":\"HUAWEI >>>> RIO-L01\"},{\"name\":\"VENDOR\",\"value\":\"HUAWEI\"},{\"name\":\"OS_VERSION\",\"value\":\"5.1\"},{\"name\":\"DEVICE_NAME\",\"value\":\"hwRIO-L01\"},{\"name\":\"BATTERY_LEVEL\",\"value\":\"77\"},{\"name\":\"LATITUDE\",\"value\":\"6.9302368\"},{\"name\":\"LONGITUDE\",\"value\":\"79.8617277\"},{\"name\":\"INTERNAL_TOTAL_MEMORY\",\"value\":\"24.74\"},{\"name\":\"INTERNAL_AVAILABLE_MEMORY\",\"value\":\"18.4\"},{\"name\":\"EXTERNAL_TOTAL_MEMORY\",\"value\":\"0.0\"},{\"name\":\"EXTERNAL_AVAILABLE_MEMORY\",\"value\":\"0.0\"},{\"name\":\"OPERATOR\",\"value\":\"Dialog\"}]"},{"name":"DEVICE_NAME","value":"hwRIO-L01"},{"name":"GCM_TOKEN"}]},{"id":3,"name":"milan123","type":"android","description":"updatedDescription1218","deviceIdentifier":"1234","enrolmentInfo":{"id":3,"dateOfEnrolment":1458809606838,"dateOfLastUpdate":1458809606838,"ownership":"BYOD","status":"ACTIVE","owner":"admin"},"properties":[{"name":"IMEI","value":"867115026844444"},{"name":"IMSI","value":"1231231234"},{"name":"DEVICE_MODEL"},{"name":"OS_VERSION"},{"name":"VENDOR"},{"name":"SERIAL"},{"name":"DEVICE_INFO"},{"name":"DEVICE_NAME"},{"name":"GCM_TOKEN"}]},{"id":4,"name":"mari1232","type":"android","description":"updatedDescription","deviceIdentifier":"12344433","enrolmentInfo":{"id":4,"dateOfEnrolment":1459151733276,"dateOfLastUpdate":1459151733276,"ownership":"BYOD","status":"ACTIVE","owner":"admin"},"properties":[{"name":"IMEI","value":"1231231555"},{"name":"IMSI","value":"1231231235"},{"name":"DEVICE_MODEL"},{"name":"OS_VERSION"},{"name":"VENDOR"},{"name":"SERIAL"},{"name":"DEVICE_INFO"},{"name":"DEVICE_NAME"},{"name":"GCM_TOKEN"}]}]* >>>> Closing connection #0 >>>> * SSLv3, TLS alert, Client hello (1): >>>> >>>> >>>> Regards, >>>> Mariangela >>>> >>>> >>>> *Mariangela Hills* >>>> Senior Technical Writer - WSO2, Inc. http://wso2.com >>>> Committer and PMC member - Apache Stratos >>>> email:[email protected] | mobile: +94 773 500185 >>>> >>> >>> >>> >>> -- >>> *Milan Perera *| Software Engineer >>> WSO2, Inc | lean. enterprise. middleware. >>> #20, Palm Grove, Colombo 03, Sri Lanka >>> Mobile: +94 77 309 7088 | Work: +94 11 214 5345 >>> Email: [email protected] <[email protected]> | Web: www.wso2.com >>> <http://lk.linkedin.com/in/milanharinduperera> >>> >> >> >> >> -- >> *Milan Perera *| Software Engineer >> WSO2, Inc | lean. enterprise. middleware. >> #20, Palm Grove, Colombo 03, Sri Lanka >> Mobile: +94 77 309 7088 | Work: +94 11 214 5345 >> Email: [email protected] <[email protected]> | Web: www.wso2.com >> <http://lk.linkedin.com/in/milanharinduperera> >> > > -- *Milan Perera *| Software Engineer WSO2, Inc | lean. enterprise. middleware. #20, Palm Grove, Colombo 03, Sri Lanka Mobile: +94 77 309 7088 | Work: +94 11 214 5345 Email: [email protected] <[email protected]> | Web: www.wso2.com <http://lk.linkedin.com/in/milanharinduperera>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
