---
title: "POST /v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:reportTelemetry"
method: POST
path: "/v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:reportTelemetry"
tags: ["projects"]
---

# POST /v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:reportTelemetry

`POST /v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:reportTelemetry`

## Request

- Base URL: `https://notebooks.googleapis.com`
- URL: `https://notebooks.googleapis.com/v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:reportTelemetry`
- Auth: one of:
  - 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`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/notebooks`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/notebooks`

Called by the telemetry agent on Workbench Instances to report usage events, such as notebook file actions in JupyterLab. Do not use this method directly. Design doc: go/wbi_telemetry

## Path parameters

- `projectsId` string, required
- `locationsId` string, required
- `instancesId` 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

## Request body

- ReportInstanceTelemetryRequest: Request for a Workbench instance to report usage events.
  - `events` UsageEvent[]: Required. The events to report, in the order they happened. At most 1,000 per request.
    - `agentSessionStart` AgentSessionStart: An AI agent session started on the instance.
      - `agent` 'AGENT_UNSPECIFIED' | 'ANTIGRAVITY': Required. The agent.
      - `surface` 'SURFACE_UNSPECIFIED' | 'TERMINAL' | 'NON_INTERACTIVE' | 'NOTEBOOK_MAGIC': Required. Where the user started the session.
    - `bigqueryFeatureUse` BigQueryFeatureUse: A use of a feature of the BigQuery JupyterLab plugin.
      - `feature` 'FEATURE_UNSPECIFIED' | 'FORMAT_SQL' | 'COPY_DATAFRAME_CODE' | 'COPY_TABLE_ID' | 'COPY_SELECT_STATEMENT' | 'SEARCH' | 'TABLE_PREVIEW' | 'OPEN_DETAILS' | 'OPEN_HISTORY' | 'GENERATE_STATS' | 'OTHER_FEATURE': Required. The feature that was used.
    - `bigqueryJob` BigQueryJob: A query that the BigQuery JupyterLab plugin ran.
      - `cacheHit` boolean: Whether BigQuery answered from its cache of query results.
      - `durationMs` string, int64: Optional. Time from submitting the query until it ended, in milliseconds.
      - `failureReason` 'FAILURE_REASON_UNSPECIFIED' | 'ACCESS_DENIED' | 'NOT_FOUND' | 'INVALID_REQUEST' | 'QUOTA_EXCEEDED' | 'OTHER_FAILURE' | 'RESOURCES_EXCEEDED' | 'RESPONSE_TOO_LARGE' | 'BILLING_NOT_ENABLED' | 'POLICY_VIOLATION' | 'BACKEND_ERROR': Optional. Why the query failed. Set only when it failed.
      - `outcome` 'OUTCOME_UNSPECIFIED' | 'SUCCEEDED' | 'FAILED' | 'CANCELLED' | 'TIMED_OUT': Required. How the query ended.
      - `processedBytes` string, int64: Bytes that BigQuery reported as processed.
      - `ranSelection` boolean: Whether the query editor ran only the selected text.
      - `statementKind` 'STATEMENT_KIND_UNSPECIFIED' | 'SELECT' | 'DML' | 'DDL' | 'SCRIPT' | 'OTHER_STATEMENT': Optional. The kind of statement. Set whatever the outcome when the kind is known.
      - `surface` 'SURFACE_UNSPECIFIED' | 'QUERY_EDITOR' | 'TABLE_STATS': Required. Where in the plugin the query ran.
    - `cellExecution` CellExecution: A notebook cell finished running.
      - `cellTags` string[]: Optional. Tags on the cell that are on a Google-maintained allowlist.
      - `importedPackages` string[]: Optional. Packages that the cell imports and that are on a Google-maintained allowlist.
    - `editingSession` EditingSession: A notebook was open in JupyterLab until the user closed it or left it idle.
      - `durationMs` string, int64: Optional. How long the notebook was open, in milliseconds.
    - `eventTime` string, google-datetime: Required. When the event happened on the instance.
    - `extensionUsage` ExtensionUsage: The user used a JupyterLab extension.
      - `durationMs` string, int64: Optional. How long the user worked in a panel that the extension adds, in milliseconds. Unset when the use was a command.
      - `extensionName` string: Optional. Package name of the extension, when it is on a Google-maintained allowlist.
    - `installedPackages` InstalledPackages: The packages installed in one kernel environment on the instance.
      - `packages` InstalledPackage[]: Optional. Packages whose names are on a Google-maintained allowlist.
        - `manager` 'MANAGER_UNSPECIFIED' | 'PIP' | 'CONDA' | 'R' | 'OTHER_MANAGER': Optional. The package manager that installed the package.
        - `name` string: Optional. The package name.
        - `version` string: Optional. The public release version.
    - `notebookFileAction` NotebookFileAction: A file operation on a notebook (.ipynb) file in JupyterLab.
      - `action` 'ACTION_UNSPECIFIED' | 'CREATE' | 'UPLOAD' | 'COPY' | 'RENAME' | 'SAVE' | 'DELETE' | 'OPEN': Required. The operation.
    - `notebookInventory` NotebookInventory: Number of notebooks on the instance.
      - `notebookCount` integer: Notebook (.ipynb) files under the Jupyter root directory.
    - `resourceUsage` ResourceUsage: CPU, GPU and disk use on the instance over a window of time. Percentages are rounded to whole numbers.
      - `bootDiskTotalBytes` string, int64: Size of the boot disk's filesystem, in bytes.
      - `bootDiskUsedPercent` integer: Highest share of the boot disk's space in use, from 0 to 100.
      - `cpuUtilizationMaxPercent` integer: The highest CPU utilization over a single sample, from 0 to 100.
      - `cpuUtilizationPercent` integer: Share of the time that the vCPUs were busy, from 0 to 100.
      - `dataDiskTotalBytes` string, int64: Size of the data disk's filesystem, in bytes.
      - `dataDiskUsedPercent` integer: Highest share of the data disk's space in use, from 0 to 100.
      - `gpuCount` integer: Number of GPUs sampled. Unset when there are none.
      - `gpuMemoryUsedPercent` integer: Share of GPU memory in use, from 0 to 100, averaged over the GPUs.
      - `gpuUtilizationPercent` integer: GPU utilization, from 0 to 100, averaged over the GPUs.
      - `windowMs` string, int64: Optional. Length of the window, in milliseconds.
    - `runtimeSession` RuntimeSession: A Jupyter Server session ended.
      - `durationMs` string, int64: Optional. How long the session lasted, in milliseconds.
      - `endReason` 'END_REASON_UNSPECIFIED' | 'SHUT_DOWN' | 'SERVER_STOPPED': Optional. Why the session ended.
      - `kernel` Kernel: A kernel.
        - `language` 'LANGUAGE_UNSPECIFIED' | 'PYTHON' | 'R' | 'SCALA' | 'JULIA' | 'OTHER_LANGUAGE': Optional. The kernel's language.
        - `origin` 'ORIGIN_UNSPECIFIED' | 'IMAGE_PROVIDED' | 'USER_CREATED' | 'DATAPROC_CLUSTER' | 'DATAPROC_SERVERLESS' | 'OTHER_REMOTE': Optional. Where the kernel spec comes from.
      - `type` 'TYPE_UNSPECIFIED' | 'NOTEBOOK' | 'CONSOLE' | 'OTHER_TYPE': Optional. What the session connects to the kernel.
    - `saveAttempt` SaveAttempt: JupyterLab tried to save a notebook.
      - `durationMs` string, int64: Optional. Time from the save request until Jupyter Server responded or the request failed, in milliseconds.
      - `failureReason` 'FAILURE_REASON_UNSPECIFIED' | 'NETWORK_ERROR' | 'TIMEOUT' | 'CONFLICT' | 'PERMISSION_DENIED' | 'DISK_FULL' | 'OTHER_FAILURE': Optional. Why the save failed. Set only when it failed.
      - `storageType` 'STORAGE_TYPE_UNSPECIFIED' | 'LOCAL_DISK' | 'GCS_FUSE' | 'NFS' | 'OTHER_STORAGE': Optional. Where the notebook is stored.
      - `succeeded` boolean: Whether the save succeeded.
  - `vmId` string: Required. The VM identity token (a JWT) for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity

## Response `200`

Successful response

- ReportInstanceTelemetryResponse: Response for a Workbench instance's report of usage events.
  - `nextReportDelay` string, google-duration: How long the instance should wait before its next report.

## Changes

- **2026-12-05** `4dfb67434032`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/google/apis/notebooks/changes/v2/projects/:projectsId/locations/:locationsId/instances/:instancesId:reportTelemetry/post.md)

---

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