Opkey Appium Automation API

The Appium Automation API from Opkey — 11 operation(s) for appium automation.

OpenAPI Specification

opkey-appium-automation-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: pCloudy Device Cloud Appium Automation 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: Appium Automation
paths:
  /api/lonelyappium:
    post:
      operationId: lonelyappium
      summary: Lonelyappium(Automation)- To Make The Session Ongoing
      tags:
      - Appium Automation
      description: Starts a standalone ("lonely") Appium automation session for the given app package and keeps the device session alive/ongoing. Used to attach an external Appium script to the reserved device and prevent the session from idling out while automation runs.
      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:
              - package
              properties:
                package:
                  type: string
                  description: Application package name.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                result:
                  raidFolder: /opt/raid-data/data/userV2/30/1/8/
                  code: 200
                  endpoint: https://device.pcloudy.com/appium/hubble/mx9253tyvkc9-587366
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
  /api/appium/init:
    post:
      operationId: bookDevicesAppium
      summary: Book Devices For Appium
      tags:
      - Appium Automation
      description: Reserves a device for an Appium automation session and returns the booking details needed to start the session. Used to allocate a device before initiating Appium execution.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - None
              properties:
                None:
                  type: string
                  description: Authentication is via the Authorization header (Basic username:apiKey).
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                result:
                  code: 200
                  device_ids:
                  - manufacturer: Samsung
                    model: Galaxy J7 Pro
                    os: android
                    version: 9.0.0
                    capabilities:
                      platformName: Android
                      browserName: '797'
                      deviceName: '797'
                    phoneNumber: ''
                    operatorName: ''
                    networkType: ''
                    rid: '2327492'
                    streamingToken: 20e950de-b131-4c20-9397-64ffa76c7e0f
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
  /api/appium/execute:
    post:
      operationId: initAppiumhub
      summary: Init AppiumHub for App
      tags:
      - Appium Automation
      description: This initiates the appium on devices for that app. The app you had to upload by using upload api which is available in Generic api.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - token
              - app
              properties:
                token:
                  type: string
                  description: Authtoken (this will get from authenticate response)
                app:
                  type: string
                  description: provide app name on which app you want to test.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
  /api/appium/get_appium_file_list:
    post:
      operationId: getAppiumFileList
      summary: Get Appium File List
      tags:
      - Appium Automation
      description: This gives you the all the performance files list, to generate the performance data you need to call the Start device services api in generic apis.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - token
              - rid
              properties:
                token:
                  type: string
                  description: Authtoken (this will get from authenticate response)
                rid:
                  type: string
                  description: Reservation id (will get from appium/init api response for each device)
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
  /api/appium/update_session:
    post:
      operationId: updateAppiumSession
      summary: Update Appium Session
      tags:
      - Appium Automation
      description: 'This API update is used to update the Appium session. Whatever value user passes in release after parameter, device gets release after that mentioned value(i.e. mentioned time in minutes) E.g: if 0 is passed in the "release_after" parameter, the device will get release immediately. i.e in 0 mins'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - token
              - rid
              - release_after
              properties:
                token:
                  type: string
                  description: Authtoken (this will get from authenticate response)
                rid:
                  type: string
                  description: Reservation id (will get from appium/init api response for each device)
                release_after:
                  type: string
                  description: Device get release after that mentioned value (i.e. mentioned time in minutes).
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
  /api/appium/download_appium_access_data:
    post:
      operationId: downloadAppiumPerf
      summary: Download Appium Performance Data
      tags:
      - Appium Automation
      description: This will download the performance data like cpu, memory,battery and video.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - token
              - rid
              - filename
              properties:
                token:
                  type: string
                  description: Authtoken (this will get from authenticate response)
                rid:
                  type: string
                  description: Reservation id (will get from appium/init api response for each device)
                filename:
                  type: string
                  description: Performance list file name (cpu.txt, bat.txt, mem.txt, video.flv)
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
  /https://device.pcloudy.com/appium/wd/hub/session:
    post:
      operationId: appiumSession
      summary: Initialize Session
      tags:
      - Appium Automation
      description: Create a new Appium WebDriver session on a pCloudy real device. Normally done via your Appium client library, not raw REST.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - desiredCapabilities
              properties:
                desiredCapabilities:
                  type: object
                  description: Combined Appium and pCloudy capabilities object.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                sessionId: 4a3b2c1d-e5f6-7890-abcd-ef1234567890
                status: 0
                value:
                  platform: ANDROID
                  deviceName: Samsung Galaxy S23
                  osVersion: '13.0'
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
  /api/appium/devices:
    post:
      operationId: bookDevicesAppiumLegacy
      summary: Book Devices For Appium
      tags:
      - Appium Automation
      description: This api book the devices for appium execution.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - token
              - duration
              - platform
              - devices
              - session
              - overWrite_location
              properties:
                token:
                  type: string
                  description: Authtoken (this will get from authenticate response)
                duration:
                  type: string
                  description: duration in minutes you want to book the each device.
                platform:
                  type: string
                  description: on which flatform devices you want to book (android/ios).
                devices:
                  type: string
                  description: provide array of devices id's for multiple device booking.
                session:
                  type: string
                  description: Enter session name
                overWrite_location:
                  type: string
                  description: 'true'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
  /api/appium/endpoint:
    post:
      operationId: getAppiumEndpoint
      summary: Get Appium EndPoint
      tags:
      - Appium Automation
      description: This get the appium Endpoint url.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - token
              properties:
                token:
                  type: string
                  description: Authtoken (this will get from authenticate response)
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
  /api/appium/folder:
    post:
      operationId: getAppiumReport
      summary: Get Appium Report Folder
      tags:
      - Appium Automation
      description: This gives you the report folder path. In the report you will get the total tests pass, failed and more information about test cases.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - token
              properties:
                token:
                  type: string
                  description: Authtoken (this will get from authenticate response)
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
  /api/appium/getShareableReportLink:
    post:
      operationId: appiumShareableLink
      summary: Get Appium Shareable Report Link
      tags:
      - Appium Automation
      description: This API provide sharable report link of the executed appium session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - token
              - rid
              properties:
                token:
                  type: string
                  description: Authtoken (this will get from authenticate response)
                rid:
                  type: string
                  description: Reservation id (will get from appium/init api response for each device)
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '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/