---
title: "POST /mobile/training/session/{id}/extend"
method: POST
path: "/mobile/training/session/{id}/extend"
tags: ["MobileTrainingSession"]
---

# POST /mobile/training/session/{id}/extend

`POST /mobile/training/session/{id}/extend`

Used to extend the expiration time on an existing mobile training session

## Path parameters

- `id` string, required

## Response `200`

The mobile training session that was extended

- MobileTrainingSessionExtensionResult
  - `can_extend_again` boolean — Flag indicating whether or not the session can be extended a subsequent time
  - `extended` boolean — Flag to indicate whether or not the session was allowed to be extended
  - `rejection_reason` 'expired' | 'max_session_length_exceeded' | 'too_early'
  - `session` MobileTrainingSession — State related to a mobile cloud training session
    - `mobile_app_file_id` string, required — id of the mobile app file to install
    - `mobile_device_configuration` MobileDeviceConfiguration, required — Represents a mobile device configuration (model, OS version) for executing mobile tests
      - `created_by_id` string — The ID of the user who created this configuration
      - `created_time` integer — The time at which this configuration was created
      - `cloud_training_hot_pool_support` boolean — Device is included in the cloud training hot pool
      - `cloud_runner_hot_pool_support` boolean — Device is included in the cloud runner hot pool
      - `cloud_training_support` boolean — Device supports cloud training
      - `id` string — The unique ID for this configuration entity
      - `last_updated_by_id` string — The ID of the user who last updated this configuration
      - `last_updated_time` integer — The time at which this configuration was last updated
      - `platform` 'android' | 'ios', required — The mobile platform associated with this object
      - `device_manufacturer` string, required — Device manufacturer (Apple, Google, Samsung)
      - `device_name` string, required — Device display name (iPhone 14, Pixel 7 Pro)
      - `device_id` string — Vendor unique device id (pixel_7_pro)
      - `screen_dimensions` DeviceScreenDimensions, required
        - `height` integer, required — Height (pixels)
        - `width` integer, required — Width (pixels)
      - `os_version` string, required — OS version (16.6.1, Oreo, 12.0)
      - `android_configuration` AndroidDeviceConfiguration — Android specific options
        - `api_level` string — Version of API this device is running (34, 33).
        - `abi` string — Application boundary interface identifies combination of CPU and instruction set (x86, x86_64)
    - `mobile_device_configuration_id` string — The id of the mobile device configuration to use for the training session. If specified, overrides the mobile_device_configuration.
    - `target_runtime_version` string — Custom image ID to use for the training session
    - `workspace_id` string, required — The id of the workspace for the mobile training session
    - `requires_gpu` boolean — true if the mobile training requires a GPU to run
    - `status_cause` string
    - `termination_reason` 'insufficient_quota' | 'scheduling_timeout' | 'session_closed' | 'session_expired' | 'startup_failed' | 'startup_timeout' | 'no_gpus_available' — The reason why a mobile training session was terminated
    - `execution_runner_id` string — The ID of the associated ExecutionRunner, if any
    - `instance` MobileTrainingSessionInstance
      - `display_name` string, required — Friendly name for the instance that is hosting this training session
      - `id` string, required — Globally unique ID for the instance that is hosting this training session (e.g. GCE VM instance number as "gce-<number>", GKE pod ID "gke-<number>", EC2 instance ID as "ec2-<ID>")
      - `ipAddress` string — IP address of the instance that is hosting this training session
      - `mobileTrainingServerPort` integer — Port on the instance where the mobile training server for this session is listening
      - `provenance` 'hot_pool' | 'on_demand' — Indicates where this instance came from
      - `zone` string — Zone where the instance that is hosting this training session is running
    - `status` 'queued' | 'scheduling' | 'provisioning' | 'initializing' | 'ready' | 'terminated', required — Represents the current status of a mobile training session
    - `connect_url` string — URL clients should use to make connections to this mobile cloud training session
    - `created_by_id` string, required — The ID of the client/user who created this mobile training session
    - `created_time` integer, required — Time at which the mobile training session was created
    - `deleted_by_id` string — The ID of the client/user who deleted this mobile training session
    - `deleted_time` integer — Time at which this mobile training session was deleted
    - `expiration_time` integer — Time at which this mobile training session will expire
    - `id` string, required — The mobile training session id
    - `is_active` boolean, required — Whether or not the session is currently active (status != terminated).
    - `is_initializing` boolean — Whether or not the session is currently initializing (status != (READY || TERMINATED))
    - `last_extended_time` integer — Time at which the mobile training session was last extended
    - `last_updated_by_id` string, required — The ID of the client/user who last updated this mobile training session
    - `last_updated_time` integer, required — Time at which the mobile training session was last updated
    - `session_end_time` integer — Time at which the mobile training session entered terminated status
    - `session_key` string, required — Secret key used to authenticate connections to the cloud training session server
    - `session_start_time` integer — Time at which the mobile training session entered ready status
    - `terminated_by_id` string — The ID of the client/user who terminated this mobile training session

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `404` — Entity not found
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
