Device HTTP API
Device HTTP API allows you to remotely control all Genymotion widgets and edit the Genymotion device Configuration. Access the instance from a web browser. Click API reference for details. You can test an API request by using the Try it out button. The API reference page can also be accessed from the URL https://{your_instance_IP}/documentation/api. The HTTP API can be called using curl with the -u option for authentication. The curl command calls the android/shell API endpoint and executes the command ls. {username} and {password} are the instance credentials. {instance_IP} is your instance IP. Note: If you are not using a SSL/TLS certificate, you will need to add the -k switch to your curl command:
curl -u {username}:{password} -k \
-X POST "https://{instance_IP}/api/v1/android/shell" \
-H "accept: text/plain" \
-H "Content-Type: application/json" \
-d "{\"commands\":[\"ls\"],\"timeout_in_seconds\":5}"
From there, choose the HTTP API request you are interested in for details.
The HTTP API can be called using curl with the -u option for authentication:
curl -u {username}:{password} \
-X POST "https://{instance_IP}/api/v1/android/shell" \
-H "accept: text/plain" \
-H "Content-Type: application/json" \
-d "{\"commands\":[\"ls\"],\"timeout_in_seconds\":5}"
You can get the CURL command line (without authentication) when trying the API:
curl -X GET "https://{instance_IP}/api/v1/android/id" -H "accept: application/json"
Get the current android id of the device by calling the android/id endpoint.
Note If you are not using a SSL/TLS certificate, you will need to add the -k switch to your curl command:
curl -X GET "https://{instance_IP}/api/v1/android/id" -H "accept: application/json" -k