Skip to content

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).

These endpoints help prevent accidental deletion of media that is in use.

MethodPathPurpose
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).

The plugin shows two in-admin notifications, configured server-side. Two endpoints back the UI:

MethodPathPurpose
GET/api/p2lab-mediaverse/notificationsReturns the current state of the plugin’s notifications. Response: { "incentiveToRating": bool, "notSubscribedFeatures": bool }.
POST/api/p2lab-mediaverse/notification/hideBody: { "name": "incentiveToRating" } or { "name": "notSubscribedFeatures" }. Hides the named notification. Response: { "success": true }.

Notification semantics:

  • incentiveToRatingtrue for the first 21 days after the plugin was installed; encourages the admin to rate the plugin on the Shopware Store. Can be hidden manually.
  • notSubscribedFeaturestrue by default; informs the admin that some features require a subscription that isn’t active. Can be hidden manually.

All error responses follow Shopware’s standard admin error format:

{
"errors": [
{
"code": "...",
"detail": "Human-readable error",
"status": "400"
}
]
}

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.