REST /api/v1/certification-bloc 5 endpoints
GET /api/v1/certification-bloc/api/v1/certification-bloc

List all certification BLoC state entries

Public

Response Example

{
  "data": [
    {
      "id": "bloc-mentor-42",
      "mentor_id": "mentor-42",
      "cert_status": "active",
      "enrolled_course_ids": [
        "course-cert-renewal-101"
      ],
      "last_event": "RecordRenewalEvent",
      "last_event_at": "2026-03-26T08:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 45
  }
}
GET /api/v1/certification-bloc/api/v1/certification-bloc/:mentorId

Get current CertificationState stream snapshot for a mentor

Public

Response Example

{
  "mentor_id": "mentor-42",
  "cert_status": "active",
  "cert_type": "peer_mentor_level_2",
  "issued_at": "2026-03-01T00:00:00Z",
  "expires_at": "2027-03-01T00:00:00Z",
  "enrolled_course_ids": [
    "course-cert-renewal-101"
  ],
  "event_history": [
    {
      "event": "LoadCertificationEvent",
      "fired_at": "2026-03-26T07:00:00Z"
    },
    {
      "event": "EnrolInCourseEvent",
      "fired_at": "2026-03-26T07:05:00Z"
    }
  ]
}
POST /api/v1/certification-bloc/api/v1/certification-bloc/events

Emit an event into the BLoC (LoadCertificationEvent, RecordRenewalEvent, EnrolInCourseEvent)

Public

Request Example

{
  "mentor_id": "mentor-42",
  "event_type": "EnrolInCourseEvent",
  "payload": {
    "course_id": "course-cert-renewal-101"
  }
}

Response Example

{
  "id": "evt-bloc-0091",
  "mentor_id": "mentor-42",
  "event_type": "EnrolInCourseEvent",
  "payload": {
    "course_id": "course-cert-renewal-101"
  },
  "processed": true,
  "new_state": {
    "cert_status": "active",
    "enrolled_course_ids": [
      "course-cert-renewal-101"
    ]
  },
  "created_at": "2026-03-26T10:00:00Z"
}
PUT /api/v1/certification-bloc/api/v1/certification-bloc/events/:id

Replay or retry a BLoC event

Public

Request Example

{
  "retry": true
}

Response Example

{
  "id": "evt-bloc-0091",
  "retried": true,
  "processed": true,
  "updated_at": "2026-03-26T10:10:00Z"
}
DELETE /api/v1/certification-bloc/api/v1/certification-bloc/events/:id

Remove a BLoC event from history

Public

Response Example

{
  "deleted": true,
  "id": "evt-bloc-0091"
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}