<!-- Source: https://docs.geopera.com/api-reference/operations/analytics · Markdown for LLMs -->

<!-- AUTO-GENERATED by scripts/generate-api-reference.cjs from the committed OpenAPI spec. Do not edit by hand. -->

# Analytics operations

Analytics over your data and usage.

Each operation below is reachable at `POST /v1/op/{operation_id}` or the resource path `POST /v1/{resource}/{action}`, with a Bearer token (a `gpra_` API key or a session token). Back to the [Operations Reference](/api-reference/operations) index.

## `analytics.band_math`

Apply a custom band-math formula to a COG (statistics JSON or rendered PNG).

| | |
|---|---|
| **Scope** | `analytics:process` |
| **Side-effect** | compute |
| **HTTP** | `POST /v1/op/analytics.band_math`  ·  `POST /v1/analytics/band_math` |
| **Python / TypeScript** | `client.analytics.band_math(…)` |
| **CLI** | `geopera analytics band-math …` |

**Request** — `BandMathInput`

| Field | Type | Required | Description |
|---|---|---|---|
| `cog_url` | string | yes |  |
| `formula` | string | yes |  |
| `bbox` | object | yes |  |
| `sensor` | string | yes |  |
| `max_size` | integer | — |  |
| `output_format` | string | — |  |
| `colormap` | string | — |  |
| `vmin` | number | — |  |
| `vmax` | number | — |  |

**Response** — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

## `analytics.calculate_index`

Calculate a named spectral index (NDVI, NDWI, …) on a COG (stats JSON or PNG).

| | |
|---|---|
| **Scope** | `analytics:process` |
| **Side-effect** | compute |
| **HTTP** | `POST /v1/op/analytics.calculate_index`  ·  `POST /v1/analytics/calculate_index` |
| **Python / TypeScript** | `client.analytics.calculate_index(…)` |
| **CLI** | `geopera analytics calculate-index …` |

**Request** — `CalculateIndexInput`

| Field | Type | Required | Description |
|---|---|---|---|
| `cog_url` | string | yes |  |
| `index_name` | string | yes |  |
| `bbox` | object | yes |  |
| `sensor` | string | yes |  |
| `max_size` | integer | — |  |
| `output_format` | string | — |  |
| `colormap` | string | — |  |

**Response** — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

## `analytics.execute`

Run a registered analytics operation (zonal_stats / time_series / change_detection).

| | |
|---|---|
| **Scope** | `analytics:process` |
| **Side-effect** | read |
| **HTTP** | `POST /v1/op/analytics.execute`  ·  `POST /v1/analytics/execute` |
| **Python / TypeScript** | `client.analytics.execute(…)` |
| **CLI** | `geopera analytics execute …` |

**Request** — `ExecuteRequest`

| Field | Type | Required | Description |
|---|---|---|---|
| `operation` | string | yes | Name of the registered operation |
| `params` | object | yes | Operation-specific parameters |

**Response** — `AnalyticsExecuteOutput`.

## `analytics.index.get`

Detailed info about a single spectral index (+ compatible sensors).

| | |
|---|---|
| **Scope** | `analytics:read` |
| **Side-effect** | read |
| **HTTP** | `POST /v1/op/analytics.index.get`  ·  `POST /v1/analytics/index/get` |
| **Python / TypeScript** | `client.analytics.index.get(…)` |
| **CLI** | `geopera analytics index get …` |

**Request** — `IndexGetInput`

| Field | Type | Required | Description |
|---|---|---|---|
| `index_name` | string | yes |  |

**Response** — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

## `analytics.indices.list`

List spectral indices (optionally filtered by category / sensor compatibility).

| | |
|---|---|
| **Scope** | `analytics:read` |
| **Side-effect** | read |
| **HTTP** | `POST /v1/op/analytics.indices.list`  ·  `POST /v1/analytics/indices/list` |
| **Python / TypeScript** | `client.analytics.indices.list(…)` |
| **CLI** | `geopera analytics indices list …` |

**Request** — `IndicesListInput`

| Field | Type | Required | Description |
|---|---|---|---|
| `category` | string | — |  |
| `sensor` | string | — |  |

**Response** — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

## `analytics.operations.get`

Detailed capabilities of a single analytics operation.

| | |
|---|---|
| **Scope** | `analytics:read` |
| **Side-effect** | read |
| **HTTP** | `POST /v1/op/analytics.operations.get`  ·  `POST /v1/analytics/operations/get` |
| **Python / TypeScript** | `client.analytics.operations.get(…)` |
| **CLI** | `geopera analytics operations get …` |

**Request** — `OperationGetInput`

| Field | Type | Required | Description |
|---|---|---|---|
| `operation_name` | string | yes |  |

**Response** — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

## `analytics.operations.list`

List all registered analytics operations + their input schemas (discovery).

| | |
|---|---|
| **Scope** | `analytics:read` |
| **Side-effect** | read |
| **HTTP** | `POST /v1/op/analytics.operations.list`  ·  `POST /v1/analytics/operations/list` |
| **Python / TypeScript** | `client.analytics.operations.list(…)` |
| **CLI** | `geopera analytics operations list …` |

**Request** — `OperationsListInput`

| Field | Type | Required | Description |
|---|---|---|---|
| `data_type` | string | — |  |

**Response** — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

## `analytics.sensors.list`

List supported sensors and their band mappings.

| | |
|---|---|
| **Scope** | `analytics:read` |
| **Side-effect** | read |
| **HTTP** | `POST /v1/op/analytics.sensors.list`  ·  `POST /v1/analytics/sensors/list` |
| **Python / TypeScript** | `client.analytics.sensors.list(…)` |
| **CLI** | `geopera analytics sensors list …` |

**Request** — `_Empty` _(see the OpenAPI schema for fields)_.

**Response** — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

## `analytics.validate_formula`

Validate a band-math formula (syntax + required bands) without executing it.

| | |
|---|---|
| **Scope** | `analytics:read` |
| **Side-effect** | read |
| **HTTP** | `POST /v1/op/analytics.validate_formula`  ·  `POST /v1/analytics/validate_formula` |
| **Python / TypeScript** | `client.analytics.validate_formula(…)` |
| **CLI** | `geopera analytics validate-formula …` |

**Request** — `ValidateFormulaInput`

| Field | Type | Required | Description |
|---|---|---|---|
| `formula` | string | yes |  |
| `sensor` | string | yes |  |

**Response** — `ValidateFormulaOutput`.
