---
title: "GET /v1/projects/{projectsId}/deviceSessions"
method: GET
path: "/v1/projects/{projectsId}/deviceSessions"
tags: ["projects"]
---

# GET /v1/projects/{projectsId}/deviceSessions

`GET /v1/projects/{projectsId}/deviceSessions`

## Request

- Base URL: `https://testing.googleapis.com`
- URL: `https://testing.googleapis.com/v1/projects/{projectsId}/deviceSessions`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/cloud-platform`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

GET /v1/projects/{project_id}/deviceSessions Lists device Sessions owned by the project user.

## Path parameters

- `projectsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string
- `filter` string
- `pageSize` integer
- `pageToken` string

## Response `200`

Successful response

- ListDeviceSessionsResponse: A list of device sessions.
  - `deviceSessions` DeviceSession[]: The sessions matching the specified filter in the given cloud project.
    - `activeStartTime` string, google-datetime: Output only. The timestamp that the session first became ACTIVE.
    - `androidDevice` AndroidDevice: A single Android device.
      - `androidModelId` string: Required. The id of the Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options.
      - `androidVersionId` string: Required. The id of the Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options.
      - `locale` string: Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options.
      - `orientation` string: Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options.
    - `createTime` string, google-datetime: Output only. The time that the Session was created.
    - `displayName` string: Output only. The title of the DeviceSession to be presented in the UI.
    - `expireTime` string, google-datetime: Optional. If the device is still in use at this time, any connections will be ended and the SessionState will transition from ACTIVE to FINISHED.
    - `inactivityTimeout` string, google-duration: Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY.
    - `name` string: Optional. Name of the DeviceSession, e.g. "projects/{project_id}/deviceSessions/{session_id}"
    - `state` 'SESSION_STATE_UNSPECIFIED' | 'REQUESTED' | 'PENDING' | 'ACTIVE' | 'EXPIRED' | 'FINISHED' | 'UNAVAILABLE' | 'ERROR': Output only. Current state of the DeviceSession.
    - `stateHistories` SessionStateEvent[]: Output only. The historical state transitions of the session_state message including the current session state.
      - `eventTime` string, google-datetime: Output only. The time that the session_state first encountered that state.
      - `sessionState` 'SESSION_STATE_UNSPECIFIED' | 'REQUESTED' | 'PENDING' | 'ACTIVE' | 'EXPIRED' | 'FINISHED' | 'UNAVAILABLE' | 'ERROR': Output only. The session_state tracked by this event
      - `stateMessage` string: Output only. A human-readable message to explain the state.
    - `ttl` string, google-duration: Optional. The amount of time that a device will be initially allocated for. This can eventually be extended with the UpdateDeviceSession RPC. Default: 15 minutes.
  - `nextPageToken` string: A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.

---

[API](https://skmtc.dev/google/apis/testing.md) - [All operations](https://skmtc.dev/google/apis/testing/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/testing/revisions/fe5d421501fc?raw)
