Opkey App Control API

The App Control API from Opkey — 4 operation(s) for app control.

OpenAPI Specification

opkey-app-control-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: pCloudy Device Cloud App Control API
  version: v2
  summary: Public REST API for the pCloudy real-device cloud, an Opkey product.
  description: 'The pCloudy REST API is the machine-readable surface of the pCloudy real-device testing cloud operated by Opkey (Smart Software Testing Solutions Inc.). It covers authentication, device booking and session lifecycle, app upload/install/control, device interaction, performance capture, session media and logs, network simulation, APK instrumentation, app resigning, App Center integration, and Appium/XCTest automation orchestration. All methods default to POST except authentication, and requests set Content-Type: application/json.


    PROVENANCE: this document was generated by API Evangelist from the operations, parameters and examples published in Opkey''s own public pCloudy API Reference at https://content.pcloudy.com/apidocs/ . Opkey does not publish an OpenAPI document; every path, method, parameter and description here is transcribed from that published reference and nothing has been invented. It is a third-party transcription, not a provider artifact.'
  contact:
    name: Opkey
    url: https://www.opkey.com/
  x-generated-by: API Evangelist enrichment pipeline
  x-source: https://content.pcloudy.com/apidocs/
servers:
- url: https://{cloud}.pcloudy.com
  description: pCloudy cloud instance
  variables:
    cloud:
      default: device
      enum:
      - device
      - demo
      - aus
      description: pCloudy cloud host prefix; the docs refer to this as <Cloud URL>.
security:
- accessToken: []
tags:
- name: App Control
paths:
  /api/v2/check-app-installed:
    post:
      operationId: checkAppInstalled
      summary: Check App Installed Via Bundle ID
      tags:
      - App Control
      description: Checks whether an application identified by its bundle id is currently installed on a reserved iOS device, returning a true/false result. Use it as a precondition before launching or installing, to avoid redundant installs and to branch test logic on app presence. iOS only.
      parameters:
      - name: token
        in: header
        required: true
        description: API access token (from /api/access).
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - rid
              - appIdentifier
              properties:
                rid:
                  type: integer
                  description: Device reservation ID (returned when the device is booked).
                appIdentifier:
                  type: string
                  description: Application bundle/package identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                traceId: W0PvAMlrHPgMW5jCgQi
                requestId: 6mNcLhXLrb2XyLXPJKx
                statusCode: 200
                status: success
                message: App installation status fetched successfully
                data:
                  status: true
                  isInstalled: true
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
  /api/v2/install-app:
    post:
      operationId: installApp
      summary: Install App
      tags:
      - App Control
      description: Installs an application build onto the reserved device using the V2 flow, from a file already uploaded to the pCloudy drive. Used to deploy the app under test before launching it; it does not launch the app by itself.
      parameters:
      - name: token
        in: header
        required: true
        description: API access token (from /api/access).
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - rid
              - filename
              - appInstallOnly
              - trustApp
              properties:
                rid:
                  type: integer
                  description: Device reservation ID (returned when the device is booked).
                filename:
                  type: string
                  description: Application file name (APK/IPA).
                appInstallOnly:
                  type: boolean
                  description: true to install without launching.
                trustApp:
                  type: boolean
                  description: true to trust developer profile (iOS).
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                traceId: JBSWeoDhE58OjvrqTg4
                statusCode: 200
                status: success
                message: apk/ipa installed successfully
                data:
                  bundleId: com.pcloudy.demo
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
  /api/v2/open-app:
    post:
      operationId: openApp
      summary: Open App(V2)
      tags:
      - App Control
      description: Launches (brings to the foreground) the specified application on the reserved device. Used to start the app under test at the beginning of a flow, or to re-open it after it was closed or killed. The app must already be installed on the device.
      parameters:
      - name: token
        in: header
        required: true
        description: API access token (from /api/access).
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - rid
              - fileName
              - bundleId
              properties:
                rid:
                  type: integer
                  description: Device reservation ID (returned when the device is booked).
                fileName:
                  type: string
                  description: Application file name (APK/IPA).
                bundleId:
                  type: string
                  description: iOS application bundle identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                traceId: 6TkoDpnTTAyVMRi1H7U
                requestId: QTaPIWgjwc5IBKSgmR
                statusCode: 200
                status: success
                message: OK
                data:
                  status: success
                  msg: App Launched
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
  /api/v2/close-app:
    post:
      operationId: closeApp
      summary: Close App (V2)
      tags:
      - App Control
      description: Closes the specified application on the reserved device as a normal close (moving it out of the foreground) rather than a forced kill. Used to end an app flow gracefully or to exercise cold/warm-start behaviour on the next launch.
      parameters:
      - name: token
        in: header
        required: true
        description: API access token (from /api/access).
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - rid
              - bundleId
              properties:
                rid:
                  type: integer
                  description: Device reservation ID (returned when the device is booked).
                bundleId:
                  type: string
                  description: iOS application bundle identifier.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                traceId: dpIs1ifa9QUiFd4G8FK
                requestId: Uf8TABgNagUwoHcObzZ
                statusCode: 200
                status: success
                message: OK
                data:
                  status: success
                  msg: App closed
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic with your pCloudy email as the username and your API access key as the password. Used only by GET /api/access to mint an access token.
    accessToken:
      type: apiKey
      in: header
      name: token
      description: Access token returned by GET /api/access. Newer /api/v2/* operations send it as a `token` header; several legacy /api/* operations send the same token as a `token` field in the JSON request body.
externalDocs:
  description: pCloudy API Reference
  url: https://content.pcloudy.com/apidocs/