API endpoints
Mediaverse exposes a small number of admin HTTP endpoints. They are intended to support the admin UI but can be used for scripting if you need them.
All endpoints require a valid admin session (cookie or Authorization: Bearer … token from /api/oauth/token).
Media usage detection
Section titled “Media usage detection”These endpoints help prevent accidental deletion of media that is in use.
| Method | Path | Purpose |
|---|---|---|
| GET | /api/p2lab-mediaverse/get-media-in-products-usage/{mediaId} | Returns products that use the given media as a video. Response: { "success": true, "products": [...] }. |
| GET | /api/p2lab-mediaverse/get-media-in-cms-usage/{mediaId} | Returns CMS pages whose blocks reference the given media. Response: { "success": true, "cmsPages": [...] } (capped at 25 pages). |
Notifications
Section titled “Notifications”The plugin shows two in-admin notifications, configured server-side. Two endpoints back the UI:
| Method | Path | Purpose |
|---|---|---|
| GET | /api/p2lab-mediaverse/notifications | Returns the current state of the plugin’s notifications. Response: { "incentiveToRating": bool, "notSubscribedFeatures": bool }. |
| POST | /api/p2lab-mediaverse/notification/hide | Body: { "name": "incentiveToRating" } or { "name": "notSubscribedFeatures" }. Hides the named notification. Response: { "success": true }. |
Notification semantics:
incentiveToRating—truefor the first 21 days after the plugin was installed; encourages the admin to rate the plugin on the Shopware Store. Can be hidden manually.notSubscribedFeatures—trueby default; informs the admin that some features require a subscription that isn’t active. Can be hidden manually.
Error envelope
Section titled “Error envelope”All error responses follow Shopware’s standard admin error format:
{ "errors": [ { "code": "...", "detail": "Human-readable error", "status": "400" } ]}Rate limits
Section titled “Rate limits”There are no Mediaverse-specific rate limits — the endpoints inherit your Shopware rate-limit configuration. For high-volume scripting, batch requests through the standard Sync API where possible.