{
  "openapi": "3.0.3",
  "info": {
    "title": "Scout Is Elegant Cassandra API",
    "version": "3.13.2",
    "description": "REST API token terikat sekolah; service role asisten_ai."
  },
  "servers": [
    {
      "url": "https://scout.sditmenarakuwait.sch.id/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Opaque token"
      }
    }
  },
  "paths": {
    "/peserta": {
      "get": {
        "summary": "GET peserta",
        "operationId": "get_peserta",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      },
      "post": {
        "summary": "POST peserta",
        "operationId": "post_peserta",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "dry_run",
            "schema": {
              "type": "boolean"
            },
            "description": "Periksa perubahan tanpa menyimpan"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/peserta/{id}": {
      "get": {
        "summary": "GET peserta/{id}",
        "operationId": "get_peserta_id",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      },
      "patch": {
        "summary": "PATCH peserta/{id}",
        "operationId": "patch_peserta_id",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "dry_run",
            "schema": {
              "type": "boolean"
            },
            "description": "Periksa perubahan tanpa menyimpan"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/peserta/duplikat-nis": {
      "get": {
        "summary": "GET peserta/duplikat-nis",
        "operationId": "get_peserta_duplikat_nis",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      }
    },
    "/peserta/{id}/nonaktifkan": {
      "patch": {
        "summary": "PATCH peserta/{id}/nonaktifkan",
        "operationId": "patch_peserta_id_nonaktifkan",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "dry_run",
            "schema": {
              "type": "boolean"
            },
            "description": "Periksa perubahan tanpa menyimpan"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/pembina": {
      "get": {
        "summary": "GET pembina",
        "operationId": "get_pembina",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      },
      "post": {
        "summary": "POST pembina",
        "operationId": "post_pembina",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "dry_run",
            "schema": {
              "type": "boolean"
            },
            "description": "Periksa perubahan tanpa menyimpan"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/pembina/{id}": {
      "get": {
        "summary": "GET pembina/{id}",
        "operationId": "get_pembina_id",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      },
      "patch": {
        "summary": "PATCH pembina/{id}",
        "operationId": "patch_pembina_id",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "dry_run",
            "schema": {
              "type": "boolean"
            },
            "description": "Periksa perubahan tanpa menyimpan"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/akun": {
      "get": {
        "summary": "GET akun",
        "operationId": "get_akun",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      }
    },
    "/akun/{id}": {
      "get": {
        "summary": "GET akun/{id}",
        "operationId": "get_akun_id",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      },
      "patch": {
        "summary": "PATCH akun/{id}",
        "operationId": "patch_akun_id",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "dry_run",
            "schema": {
              "type": "boolean"
            },
            "description": "Periksa perubahan tanpa menyimpan"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/kegiatan": {
      "get": {
        "summary": "GET kegiatan",
        "operationId": "get_kegiatan",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      }
    },
    "/kegiatan/{id}": {
      "get": {
        "summary": "GET kegiatan/{id}",
        "operationId": "get_kegiatan_id",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      },
      "patch": {
        "summary": "PATCH kegiatan/{id}",
        "operationId": "patch_kegiatan_id",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "dry_run",
            "schema": {
              "type": "boolean"
            },
            "description": "Periksa perubahan tanpa menyimpan"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/presensi-peserta/{activityId}": {
      "get": {
        "summary": "GET presensi-peserta/{activityId}",
        "operationId": "get_presensi_peserta_activityId",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      },
      "patch": {
        "summary": "PATCH presensi-peserta/{activityId}",
        "operationId": "patch_presensi_peserta_activityId",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "dry_run",
            "schema": {
              "type": "boolean"
            },
            "description": "Periksa perubahan tanpa menyimpan"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/presensi-pembina/{date}": {
      "get": {
        "summary": "GET presensi-pembina/{date}",
        "operationId": "get_presensi_pembina_date",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      },
      "patch": {
        "summary": "PATCH presensi-pembina/{date}",
        "operationId": "patch_presensi_pembina_date",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "dry_run",
            "schema": {
              "type": "boolean"
            },
            "description": "Periksa perubahan tanpa menyimpan"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/sku/{memberId}": {
      "get": {
        "summary": "GET sku/{memberId}",
        "operationId": "get_sku_memberId",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      },
      "patch": {
        "summary": "PATCH sku/{memberId}",
        "operationId": "patch_sku_memberId",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "dry_run",
            "schema": {
              "type": "boolean"
            },
            "description": "Periksa perubahan tanpa menyimpan"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/penilaian/{year}/{term}/{memberId}": {
      "get": {
        "summary": "GET penilaian/{year}/{term}/{memberId}",
        "operationId": "get_penilaian_year_term_memberId",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      },
      "patch": {
        "summary": "PATCH penilaian/{year}/{term}/{memberId}",
        "operationId": "patch_penilaian_year_term_memberId",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "dry_run",
            "schema": {
              "type": "boolean"
            },
            "description": "Periksa perubahan tanpa menyimpan"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/dokumentasi": {
      "get": {
        "summary": "GET dokumentasi",
        "operationId": "get_dokumentasi",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      }
    },
    "/dokumentasi/{id}": {
      "get": {
        "summary": "GET dokumentasi/{id}",
        "operationId": "get_dokumentasi_id",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      },
      "patch": {
        "summary": "PATCH dokumentasi/{id}",
        "operationId": "patch_dokumentasi_id",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "dry_run",
            "schema": {
              "type": "boolean"
            },
            "description": "Periksa perubahan tanpa menyimpan"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/dashboard": {
      "get": {
        "summary": "GET dashboard",
        "operationId": "get_dashboard",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil"
          },
          "401": {
            "description": "Token tidak sah"
          },
          "403": {
            "description": "Aksi dilarang"
          },
          "422": {
            "description": "Validasi gagal"
          },
          "429": {
            "description": "Rate limit"
          }
        }
      }
    },
    "/presensi-peserta/libur": {
      "get": {
        "summary": "Daftar hari libur peserta seluruh sekolah",
        "responses": {
          "200": {
            "description": "Peta tanggal dan alasan libur"
          }
        }
      }
    },
    "/presensi-peserta/libur/{date}": {
      "parameters": [
        {
          "name": "date",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "date"
          }
        }
      ],
      "get": {
        "summary": "Lihat status Libur peserta per tanggal",
        "responses": {
          "200": {
            "description": "Hari libur"
          }
        }
      },
      "patch": {
        "summary": "Atur/batalkan Libur seluruh peserta",
        "description": "body: {\"isHoliday\":true,\"reason\":\"Libur ujian\"} atau {\"isHoliday\":false}. Tambahkan ?dry_run=true untuk simulasi. Data H/I/S/A lama tetap tersimpan.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "isHoliday": {
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 300
                  }
                },
                "required": [
                  "isHoliday"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status Libur diperbarui"
          },
          "422": {
            "description": "Tanggal/alasan tidak valid"
          }
        }
      }
    }
  }
}
