Genymotion HTTP API

Genymotion HTTP API

Genymotion HTTP API allows you to remotely control all Genymotion widgets. Genymotion HTTP API allows you to edit the Genymotion device configuration. Access the instance from a web browser. Click API reference. From there, choose the HTTP API request you are interested in for details. You can also 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.

Using curl with authentication

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

The curl command calls the android/shell API endpoint.

The curl command executes the command ls on the instance.

{username} and {password} are the credentials for the Genymotion instance.

{instance_IP} is your instance IP.

SSL/TLS certificate note

Note: When not using a SSL/TLS certificate, add the -k switch to the 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}"

Without authentication

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