# Images API

Proxy API for GeoServer catalog and WMS/WFS services.

## Ping

**Endpoint**: `GET /api/images/index.php/ping`

Check GeoServer connectivity and version.

### Response

```json
{
  "about": {
    "resource": {
      "@class": "aboutVersion",
      "version": "2.21.0",
      "gitRevision": "...",
      "buildDate": "..."
    }
  }
}
```

### Example

```bash
curl -X GET "https://example.com/api/images/index.php/ping"
```

## Catalog

**Endpoint**: `GET /api/images/index.php/catalog`

List all layers in GeoServer catalog.

### Response

```json
{
  "layers": {
    "layer": [
      {
        "name": "layer1",
        "href": "http://geoserver/rest/layers/layer1.json"
      }
    ]
  }
}
```

## Workspaces

**Endpoint**: `GET /api/images/index.php/workspaces`

List all workspaces.

### Response

```json
{
  "workspaces": {
    "workspace": [
      {
        "name": "workspace1",
        "href": "http://geoserver/rest/workspaces/workspace1.json"
      }
    ]
  }
}
```

## Layers

**Endpoint**: `GET /api/images/index.php/layers`

List all layers (detailed).

### Response

```json
{
  "layers": {
    "layer": [
      {
        "name": "layer1",
        "type": "VECTOR",
        "defaultStyle": { ... },
        "resource": { ... }
      }
    ]
  }
}
```

## WMS Proxy

**Endpoint**: `GET /api/images/index.php/wms`

Proxy WMS requests to GeoServer.

### Parameters

Standard WMS parameters:
- `service`: WMS
- `version`: 1.1.1 or 1.3.0
- `request`: GetMap, GetFeatureInfo, GetCapabilities, etc.
- `layers`: Layer names
- `styles`: Style names
- `bbox`: Bounding box
- `width`, `height`: Image dimensions
- `format`: Output format
- `srs` or `crs`: Spatial reference system

### Example

```bash
curl -X GET "https://example.com/api/images/index.php/wms?service=WMS&version=1.1.1&request=GetMap&layers=layer1&bbox=-180,-90,180,90&width=800&height=600&format=image/png&srs=EPSG:4326"
```

## WFS Proxy

**Endpoint**: `GET /api/images/index.php/wfs`

Proxy WFS requests to GeoServer.

### Parameters

Standard WFS parameters:
- `service`: WFS
- `version`: 1.0.0, 1.1.0, or 2.0.0
- `request`: GetFeature, GetCapabilities, DescribeFeatureType, etc.
- `typeName`: Feature type name
- `outputFormat`: Output format (GML, GeoJSON, etc.)

### Example

```bash
curl -X GET "https://example.com/api/images/index.php/wfs?service=WFS&version=1.1.0&request=GetFeature&typeName=layer1&outputFormat=application/json"
```

## REST Proxy

**Endpoint**: `GET /api/images/index.php/rest/{path}`

Proxy GeoServer REST API requests (read-only by default).

### Example

```bash
curl -X GET "https://example.com/api/images/index.php/rest/layers/layer1.json"
```

## Related Documentation

- [Server API](server.md)
- [Architecture Overview](../architecture.md)

