> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobilerun.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Latency check

> Returns the most recent cached network-latency measurement for the proxy, sampled periodically by connecting through the proxy to a fixed target. `latency` is null when no measurement is available yet (e.g. the proxy is not active, or it has not been sampled since coming online).



## OpenAPI

````yaml /api-reference/mobilerun-proxy.yaml get /connect/proxies/{id}/ping
openapi: 3.1.0
info:
  title: Mobilerun Proxy
  version: v1
servers:
  - url: https://api.mobilerun.ai
    description: Droidrun Cloud API
security:
  - bearerAuth: []
paths:
  /connect/proxies/{id}/ping:
    get:
      tags:
        - Proxies
      summary: Latency check
      description: >-
        Returns the most recent cached network-latency measurement for the
        proxy, sampled periodically by connecting through the proxy to a fixed
        target. `latency` is null when no measurement is available yet (e.g. the
        proxy is not active, or it has not been sampled since coming online).
      operationId: PingProxy
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProxyLatency'
          description: The proxy's latest latency reading.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - UserIDHeader: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun();


            const response = await
            client.connect.proxies.ping('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');


            console.log(response.latency);
        - lang: Python
          source: |-
            from mobilerun_sdk import Mobilerun

            client = Mobilerun()
            response = client.connect.proxies.ping(
                "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(response.latency)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient()\n\tresponse, err := client.Connect.Proxies.Ping(context.TODO(), \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Latency)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud connect:proxies ping \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
components:
  schemas:
    ProxyLatency:
      description: The latest cached latency reading for a proxy.
      properties:
        latency:
          allOf:
            - $ref: '#/components/schemas/LatencySample'
          description: The latest reading, or null if none has been taken yet.
          nullable: true
        proxyId:
          format: uuid
          type: string
      required:
        - proxyId
        - latency
      type: object
    LatencySample:
      description: An aggregated latency measurement taken through the proxy.
      properties:
        avgMs:
          description: Mean round-trip time over successful probes, in milliseconds.
          type: integer
        jitterMs:
          description: >-
            Round-trip time spread (max - min) over successful probes, in
            milliseconds.
          type: integer
        maxMs:
          description: Maximum round-trip time over successful probes, in milliseconds.
          type: integer
        measuredAt:
          description: When this measurement was taken.
          format: date-time
          type: string
        minMs:
          description: Minimum round-trip time over successful probes, in milliseconds.
          type: integer
        packetLoss:
          description: >-
            Fraction of probes that failed, 0..1 (1 means the proxy was
            unreachable; rtt fields are 0).
          type: number
        samples:
          description: Number of probes taken in this measurement.
          type: integer
        target:
          description: The host:port the latency was measured against, through the proxy.
          type: string
      required:
        - target
        - samples
        - minMs
        - avgMs
        - maxMs
        - jitterMs
        - packetLoss
        - measuredAt
      type: object
    ErrorResponse1:
      description: A Problem Details (RFC 7807-style) error response.
      properties:
        detail:
          description: Human-readable explanation of this occurrence.
          type: string
        errors:
          description: Per-input errors, when applicable.
          items:
            $ref: '#/components/schemas/ErrorDetail1'
          type: array
        status:
          description: HTTP status code.
          type: integer
        title:
          description: Short, human-readable summary of the error type.
          type: string
      required:
        - title
        - status
        - detail
        - errors
      type: object
    ErrorDetail1:
      description: A single error, locating an offending input where applicable.
      properties:
        location:
          description: Path to the offending input, e.g. "body.proxyId".
          type: string
        message:
          description: Human-readable description of this error.
          type: string
        value:
          description: The offending value, when available.
      required:
        - location
        - message
      type: object
  responses:
    Unauthorized:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse1'
      description: The X-User-ID header was missing or invalid.
    NotFound:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse1'
      description: The resource was not found.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Opaque
      description: Bearer token via Authorization header

````