For the complete documentation index, see llms.txt. This page is also available as Markdown.

Content Types

Read-only endpoints for content types — Django's registry of the models installed in the system. Each record binds an app_label and a model name to a stable integer identifier, so that other parts of the platform can reference a model generically (permissions, generic relations, polymorphic attachments) without a hard link to a specific table.

These endpoints let integration clients enumerate the available models, resolve a model to its numeric content-type identifier, and — through the fields sub-endpoint — introspect a model's fields and relations at runtime.

Core Capabilities

1. Listing & Filtering

  • Retrieve a paginated list of content types.

  • Filter by id (with range lookups), app_label, or model.

  • Order results with the sort parameter, as described under Filtering & Ordering.

2. Retrieval

  • Retrieve a single content type by its identifier.

3. Field Introspection

  • Retrieve the concrete fields, related objects, and many-to-many fields of the model a content type points to, through GET /content_types/{id}/fields/.

Read-only. Only GET (and OPTIONS) are supported. POST, PUT, PATCH, and DELETE are rejected with 405 Method Not Allowed.

Content Type Fields

Field
Type
Description

id

integer

The unique identifier of the content type.

app_label

string

The label of the Django app the model belongs to (e.g. catalog). Up to 100 characters.

model

string

The lowercased model name (e.g. product). Up to 100 characters.

Filtering & Ordering

The list endpoint accepts these filters:

Parameter
Match

id

Exact identifier.

id__gt, id__gte, id__lt, id__lte

Identifier range comparisons.

app_label

Exact app label.

model

Exact model name.

Results can be ordered with the sort parameter on any model field (id, app_label, model); prefix a field with a hyphen for descending order and separate several fields with commas.

Dynamic Settings & Environment Variables

No dynamic settings (dj_dynamic_settings) and no environment variables are read by these endpoints.

Last updated

Was this helpful?