Overview of Admin2 Extension Points
developAdmin2 provides several surfaces for plugins to contribute UI elements. Most follow a pattern: a GET endpoint fires an event, plugins append data to that event, and Admin2 renders the results. Web-component payloads (where applicable) are located at admin-next/{subdir}/{slug}.js within the plugin and are served via dedicated script endpoints.
| Surface | Endpoint | Registration event | Web component | Script endpoint |
|---|---|---|---|---|
| Full plugin page | GET /gpm/plugins/{slug}/page | onApiPluginPageInfo | admin-next/pages/{slug}.js | GET /gpm/plugins/{slug}/page-script |
| Custom blueprint field | (automatic discovery) | (filesystem) | admin-next/fields/{type}.js | GET /gpm/plugins/{slug}/field/{type} |
| Sidebar item | GET /sidebar/items | onApiSidebarItems | (none) | — |
| Settings panel | GET /settings/panels | onApiAdminSettingsPanels | (blueprint-mode only) | — |
| Menubar item | GET /menubar/items | onApiMenubarItems | (none) | — |
| Menubar action | POST /menubar/actions/{plugin}/{action} | onApiMenubarAction | — | — |
| Floating widget | GET /floating-widgets | onApiFloatingWidgets | admin-next/widgets/{slug}.js | GET /gpm/plugins/{slug}/widget-script |
| Context panel | GET /context-panels | onApiContextPanels | admin-next/panels/{slug}.js | GET /gpm/plugins/{slug}/panel-script |
| Custom report | GET /reports | onApiGenerateReports | admin-next/reports/{reportId}.js | GET /gpm/plugins/{slug}/report-script/{reportId} |