API Reference
home Home chevron_right API Reference Saturday, 13 Jun 2026  ·  03:43 CAT

API Reference

RESTful JSON API · Defense & Evaluation + Storage microservice

open_in_newLive index
api
Base URL
https://www.earms-defense.oriontechengineering.com/api/index.php
infoNo authentication is required on this service — identity & access are enforced upstream by the IAM Service and API Gateway. Requests and responses are JSON; PUT/DELETE may be tunnelled via _method.
Scheduling
MethodEndpointDescription
POST /defenses/schedule Schedule a defense for a completed project (runs conflict detection).
GET /defenses List/search defenses. Filters: projectId, status, date, participant.
GET /defenses/{id} Full defense detail incl. participants, materials, recordings, scores.
PUT /defenses/{id}/reschedule Reschedule date/venue (re-checks conflicts).
DELETE /defenses/{id} Soft-cancel a defense.
Participants
MethodEndpointDescription
POST /defenses/{id}/participants Add a participant (one external examiner max).
GET /defenses/{id}/participants List participants.
DELETE /defenses/{id}/participants/{userId} Remove participant (blocked after scoring).
PUT /defenses/{id}/attendance Record attendance (present/absent/pending).
Materials
MethodEndpointDescription
POST /defenses/{id}/materials/upload Upload presentation material (versioned).
GET /defenses/{id}/materials List materials.
DELETE /materials/{id} Delete material (only before session).
Session & Recordings
MethodEndpointDescription
POST /defenses/{id}/start-session Begin the session (status → ongoing).
POST /defenses/{id}/end-session End session (stops recording, status → completed).
POST /defenses/{id}/recordings/start Start a recording.
POST /defenses/{id}/recordings/stop Stop the active recording.
POST /defenses/{id}/recordings/save Persist recording to storage.
GET /defenses/{id}/recordings List recordings.
DELETE /defenses/{id}/recordings/{recordingId} Delete a recording.
Scoring
MethodEndpointDescription
POST /defenses/{id}/score Submit a rubric score (locks on submit).
GET /defenses/{id}/scores List submitted scores.
PUT /defenses/{id}/score/{scoreId} Amend a score (blocked after finalization).
Aggregation & Results
MethodEndpointDescription
POST /defenses/{id}/aggregate Compute weighted aggregate (Sup 30 / Int 40 / Ext 30).
POST /defenses/{id}/finalize Lock scores and assign final grade.
GET /defenses/{id}/result Get finalized result with comments.
POST /defenses/{id}/publish Publish result to stakeholders.
Integration & Audit
MethodEndpointDescription
POST /defenses/{id}/send-to-exam-officer Forward final grade to the examination office.
GET /defenses/{id}/audit-log Per-defense audit trail.
Storage Microservice
MethodEndpointDescription
POST /files/upload Upload a file with an access level.
GET /files/{id} Get file metadata + download URL.
DELETE /files/{id} Soft-delete a file.
GET /projects/{id}/files List all files for a project.
Example — schedule a defense
curl -X POST https://www.earms-defense.oriontechengineering.com/api/index.php/defenses/schedule \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": 4,
    "scheduled_at": "2026-09-01 10:00:00",
    "venue": "Senate Hall A",
    "mode": "physical",
    "internal_examiner_ids": [4, 5],
    "external_examiner_id": 6
  }'