Skip to content

💡 feat: replace non-W3C endpoints used in Inspector #20880

@eglitise

Description

@eglitise

Is your feature request related to a problem?

Appium Inspector currently relies on two non-W3C endpoints that we'd like to remove in Appium 3:

GET /sessions

Purpose: discover existing sessions and attach to them.

Response format: list of session objects, where each object has id and capabilities keys, for example:

[
  {
    "id":"ba30c6da-c266-4734-8ddb-c16f5bb53e16",
    "capabilities":{ "platformName":"iOS","automationName":"XCUITest","platformVersion":"17.2","deviceName":"iPhone 15" }
  },
  {
    "id":"1441110c-1ece-4e45-abbf-ebf404f45f0a",
    "capabilities":{ "platformName":"Android","automationName":"UiAutomator2" }
  },
  ...
]

GET /session/:sessionId

Purposes:

Response format: object where each entry corresponds to a capability and its value. Additional keys for event timings can also be present, such as commands and event type names, for example:

{
  "platformName":"Android",
  "automationName":"UiAutomator2",
  "commands": [
    {
      "cmd": "click",
      "startTime": 1736092760,
      "endTime": 1736092762
    },
    ...
  ]
}

Describe the solution you'd like.

Both endpoints should be replaced with new W3C-compliant endpoints.

GET /sessions -> GET /appium/sessions

Purpose: same as before - discover existing sessions and attach to them. However, server owners may not want to expose this information, so this functionality should be disabled by default, and only available behind the discover_sessions feature flag.

Response format: same as before (list of session objects, where each object has id and capabilities keys), with a new additional key created. This key is required, and its value should be an integer matching the Unix timestamp (in milliseconds) of the session creation time. For example:

[
  {
    "id":"ba30c6da-c266-4734-8ddb-c16f5bb53e16",
    "created": 1736092760555,
    "capabilities":{ "platformName":"iOS","automationName":"XCUITest","platformVersion":"17.2","deviceName":"iPhone 15" }
  },
  {
    "id":"1441110c-1ece-4e45-abbf-ebf404f45f0a",
    "created": 1736092460555,
    "capabilities":{ "platformName":"Android","automationName":"UiAutomator2" }
  },
  ...
]

GET /session/:sessionId -> GET /session/:sessionId/appium/capabilities

Purpose: retrieve the currently used capabilities while in a session.

Response format: similar to existing format - object where each entry corresponds to a capability and its value. However, event timing information is no longer included. For example:

{
  "platformName":"Android",
  "automationName":"UiAutomator2",
  ...
}

So where does the event timing information go? I can suggest 2 options:

  • Reuse the existing GET /session/:sessionId/appium/events endpoint and extend its response to also include the timing information
  • Create a new endpoint, for example, GET /session/:sessionId/appium/event_timings

In either case, I think that the appium:eventTimings capability should no longer be necessary.

Describe alternatives you've considered.

Any suggested changes to the details above can be discussed in this issue.

Additional context

#19856
#19858

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions