# apigateway-v1 — API Gateway v1 (REST APIs)

A zero-dependency, in-process emulator for AWS API Gateway v1 (classic REST
APIs).

| Property | Value                 |
| -------- | --------------------- |
| Port     | 4715                  |
| Protocol | REST / JSON           |
| Health   | `GET /_parlel/health` |
| Reset    | `POST /_parlel/reset` |

> Separate from `apigateway-v2` (port 4714, HTTP/WebSocket) and the legacy
> `apigateway` stub (port 4579).

## Default connection

```
AWS_ENDPOINT_URL=http://127.0.0.1:4715
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=parlel
AWS_SECRET_ACCESS_KEY=parlel
```

## Supported operations

| Operation        | Path                                                            |
| ---------------- | -------------------------------------------------------------- |
| CreateRestApi    | `POST /restapis` (seeds a root `/` resource)                   |
| GetRestApis      | `GET /restapis`                                                |
| GetRestApi       | `GET /restapis/{id}`                                           |
| DeleteRestApi    | `DELETE /restapis/{id}`                                        |
| CreateResource   | `POST /restapis/{id}/resources/{parentId}`                    |
| GetResources     | `GET /restapis/{id}/resources`                                |
| PutMethod        | `PUT /restapis/{id}/resources/{resourceId}/methods/{m}`        |
| CreateDeployment | `POST /restapis/{id}/deployments`                             |
| CreateStage      | `POST /restapis/{id}/stages`                                  |
| GetStages        | `GET /restapis/{id}/stages`                                   |
| CreateApiKey     | `POST /apikeys`                                               |
| GetApiKeys       | `GET /apikeys`                                                |

## SDK usage example

```ts
import {
  APIGatewayClient,
  CreateRestApiCommand,
  CreateResourceCommand,
} from "@aws-sdk/client-api-gateway";

const apigw = new APIGatewayClient({
  endpoint: "http://127.0.0.1:4715",
  region: "us-east-1",
  credentials: { accessKeyId: "parlel", secretAccessKey: "parlel" },
});

const api = await apigw.send(new CreateRestApiCommand({ name: "my-api" }));
```

## Access via MCP / preview URL

Point any AWS SDK or MCP tool at the allocated preview URL via
`AWS_ENDPOINT_URL`.

## Surface coverage

This emulator faithfully replicates the API surface most application code and agents exercise. Anything below the supported lines is either an intentional design choice for a fast, zero-cost local emulator (✓ By design) or a candidate for a future release (⟳ Roadmap) — never a silent inaccuracy.

Legend: ✅ fully supported · ◐ accepted (stored, not strictly enforced) · ✓ by design · ⟳ on the roadmap.

| Area              | Limitation                                       |
| ----------------- | ------------------------------------------------ |
| Request execution | No actual request routing/invocation             |
| Integrations      | PutIntegration is not implemented                |
| Authorizers       | Not implemented                                  |
| Usage plans       | Not implemented                                  |
| State             | In-memory only; lost on restart                  |
