JavaScript
import GboxSDK from "gbox-sdk";
const gboxSDK = new GboxSDK({
apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted
});
async function main() {
// Create an Android box
const box = await gboxSDK.create({ type: "android" });
// Get basic package information (metadata only)
const androidPkgListInfo = await box.pkg.listInfo();
console.log(`Android Pkg List: ${JSON.stringify(androidPkgListInfo, null, 2)}`);
// Get package operators for interaction capabilities
const androidPkgList = await box.pkg.list();
// Iterate through each package operator and perform actions
for (const pkg of androidPkgList.operators) {
console.log(`Pkg data: ${JSON.stringify(pkg.data, null, 2)}`);
}
}
main();import os
from gbox_sdk import GboxSDK
def main():
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"])
# Create an Android box
box = gbox_sdk.create(type="android")
# Get basic package information (metadata only)
android_pkg_list_info = box.pkg.list_info()
print(f"Android Pkg List: {android_pkg_list_info}")
# Get package operators for interaction capabilities
android_pkg_list = box.pkg.list()
# Iterate through each package operator and perform actions
print("Android Pkg Operators:")
for pkg in android_pkg_list.operators:
print(f"Package: {pkg.data}")
if __name__ == "__main__":
main()curl --request GET \
--url https://gbox.ai/api/v1/boxes/{boxId}/android/packages \
--header 'Authorization: Bearer <token>'{
"data": [
{
"name": "Google Voice",
"packageName": "com.google.android.apps.googlevoice",
"apkPath": "/data/app/com.google.android.apps.googlevoice-1/base.apk",
"version": "1.0.0",
"pkgType": "thirdParty",
"isRunning": false
},
{
"name": "Chrome Browser",
"packageName": "com.android.chrome",
"apkPath": "/data/app/com.android.chrome-2/base.apk",
"version": "120.0.6099.210",
"pkgType": "thirdParty",
"isRunning": true
},
{
"name": "System Settings",
"packageName": "com.android.settings",
"apkPath": "/system/app/Settings/Settings.apk",
"version": "1.0.0",
"pkgType": "system",
"isRunning": false
}
]
}Android
List pkg
Retrieves detailed information for all installed pkgs. This endpoint provides comprehensive pkg details.
GET
/
boxes
/
{boxId}
/
android
/
packages
JavaScript
import GboxSDK from "gbox-sdk";
const gboxSDK = new GboxSDK({
apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted
});
async function main() {
// Create an Android box
const box = await gboxSDK.create({ type: "android" });
// Get basic package information (metadata only)
const androidPkgListInfo = await box.pkg.listInfo();
console.log(`Android Pkg List: ${JSON.stringify(androidPkgListInfo, null, 2)}`);
// Get package operators for interaction capabilities
const androidPkgList = await box.pkg.list();
// Iterate through each package operator and perform actions
for (const pkg of androidPkgList.operators) {
console.log(`Pkg data: ${JSON.stringify(pkg.data, null, 2)}`);
}
}
main();import os
from gbox_sdk import GboxSDK
def main():
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"])
# Create an Android box
box = gbox_sdk.create(type="android")
# Get basic package information (metadata only)
android_pkg_list_info = box.pkg.list_info()
print(f"Android Pkg List: {android_pkg_list_info}")
# Get package operators for interaction capabilities
android_pkg_list = box.pkg.list()
# Iterate through each package operator and perform actions
print("Android Pkg Operators:")
for pkg in android_pkg_list.operators:
print(f"Package: {pkg.data}")
if __name__ == "__main__":
main()curl --request GET \
--url https://gbox.ai/api/v1/boxes/{boxId}/android/packages \
--header 'Authorization: Bearer <token>'{
"data": [
{
"name": "Google Voice",
"packageName": "com.google.android.apps.googlevoice",
"apkPath": "/data/app/com.google.android.apps.googlevoice-1/base.apk",
"version": "1.0.0",
"pkgType": "thirdParty",
"isRunning": false
},
{
"name": "Chrome Browser",
"packageName": "com.android.chrome",
"apkPath": "/data/app/com.android.chrome-2/base.apk",
"version": "120.0.6099.210",
"pkgType": "thirdParty",
"isRunning": true
},
{
"name": "System Settings",
"packageName": "com.android.settings",
"apkPath": "/system/app/Settings/Settings.apk",
"version": "1.0.0",
"pkgType": "system",
"isRunning": false
}
]
}Authorizations
Enter your API Key in the format: Bearer . Get it from https://gbox.ai
Path Parameters
Box ID
Example:
"c9bdc193-b54b-4ddb-a035-5ac0c598d32d"
Query Parameters
system or thirdParty, default is thirdParty
Available options:
system, thirdParty Example:
["thirdParty"]
Filter pkgs by running status: running (show only running pkgs), notRunning (show only non-running pkgs). Default is all
Available options:
running, notRunning Example:
["running", "notRunning"]
Response
200 - application/json
Android pkg list
Response containing list of Android pkgs
Android pkg list
Show child attributes
Show child attributes
Example:
[
{
"name": "Google Voice",
"packageName": "com.google.android.apps.googlevoice",
"apkPath": "/data/app/com.google.android.apps.googlevoice-1/base.apk",
"version": "1.0.0",
"pkgType": "thirdParty",
"isRunning": false
},
{
"name": "Chrome Browser",
"packageName": "com.android.chrome",
"apkPath": "/data/app/com.android.chrome-2/base.apk",
"version": "120.0.6099.210",
"pkgType": "thirdParty",
"isRunning": true
},
{
"name": "System Settings",
"packageName": "com.android.settings",
"apkPath": "/system/app/Settings/Settings.apk",
"version": "1.0.0",
"pkgType": "system",
"isRunning": false
}
]
Was this page helpful?
⌘I