# Access iSDV NAS docker ###### tags: `NAS` ### How to check list of container of docker ``` Command: system-docker ps Output: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c5d8cbe320cc iei/isdv/iei-controller:1.0.0-normal "/bin/bash /start.sh" 16 hours ago Up 16 hours iei c8d37f9b99a8 iei/isdv-s/db:0.0.1 "docker-entrypoint..." 16 hours ago Up 16 hours 0.0.0.0:27018->27017/tcp mongodb ``` ### Enter into container ``` system-docker exec -it iei /bin/bash ``` ### How to execute control server api in container using curl 1) Change directory path to access certificates </br> cd /home/isdv/.ca 2) Execute CURL API under this directory path 3) GET API using CURL (Get list of online devices) </br>```curl --insecure --key key.pem --cacert server.pem --cert server-cert.pem --request GET 'https://192.168.1.147:8443/api/device'```</br> 4) POST API using CURL (Device settings) ```curl --insecure --key key.pem --cacert server.pem --cert server-cert.pem --request POST 'https://192.168.1.147:8443/api/device/00187dff0071' --header 'Content-Type: application/json' --data-raw '{"op":"get","subset":"settings"}'```</br> 5) POST API using CURL (Factory Reset) ```curl --insecure --key key.pem --cacert server.pem --cert server-cert.pem --request POST 'https://192.168.1.147:8443/api/device/all' --header 'Content-Type: application/json' --data-raw '{"op":"factory"}'``` ### How to set Client certificate to access controlserver api using postman 1) Copy certificate from **iei** container 2) .ca certificate folder path = :/home/isdv/.ca 3) Create folder on local machine "C:/.ca_NAS/" 4) Create file in "".ca_NAS" directory "server.pem" and "key.pem" 5) Copy server.pem and key.pem file data to respective file 6) Open postman click on Setting icon ![](https://i.imgur.com/eZN3lf9.png) -> Settings ![](https://i.imgur.com/afUfZWi.png) 7) Go to Certificates tab. Click Add Certificate </br> Add Host: 192.168.1.147:8443 </br> Add CRT file: server.pem </br> Add KEY file: key.pem </br> Click on Add button 8) Execute Get API in postman to check certifiacte is working or not </br> API: GET: https://192.168.1.147:8443/api/device ### Execute https API using curl - Full path and name of the file that contains the server's private key. The - file must be encoded in PEM format. tls_server_cert =/home/isdv/.ca/server.pem tls_private_key =/home/isdv/.ca/key.pem tls_ca_cert_file =/home/isdv/.ca/example-ca-cert.pem ``` 1) change directory cd /home/isdv/.ca/ GET API: curl --insecure --key key.pem --cacert server.pem --cert server-cert.pem https://127.0.0.1:8443/api/device/all POST API: curl --insecure --key key.pem --cacert server.pem --cert server-cert.pem --request POST 'https://192.168.1.147:8443/api/device/all' --header 'Content-Type: application/json' --data-raw '{"op":"factory"}' curl --insecure --key key.pem --cacert server.pem --cert server-cert.pem --request GET 'https://192.168.1.147:8443/api/request/347' ``` ### How deploy iSDV API to container