Genymotion HTTP API

Genymotion HTTP API allows you to remotely control all Genymotion widgets and edit the Genymotion device Configuration.

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}"

This will call the android/shell API endpoint and execute the command ls to the instance.

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}"

You can get the CURL command line (without authentication) when trying the API:

Back to top

This will call the android/shell API endpoint and execute the command ls to the instance.

The API reference page can also be accessed from the URL https://{your_instance_IP}/documentation/api.

This will call the android/shell API endpoint and execute the command ls to the instance.

Note If you are not using a SSL/TLS certificate, you will need to add the -k switch to your curl command.

You can get the CURL command line (without authentication) when trying the API:

You can try the API by using the Try it out button.

GET /android/id Get the current android id of the device.

[Image showing an Execute button in the API UI]

This will display the current Android ID via the API.

Responses

curl -X GET "https://{instance_IP}/api/v1/android/id" -H "accept: application/json"

Back to top