Opkey Network Simulation API

The Network Simulation API from Opkey — 5 operation(s) for network simulation.

OpenAPI Specification

opkey-network-simulation-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: pCloudy Device Cloud Network Simulation 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: Network Simulation
paths:
  /api/v2/networkshaping/start-throttle:
    post:
      operationId: startNetworkSimulation
      summary: Start Network Simulation(V2)
      tags:
      - Network Simulation
      description: Starts network shaping/throttling on the device using the specified upload and download speeds to emulate real-world conditions such as 3G, 4G, or poor connectivity. Used to test app behaviour under constrained bandwidth; stop it with the stop-throttle call.
      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
              - uploadData
              - downloadData
              properties:
                rid:
                  type: integer
                  description: Device reservation ID (returned when the device is booked).
                uploadData:
                  type: integer
                  description: Upload bandwidth limit (kbps).
                downloadData:
                  type: integer
                  description: Download bandwidth limit (kbps).
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                traceId: jcmALAwPhaQFlyMKD1Ln
                requestId: fyQlhbfsPyHDEgroznPk
                statusCode: 200
                status: success
                message: Network throttling started successfully
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
  /api/v2/networkshaping/stop-throttle:
    post:
      operationId: stopNetworkSimulation
      summary: Stop Network Simulation(V2)
      tags:
      - Network Simulation
      description: Stops any active network shaping/throttling on the device and restores normal, unthrottled connectivity. Call it after a constrained-network test to return the device to full speed.
      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
              properties:
                rid:
                  type: integer
                  description: Device reservation ID (returned when the device is booked).
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                traceId: verSlmNpNZPgZCUk9NVW
                requestId: 25cvAJlMqmLBvznTZbb7
                statusCode: 200
                status: success
                message: Network throttling stopped successfully
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
  /api/get_atcd_profiles:
    post:
      operationId: getNetworkProfiles
      summary: Get Network Profiles
      tags:
      - Network Simulation
      description: This gives you the total network profile list with upload and download speed that are present in device under Network feture in pCloudy. e.g 3G,2G,4G,Broadband Low Speed.
      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/atcd_shape:
    post:
      operationId: setNetworkProfile
      summary: Set Network Profile(Atcd Shape)
      tags:
      - Network Simulation
      description: This api set the network profile on booked device.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - token
              - rid
              - name
              properties:
                token:
                  type: string
                  description: Authtoken (this will get from authenticate response)
                rid:
                  type: string
                  description: Reservation id(will get from book device api response)
                name:
                  type: string
                  description: Network profile name (will get from Get network profile api)
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthorized - missing or invalid access token
      security:
      - accessToken: []
  /api/atcd_unshape:
    post:
      operationId: unshapeNetwork
      summary: Unshape Network Profile
      tags:
      - Network Simulation
      description: This api unshape the network profile that was already set in the device..
      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 book device api response)
      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/