# Download browser kernel

Download and install browser kernel(s). Supports batch downloading up to 20 kernels per request. The timeout for this operation can be up to approximately 30 minutes; callers should set their timeout to greater than 1805 seconds.\n\nRequires MoreLogin client version **2.61.1** or higher.\n\n### Duplicate Request Handling\n\n- If the same browser type and major version appears multiple times in a single request, only one lookup and download is performed, but each entry gets its own result.\n- Concurrent requests for the same version will join the in-flight task instead of starting a new download.\n- If the requested version is already installed with the latest minor version, the status will be `already_installed`.\n- If an older minor version is installed, it will be updated to the latest available minor version.\n\n### Error Code Reference\n\n| errorCode | Description |\n|---|---|\n| `INVALID_JSON` | Malformed JSON body |\n| `INVALID_REQUEST` | Invalid request structure |\n| `BATCH_LIMIT_EXCEEDED` | `Cores` array exceeds 20 items |\n| `UNSUPPORTED_BROWSER_TYPE` | Unsupported browser type |\n| `INVALID_VERSION` | Invalid version format |\n| `METADATA_LOOKUP_FAILED` | Failed to query kernel metadata |\n| `UNSUPPORTED_VERSION` | Kernel version does not exist or is not supported on this platform |\n| `CLIENT_NOT_READY` | Client not ready |\n| `SDK_NOT_READY` | SDK not initialized |\n| `INSUFFICIENT_DISK_SPACE` | Insufficient disk space |\n| `DOWNLOAD_FAILED` | Download failed |\n| `CHECKSUM_MISMATCH` | MD5 checksum verification failed |\n| `EXTRACTION_FAILED` | Extraction or installation failed |\n| `TIMEOUT` | Operation timed out |\n| `UNKNOWN` | Unknown error |

Endpoint: POST /api/env/core/download
Version: 1.0.0

## Request fields (application/json):

  - `Cores` (array, required)
    List of kernels to download (1–20 items)

  - `Cores.BrowserType` (integer, required)
    Browser type. `1`:Chrome, `2`:Firefox

  - `Cores.Version` (string, required)
    Kernel major version number, e.g. `"124"`, `"146"`

## Response 200 fields (application/json):

  - `code` (integer, required)
    Response code. `0`:all succeeded; `-1`:partial success; `-2`:all failed

  - `msg` (string)
    Request-level error message; normally `null` on success

  - `data` (object, required)

  - `data.total` (integer, required)
    Total number of requested tasks

  - `data.succeeded` (integer, required)
    Number of succeeded tasks (including already installed)

  - `data.failed` (integer, required)
    Number of failed tasks

  - `data.results` (array, required)
    Execution result for each input item, in the same order as the request

  - `data.results.index` (integer)
    Corresponding index in the `Cores` array (0-based)

  - `data.results.browserType` (integer)
    Browser type

  - `data.results.requestedVersion` (string)
    The requested major version

  - `data.results.resolvedVersion` (string)
    The actual full version resolved; returned on success or when metadata is resolved

  - `data.results.status` (string)
    Task status:`installed`, `already_installed`, or `failed`

  - `data.results.source` (string)
    Download source:`downloaded`, `already_installed`, or `joined_in_flight`

  - `data.results.errorCode` (string)
    Stable error classification code returned on failure

  - `data.results.serverCode` (integer)
    Optional. Original business error code from the platform service

  - `data.results.msg` (string)
    Display message; may vary by client language. Do not use for programmatic result checking

