WCPSS Closure Prediction API

Interactive documentation for the school closure prediction API

Loading API documentation...

Quick Start

Get Prediction:GET /api/prediction

Subscribe:POST /api/subscribe

Base URL:https://iswcpssclosed.com/api

Authentication

Most endpoints are public. Admin endpoints require an API key:

Authorization: Bearer YOUR_API_KEY

Set your API key in the ADMIN_API_KEY environment variable

Response Format

All responses use JSON format. Success and error responses follow standard conventions:

  • 2xx: Successful responses
  • 4xx: Client errors (invalid request)
  • 5xx: Server errors

Rate Limiting

The API currently has no rate limits, but this may change. Monitor response headers:

  • X-RateLimit-Limit
  • X-RateLimit-Remaining
  • X-RateLimit-Reset

About the Prediction

The closure prediction algorithm analyzes real-time weather data from the National Weather Service, including:

  • Snow and ice accumulation forecasts
  • Temperature and dew point analysis
  • Wind speed and visibility conditions
  • Active weather alerts and warnings
  • County-by-county weather breakdown
  • Critical time window identification

The prediction returns a probability (0-100), a recommendation (open/delay/closed), and detailed reasoning for the assessment.

Examples

Get Current Prediction

curl -X GET https://iswcpssclosed.com/api/prediction

{
  "prediction": {
    "probability": 65,
    "recommendation": "delay",
    "confidence": "high",
    "reasoning": [
      "Ice accumulation predicted: 0.5 inches",
      "Temperature dropping below 28°F",
      "Winter Storm Warning in effect"
    ],
    ...
  },
  ...
}

Subscribe to Alerts

curl -X POST https://iswcpssclosed.com/api/subscribe \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.com","phone":"+19195551234"}'

{
  "success": true,
  "message": "Successfully subscribed to WCPSS closure alerts",
  "alreadySubscribed": false
}

Support & Feedback

For issues, feature requests, or technical support, please reach out via the developer's contact page.

For questions about WCPSS closures or policies, contact Wake County Public School System.