-
Notifications
You must be signed in to change notification settings - Fork 11
Pycloud API
Sebastian Echeverria edited this page May 22, 2018
·
4 revisions
The Pycloud API is accessible through the URL http://<CLOUDLET_IP>:9999/api . The base URL though, does not provide any functionality. There are several commands available on this base URL.
The following commands are available, when added to the base URL. All params should be URL variables added after the command. All commands should be accessed through the GET method.
-
/services
- Obtains a list of services available in the cloudlet.
- Parameters: none
- Returns: JSON structure with services.
-
/services/get
- Obtains details about a specific service.
- Parameters: Service ID (serviceId).
- Returns: JSON structure with service details.
-
/servicevm/start
- Gets connection information to a Service VM running a specific service (either a new one or an already running one).
- Parameters: Service ID (serviceId).
- Returns: JSON structure with Service VM info.
-
/servicevm/stop
- Stop a given Service VM.
- Parameters: Service VM Instance ID (instanceId).
- Returns: Empty JSON structure.
-
/apps
- Obtains a list of cloudlet-ready apps available in the cloudlet.
- Parameters: none
- Returns: JSON structure with the apps.
-
/apps/get
- Downloads a specific app.
- Parameters: App ID (appId).
- Returns: The app APK.
-
/system
- Gets information about the cloudlet resources and state.
- Parameters: none
- Returns: JSON structure with cloudlet information.
If the API is encrypted (see API Encryption), the same commands are available, but the structure to send them is different.
- Instead of each command being added to the base API URL, all commands are available through the /command command.
- POST should be used instead of GET, and the commands and their parameters are included as the encrypted payload of the POST request.