This module integrates NASA's DONKI API into Drupal, allowing editors to display space weather notifications. It provides configurable API settings and exposes lightweight JSON endpoints for headless Drupal sites, enabling efficient data fetching and path resolution for frontend frameworks like Next.js.
Space Calendar API integrates NASA's DONKI (Space Weather Database Of Notifications, Knowledge,
Information) API into Drupal through a CMS-configurable paragraph type. No API credentials are ever
hardcoded -- everything is managed through a standard Drupal admin settings form. Designed for
headless Drupal sites running a Next.js frontend, the module also exposes two lightweight JSON
endpoints that the frontend uses to fetch API configuration and resolve path aliases to node types
and UUIDs.
Features
- Adds a Space Calendar paragraph type that editors attach to calendar event nodes
- Admin settings form at /admin/config/services/space-calendar to configure the API base URL, API
key, and cache duration -- no code changes needed to swap providers
- /api/space-calendar/config endpoint serves API credentials and cache settings to a decoupled
frontend
- /api/resolve-path endpoint resolves Drupal path aliases to node type and UUID, enabling Next.js
ISR routing
- CORS headers included on both endpoints for cross-origin frontend requests
- DEMO_KEY supported out of the box for testing without a NASA account
Post-Installation
After enabling the module, go to Administration > Configuration > Web services > Space Calendar API
Settings (/admin/config/services/space-calendar) and enter:
1. API Base URL -- for NASA DONKI: https://api.nasa.gov/DONKI/
2. API Key -- use DEMO_KEY to test (30 requests/hour limit) or get a free key at api.nasa.gov
3. Cache duration -- how long your Next.js frontend caches responses via ISR (default: 3600 seconds)
The Space Calendar paragraph type will automatically appear on any calendar_event content type node.
Attach it from the node edit form and the configured API will power the display.
Additional Requirements
- Drupal 10 or 11
- Paragraphs module
- Entity Reference Revisions module
- A calendar_event content type must exist on your site
- A NASA DONKI API key (free at api.nasa.gov) or use DEMO_KEY for testing
Recommended modules/libraries
This module is purpose-built for headless Drupal with a Next.js frontend. The JSON endpoints follow
Drupal's standard JSON response patterns and require no additional libraries on the Drupal side.
Similar projects
Unlike JSON:API or Decoupled Router, Space Calendar API is narrowly scoped: it provides one
paragraph type for a specific NASA data integration and two thin endpoints optimized for a Next.js
ISR setup. It is not a general-purpose decoupling solution.
Ask your assistant about Space Calendar API
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
- Entity Reference Revisions
- Paragraphs
- node Drupal core
- views Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.0 | Stable | 10–11 | Sep 28, 2026 |