Skip to content

HTTP エンドポイント

NENE2 サンプルアプリが公開するすべてのエンドポイントです。 すべての JSON レスポンスは docs/openapi/openapi.yaml のスキーマに準拠します。

ヘルス・診断

メソッドパス認証レスポンス
GET/healthなし200 { service, status[, checks] } · いずれかのチェックが失敗すると 503
GET/examples/pingなし200 { message }
GET/なし200 { name, description, status } JSON スモークレスポンス

Notes(ノート)

メソッドパス認証成功エラー
GET/examples/notesなし200 リスト422
POST/examples/notesなし201 ノート400, 413, 422
GET/examples/notes/{id}なし200 ノート404, 413
PUT/examples/notes/{id}なし200 ノート400, 404, 413, 422
DELETE/examples/notes/{id}なし204404

Tags(タグ)

メソッドパス認証成功エラー
GET/examples/tagsなし200 リスト422
POST/examples/tagsなし201 タグ400, 413, 422
GET/examples/tags/{id}なし200 タグ404
PUT/examples/tags/{id}なし200 タグ400, 404, 422
DELETE/examples/tags/{id}なし204404

保護されたエンドポイント(マシンクライアント)

メソッドパス認証成功エラー
GET/examples/protectedX-NENE2-API-Key または Bearer トークン200 JSON401

保護されたエンドポイントへのリクエストには、X-NENE2-API-Key ヘッダーまたは Authorization: Bearer <token> ヘッダーのいずれかが必要です。

レスポンス形式

コレクション形式(Notes・Tags 共通):

json
{ "items": [...], "limit": 20, "offset": 0 }

Note オブジェクト:

json
{ "id": 1, "title": "メモのタイトル", "body": "本文" }

Tag オブジェクト:

json
{ "id": 1, "name": "backend" }

エラーレスポンスは RFC 9457 Problem Details に従います。

MIT ライセンスの下で公開されています。