API Reference

Packages

List installed apps, view APK metadata, and manage tags.

Type Definitions

bash
type Package {
  id: ID!                    # package name e.g. "com.example.app"
  name: String!              # display name
  type: String!              # "user" | "system"
  version: String!           # "versionName (versionCode)"
  path: String!              # APK path
  size: Int!                 # bytes
  certs: [PackageCert!]!
  installedAt: String!       # ISO 8601
  updatedAt: String!
  tags: [Tag!]!
}

type PackageCert {
  issuer: String!
  subject: String!
  serialNumber: String!
  validFrom: String!
  validTo: String!
}

type PackageStatus {
  id: ID!                 # package name
  installed: Boolean!
  updatedAt: String       # ISO 8601, null when not installed
}

type PackageInstallPending {
  packageName: String!
  updatedAt: String!
  isNew: Boolean!
}

Operations

query

packages

Search installed packages. Leave query empty to list all.

bash
query GetPackages($offset: Int!, $limit: Int!, $query: String!, $sortBy: FileSortBy!) {
  packages(offset: $offset, limit: $limit, query: $query, sortBy: $sortBy) {
    id name type version path size
    certs { issuer subject serialNumber validFrom validTo }
    installedAt updatedAt
    tags { id name }
  }
}
query

packageStatuses

Look up the install state and updatedAt timestamp for a list of package names.

bash
query GetPackageStatuses($ids: [ID!]!) {
  packageStatuses(ids: $ids) { id installed updatedAt }
}
query

packageCount

Count packages matching a query.

bash
query GetPackageCount($query: String!) {
  packageCount(query: $query)
}
mutation

installPackage

Install (or update) an APK by absolute file path. Returns the package name, last update time, and whether the package is newly installed.

bash
mutation InstallPackage($path: String!) {
  installPackage(path: $path) { packageName updatedAt isNew }
}
mutation

uninstallPackages

Launch the system uninstall prompt for each package ID. The user must confirm on the device.

bash
mutation UninstallPackages($ids: [ID!]!) {
  uninstallPackages(ids: $ids)
}