API menu

Go AWS Serverless Starter API (1.0)

Download OpenAPI specification:

License: MIT

Item resource served by two Lambda functions behind a single HTTP API.

The /items routes are authenticated with the X-Api-Key header and are served by the api function. /health and /public/... are open and are served by the public function. Both sit behind the same API Gateway, which is why the public read is namespaced under /public.

Errors carry a JSON body of the shape {"code": "...", "message": "..."}.

items

Authenticated CRUD over the item resource.

List items

A limit outside [1, 100] falls back to 25. The count is the size of the page, not a total: there is no cursor and no total count.

Authorizations:
ApiKeyAuth
query Parameters
limit
integer
Default: 25

Page size, 1 to 100

Responses

Response samples

Content type
application/json
{
  • "count": 0,
  • "items": [
    ]
}

Create an item

Stores an item and returns it with its generated identifier.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Item to create

object

Metadata, 20 entries max. Keys 100 chars, values 1000.

name
required
string <= 200 characters

Name is required, trimmed, 200 chars max.

tags
Array of strings <= 20 items [ items <= 50 characters ]

Tags, 20 max, 50 chars each.

Responses

Request samples

Content type
application/json
{
  • "metadata": {
    },
  • "name": "first item",
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "createdAt": "2026-08-27T10:00:00Z",
  • "id": "550e8400-e29b-41d4-a716-446655440000",
  • "metadata": {
    },
  • "name": "first item",
  • "tags": [
    ]
}

Delete an item

Deleting an identifier that does not exist is a 404, not a no-op.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Item identifier

Responses

Response samples

Content type
application/json
{
  • "code": "not_found",
  • "message": "item not found"
}

Read an item

Any non-empty identifier is accepted; an unknown one is a 404.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Item identifier

Responses

Response samples

Content type
application/json
{
  • "createdAt": "2026-08-27T10:00:00Z",
  • "id": "550e8400-e29b-41d4-a716-446655440000",
  • "metadata": {
    },
  • "name": "first item",
  • "tags": [
    ]
}

public

Unauthenticated reads, namespaced under /public.

Read an item, unauthenticated

Same payload as GET /items/{id}, without the API key.

path Parameters
id
required
string

Item identifier

Responses

Response samples

Content type
application/json
{
  • "createdAt": "2026-08-27T10:00:00Z",
  • "id": "550e8400-e29b-41d4-a716-446655440000",
  • "metadata": {
    },
  • "name": "first item",
  • "tags": [
    ]
}

health

Liveness, stage and version.

Liveness, stage and version

Answers 200 whenever the function runs. The version identifies the deployed build; it reads "dev" outside a deployed stage.

Responses

Response samples

Content type
application/json
{
  • "stage": "prod",
  • "status": "ok",
  • "version": "1.2.3+abc1234"
}