packages/appium/docs/en/reference/api/jsonwp.md
The following is a list of legacy JSON Wire Protocol (JSONWP) endpoints supported in Appium.
GET /session/:sessionId
JSONWP documentation: /session/:sessionId
Retrieves the capabilities of the current session.
Appium implements a modified version of this endpoint. If the appium:eventTimings capability is
set to true, the returned result will additionally include the events key, whose value contains
the event history and timings.
!!! warning "Deprecated"
For retrieving capabilities, please use [`getAppiumSessionCapabilities`](./appium.md#getappiumsessioncapabilities).
For retrieving event history, please use [`getLogEvents`](./appium.md#getlogevents).
Capabilities - an object containing the session capabilities, and the event history (if applicable)
GET /session/:sessionId/ime/available_engines
JSONWP documentation: /session/:sessionId/ime/available_engines
Retrieves all IME (input method editor) engines available on the device under test.
!!! warning "Deprecated"
In the future, this endpoint will be moved to the [UiAutomator2 and Espresso drivers](../../ecosystem/drivers.md)
string[] - a list of available IME engines
GET /session/:sessionId/ime/active_engine
JSONWP documentation: /session/:sessionId/ime/active_engine
Retrieves the name of the active IME engine.
!!! warning "Deprecated"
In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers
string - the name of the active IME engine
GET /session/:sessionId/ime/activated
JSONWP documentation: /session/:sessionId/ime/activated
Determines if IME input is available and active.
!!! warning "Deprecated"
In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers
boolean - true if IME is active, otherwise false
POST /session/:sessionId/ime/deactivate
JSONWP documentation: /session/:sessionId/ime/deactivate
Deactivates the currently active IME engine.
!!! warning "Deprecated"
In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers
null
POST /session/:sessionId/ime/activate
JSONWP documentation: /session/:sessionId/ime/activate
Activates an IME engine.
!!! warning "Deprecated"
In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers
| Name | Description | Type |
|---|---|---|
engine | Name of the IME engine to activate | string |
null
GET /session/:sessionId/orientation
JSONWP documentation: /session/:sessionId/orientation
Retrieves the current orientation of the device under test.
string - either PORTRAIT or LANDSCAPE
POST /session/:sessionId/orientation
JSONWP documentation: /session/:sessionId/orientation
Sets the orientation of the device under test.
| Name | Description | Type |
|---|---|---|
orientation | New device orientation. Supported values are PORTRAIT or LANDSCAPE. | string |
null
GET /session/:sessionId/location
JSONWP documentation: /session/:sessionId/location
Retrieves the current location of the device under test.
!!! warning "Deprecated"
Please use driver-specific extension methods such as `mobile: getGeoLocation` or
`mobile: getSimulatedLocation`
Location - an object with the following properties:
| Name | Description | Type |
|---|---|---|
altitude | Altitude of the device location | number |
latitude | Latitude of the device location | number |
longitude | Longitude of the device location | number |
POST /session/:sessionId/location
JSONWP documentation: /session/:sessionId/location
Sets the current location of the device under test.
!!! warning "Deprecated"
Please use driver-specific extension methods such as `mobile: setGeoLocation` or
`mobile: setSimulatedLocation`
| Name | Description | Type |
|---|---|---|
location | New device latitude, longitude and altitude | Location |
null