Skip to content

API‐Reference

Anaf Ibn Shahibul edited this page Jul 31, 2026 · 1 revision

API Reference

Base URL: https://wikiforms.toolforge.org/api


🔍 Public Endpoints

1. Health Check

  • Endpoint: GET /test-connection
  • Response:
{
  "status": "online",
  "message": "WikiForms API server running"
}

2. Fetch Form Metadata

  • Endpoint: GET /get-form/{slug}

  • Params: slug (string)

  • Response: Form titles, descriptions, and public metadata.

🔐 Authenticated Endpoints

3. MediaWiki OAuth Initiation

Endpoint: GET /auth/mediawiki

Description: Redirects user to Wikipedia for OAuth 2.0 login.

4. Create / Update Form

Endpoint: POST /save-form

  • Headers: Authorization: Bearer

  • Payload:

{
  "title": "Community Survey",
  "description": "Annual feedback",
  "questions": [...],
  "is_quiz": false
}

5. AI Grading (OpenRouter)

  • Endpoint: POST /grade-response

  • Access: Form Owner

  • Payload: response_id

Clone this wiki locally