Download OpenAPI specification:Download
Genymotion SaaS user documentation can be found at docs.genymotion.com/saas.
This HTTP API allows you to manage Genymotion SaaS virtual devices.
There are 3 main concepts in this API. All of them must be understood in order to able to use the it efficiently.
The first concept is the use of JWT (JSON Web Token) to authenticate the API calls. With the exception of the
authentication, all endpoints require the JWT to be passed in the Authorization
HTTP header as bearer
.
If the JWT is missing, invalid or expired, the API call will return a 401 Unauthorized HTTP error.
The second concept is the Recipe. A Recipe is what is needed to cook an Instance. This Recipe contains the information about the Android system, the virtual device characteristics, and some contextual data. Genymobile provides a variety of default Recipes, but you can create and share new ones from either the Genymotion SaaS Portal or from the Genymotion Desktop software (license required).
The third concept is the Instance. An Instance represents a Genymotion Virtual Device running in the Cloud. Built using the information contained in a Recipe, an Instance can be accessed using a wide variety of tools. The current API allows you to start and stop disposable Instances. A disposable Instance will always be recreated from the Recipe when a start request is sent. When a stop request is sent, the virtual device Instance will be destroyed, and any modifications done inside it during the run time will be lost.
Authorization
HTTP header, with Bearer <JWT>
content format, for authentication mechanism.
Except for the authentication endpoint, all API calls require this HTTP header to be set in order to identify the user executing the request on the platform.
Not passing it to the API call, or providing an invalid/expired one, will result in a 401 Unauthorized HTTP error.
Security scheme type: | API Key |
---|---|
Header parameter name: | Authorization |
Authenticate a User, and retreive a new valid JWT. This JWT must be provided to all other API calls in order to identify and authenticate the User executing the request.
Once logged in, simply add the Authorization
HTTP header to all subsequents API calls.
Authorization
HTTP header value must have the following format: Bearer <JWT>
.
A JWT will expire after some time. The default validity duration is 48 hours. It is recommended to generate a new one before running a new set of API calls. Generating a new JWT will not invalidate previously generated JWTs.
Data used to log User
email required | string <email> Email address |
password required | string <password> User password |
User profile and JWT
The email/password combination is incorrect.
User is not enabled.
Cannot log in user.
List all ready Recipes available for the authenticated User. This endpoint returns 3 lists of Recipes:
List of Recipes
Cannot list recipes.
curl -H 'Content-Type: application/json;charset=utf-8' -H 'Authorization: Bearer <JWT>' https://api.geny.io/cloud/v1/recipes
List all Recipes available for the authenticated User.
This endpoint returns a paginated list of all Recipes.
source | string Default: "all" Enum:"all" "official" "owner" "sharee" "shared" Filter by Recipe source. Options are:
|
status | string Default: "all" Enum:"all" "ready" "updating" Filter by Recipe status. Options are:
|
type | string Default: "system" Enum:"system" "app" "all" Filter by Recipe type. Options are:
|
Paginated list of Recipes
Cannot list recipes.
curl -H 'Content-Type: application/json;charset=utf-8' -H 'Authorization: Bearer <JWT>' https://api.geny.io/cloud/v2/recipes
Start a new disposable Instance from the given Recipe identified by its Uuid.
The Instance is disposable, meaning that all changes done inside it will be lost after the Instance is stopped.
The state of the Instance returned by this call will always be CREATING.
uuid required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ Uuid of the resource |
Data used to start new disposable Instance
instance_name required | string Name of the Instance. This name must be unique per User. |
rename_on_conflict | boolean Default: false In case a virtual device already exist with the same name, allow the Platform to rename the
Instance with a new, unique, name. New name will look like |
stop_when_inactive | boolean Default: false DEPRECATED. Use |
automatic_release | object DEPRECATED. Use |
timeouts | object Various customizable timeouts for the Instance. |
The creating Instance
An instance with the same name already exist for user.
Not allowed to start an instance.
The given recipe cannot be found, or no slots are available on the platform.
Cannot start disposable instance.
List all currently available Instances for the authenticated User. This endpoint is deprecated. /v2/instances should be used instead.
format | string Enum:"template" "recipe" Deprecated. |
List of Instances
Cannot list instances.
curl -H 'Content-Type: application/json;charset=utf-8' -H 'Authorization: Bearer <JWT>' https://api.geny.io/cloud/v1/instances
List all currently available Instances for the authenticated User.
The following sortable fields are available:
This endpoint is paginated.
ordering | string^[\+|\-]?[,1-9a-zA-Z_\-]*$ Use an orderable field with an optional '+' OR '-' prefix to order in the desired direction |
page | integer Page to query |
page_size | integer Number of elements per pages |
organization_uuid | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ Uuid of the organization. Only an organization manager can use this filter. |
state | string Instance state to filter |
List of Instances
Not allowed to list organization's instances
Cannot list instances.
curl -H 'Content-Type: application/json;charset=utf-8' -H 'Authorization: Bearer <JWT>' 'https://api.geny.io/cloud/v2/instances?state=BOOTING&state=ONLINE&ordering=created_at'
Retrieve an Instance identified by its Uuid.
uuid required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ Uuid of the resource |
format | string Default: "recipe" Enum:"recipe" "template" Deprecated. |
The Instance
Instance does not exit.
Cannot get instance information.
curl -H 'Content-Type: application/json;charset=utf-8' -H 'Authorization: Bearer <JWT>' https://api.geny.io/cloud/v1/instances/<UUID>