## Overview
<p align="justify">
This endpoint returns all available remote sensing indices, including both **custom** and **preset** types. You can apply filters based on satellite ID, index type, expression type, or specific index ID. Results are paginated using optional `offset` and `limit` query parameters. Each index object contains detailed metadata, including name, formula, color map, and expression type. The API requires authentication through an API key and responds with structured data or error messages depending on request success.

- Method: `GET`

- URL: `/v0/indices`

- Operation: Retrieve a list of available indices and their metadata

- Authentication Required: Yes

</p>

## Authorization
<p align="justify">
You need the **api key** which you can get from the **API** tab in **Organization Settings**. The api key is required in almost all the commands

```json
Authorization: <YOUR_API_KEY>
```
</p>

## Query Parameters
<p align="justify">

Query parameters are optional filters you can add to customize the response. They help you paginate results (`offset`, `limit`) or narrow them down using filters like `satellite_id`, `type`, `expression_type`, or `index_id`, making it easier to find specific indices efficiently.


| Parameter         | Type     | Required | Default | Description |
|------------------|----------|----------|---------|-------------|
| `offset`         | `integer`| No       | `0`     | Offset for  |
| `limit`          | `integer`| No       | `10`    | Maximum number of results to return. |
| `satellite_id`   | `string` | No       | —       | Filter indices by satellite ID. |
| `type`           | `string` | No       | —       | Filter by index type (`custom` or `preset`). |
| `expression_type`| `string` | No       | —       | Filter by type of expression. |
| `index_id`       | `string` | No       | —       | Filter by a specific index ID. |

</p>

## Path Parameter
<p align="justify">
This endpoint does not require any path parameters.
</p>

## Response
<p align="justify">
The **List all available indices** endpoint returns a `200 OK` response with a list of index objects and pagination details. Each index includes metadata like name, formula, satellite info, and expression type. If the request is malformed (e.g., invalid parameters), a `400 Bad Request` is returned. A `500 Internal Server Error` may occur due to unexpected server issues. All errors include a structured JSON response with a code, message, and optional details for debugging.

### Successful Response – 200 OK

Returns a list of index objects with all related metadata and pagination information regarding the indices

| Field               | Type              | Description |
|---------------------|-------------------|-------------|
| `indices`           | `array`           | List of index objects available to the user or org. |
| `bands`   | `array of string` | List of EO bands used in the index formula. |
| `colormap`| `string`          | Color scheme associated with the index. |
| `created_at` | `string`       | Timestamp of when the index was created. |
| `description`| `string`       | Description of the index and its purpose. |
| `expression` | `string`       | Formula used to compute the index. |
| `expression_type` | `string`  | Type of expression, e.g., `"composite"`. |
| `id`      | `string`          | Unique ID of the index. |
| `lens_satellite_id` | `string` | ID of the satellite associated with the index. |
| `name`    | `string`          | Human-readable name of the index. |
| `org_id`  | `string`          | Organization ID that owns the index. |
| `rescale` | `array`           | Rescale parameters applied to index values. |
| `satellite_name` | `string`    | Name of the satellite. |
| `type`    | `string`          | Indicates if index is `custom` or `preset`. |
| `updated_at` | `string`       | Last update timestamp. |
| `user_id` | `string`          | User ID who created the index. |
| `pagination`        | `object`          | Metadata about  |
| `total`  | `integer`         | Total number of indices available. |
| `offset` | `integer`         | Current offset value. |
| `limit`  | `integer`         | Maximum number of indices returned per request. |


Below is the complete JSON request for listing all indices using the **List indices** endpoint. Customize the values as needed for your search criteria:

```json 200
{
  "indices": [
    {
      "bands": [
        "<string>"
      ],
      "colormap": "<string>",
      "created_at": "<string>",
      "description": "<string>",
      "expression": "<string>",
      "expression_type": "composite",
      "id": "<string>",
      "lens_satellite_id": "<string>",
      "name": "<string>",
      "org_id": "<string>",
      "rescale": [
        123
      ],
      "satellite_name": "<string>",
      "type": "custom",
      "updated_at": "<string>",
      "user_id": "<string>"
    }
  ],
  "pagination": {
    "total": 100,
    "offset": 0,
    "limit": 10
  }
}
```

### Error responses

Occurs when the request is malformed, such as missing or invalid parameters: (**400 - Bad Request and 500 - Internal Server Error**)

```json 400 500
{
  "error": {
    "code": "<string>",
    "details": "<any>",
    "message": "<string>"
  }
}
```
</p>

## How to use the endpoint
<p align="justify">
1. **Construct request:**

    Add optional query parameters like `offset`, `limit`, `satellite_id`, `type`, or `expression_type` to filter or paginate results as needed. No request body is required. Include your API key in the headers for authorization.

2. **Send request:**

    Make the `GET` request to: `https://api.pixxel.space/v0/indices`. Include query parameters in the URL if needed (e.g., `?type=custom&limit=5`).

3. **Examine response:**

    A successful `200 OK` response returns a JSON object with a list of available indices and pagination metadata. Each index includes its name, description, expression, type, and related satellite data. In case of errors (like bad parameters or server issues), you'll receive a structured error message with details and status code.
</p>