Plugins Endpoints

The Plugins endpoints provide plugin definitions for all available plugins in django CMS.

  • This returns all available plugin type definitions with their properties and schemas

  • Plugin definitions include the plugin type identifier, human-readable title, and property definitions

  • This endpoint is useful for understanding what plugins are available and their configuration options

  • It is particularly useful for creating type-safe schemas for your frontend application

  • Schema definitions are based on the ModelSerializer as a default or a CustomSerializer defined in your plugin

Hint

You can automatically generate type-safe schemas for your typescript frontend application using tools like QuickType.

Howto

CMS Reference

Endpoints

List Plugin Definitions

GET /api/plugins/

Get all plugin type definitions available in the CMS.

Response Attributes:

  • plugin_type: Unique identifier for the plugin type

  • title: Human readable name of the plugin

  • type: Schema type

  • properties: Property definitions for the plugin

Query Parameters:

  • preview (boolean, optional): Set to true to preview unpublished content (admin access required)

Example Request:

GET /api/plugins/?preview=true

Example Response:

{
    "plugin_type": "TextPlugin",
    "title": "Text",
    "type": "object",
    "properties": {
        "body": {
            "type": "string",
            "description": "Text content"
        }
    }
}

Note

Use custom serializers to define the properties of your plugin in detail. This also allows a fully typed API response and drastically improves the developer experience.