API Endpoints

This service exposes the following endpoints as defined in the OpenAPI spec (helloStatementifyApi.yml) and implemented in index.js and server.js:

/api/v1/statementify/health

  • Method: GET
  • Description: Health check endpoint. Returns service status.
  • Response:
    json { "success": true, "data": { "status": "ok" }, "error": null }

/api/v1/statementify/status

  • Method: GET
  • Description: Returns system status info, such as uptime.
  • Response:
    json { "success": true, "data": { "uptime": 123.45 }, "error": null }

/api/v1/statementify/items

  • Method: GET
  • Description: Returns a list of items. Requires Bearer JWT authentication.
  • Security:
  • Header: Authorization: Bearer <token>
  • Responses:
  • 200 OK:
    json { "success": true, "data": [ { "id": 1, "name": "Pipe Wrench" }, { "id": 2, "name": "Flow Meter" } ], "error": null }
  • 401 Unauthorized:
    json { "success": false, "data": null, "error": "Unauthorized" }

/api/v1/statementify/docs

  • Method: GET
  • Description: Serves Swagger UI for the API.

/api/v1/statementify/docs/raw

  • Method: GET
  • Description: Returns the raw OpenAPI YAML specification.

See OpenAPI Spec for full details.