Files
animal/docs/api.md
Scaffolder e8500e3093
All checks were successful
Build and Push to ACR / Build and Push (push) Successful in 1m42s
initial commit
Change-Id: I9a212410892986980114d61a6844b2a6e2c61f38
2026-03-27 15:48:35 +00:00

1.4 KiB

API Reference

Base URL: https://animals.kyndemo.live

Items Resource

GET /api/items

List all items.

Response 200

[
  { "id": 1, "name": "Widget", "description": "A demo widget" }
]

POST /api/items

Create a new item.

Request body

{ "name": "Widget", "description": "A demo widget" }

Response 200

{ "id": 1, "name": "Widget", "description": "A demo widget" }

GET /api/items/{id}

Get a single item.

Path params: id (integer)

Response 200

{ "id": 1, "name": "Widget", "description": "A demo widget" }

Response 500 — item not found (throws NoSuchElementException)


PUT /api/items/{id}

Update an existing item.

Path params: id (integer)

Request body (partial update supported)

{ "name": "Updated Widget" }

Response 200

{ "id": 1, "name": "Updated Widget", "description": "A demo widget" }

DELETE /api/items/{id}

Delete an item.

Response 200

{ "deleted": 1 }

Health & Observability

GET /actuator/health

Spring Boot liveness check.

{ "status": "UP" }

GET /actuator/health/liveness

Kubernetes liveness probe target.

GET /actuator/health/readiness

Kubernetes readiness probe target.

GET /actuator/prometheus

Prometheus-format metrics for scraping by Prometheus or Grafana Agent.