Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Drupal 11.3.18 — Update released for Drupal core (11.3.18)! Release: Geocoder 8.x-4.38 — Minor update available for module geocoder (8.x-4.38). Release: UI Icons 2.0.1 — Minor update available for module ui_icons (2.0.1). Release: SearchStax Studio – Site Search 1.13.0 — Minor update available for module searchstax (1.13.0). Release: GoogleTag Manager 2.0.6 — Minor update available for module gtm (2.0.6). Release: Contact ajax 3.0.5 — Minor update available for module contact_ajax (3.0.5). Usage Milestone: Svg Image — Module svg_image crossed 100,000 active installs. Release: MCP Sentinel 2.25.3 — Minor update available for module mcp_sentinel (2.25.3). Release: GraphQL Compose Codegen 1.4.3 — Minor update available for module graphql_compose_codegen (1.4.3). Module Revived: Anti-Duplicates 4.3.0 — Module anti_duplicates updated after 13 months of inactivity (4.3.0).

The tdmrep module serves a site's text and data mining (TDM) reservation declaration and its machine-readable policy through Drupal routes. The initial declaration reserves TDM rights for the whole site, and the default policy requires consent before TDM mining.

Requirements

Drupal 11. The module has no dependency on any other contributed module.

Installation

composer require drupal/tdmrep
drush pm:install tdmrep

The module serves both tdmrep.json and tdm-policy.json documents dynamically. It does not need document-root files, a .well-known directory, or a Composer scaffold mapping.

Public endpoints

Both routes are public, accept GET requests, and are unprefixed by Drupal's language negotiation. Their URLs are:

Route Response media type Document /.well-known/tdmrep.json application/json A one-rule JSON array for /, with tdm-reservation set to 1, and an absolute link to /tdm-policy.json. /tdm-policy.json application/ld+json The configured policy JSON object. The installed default is an ODRL Offer using the TDMRep profile and requiring consent for tdm:mine.

The initial root reservation value is fixed at 1. The settings form rejects a rules document unless it is a JSON array containing exactly one rule for / with the integer reservation value 1. The installed policy is a consent-based ODRL Offer using the TDMRep profile, but this is a default rather than a fixed constraint: administrators can customize the policy's contexts, type, profile, permissions, duties, and other JSON object members.

Administration

Visit Configuration > Web services > TDMRep settings at /admin/config/services/tdmrep. Access requires the administer tdmrep permission.

The form stores its values in tdmrep.settings:

  • rules_json: must decode as a JSON array with exactly one / rule and tdm-reservation equal to the integer 1.
  • policy_json: must be a valid JSON object. Its contents are served as configured; the form does not enforce a particular ODRL/TDMRep profile or permission structure.
  • contact_email_override: optional. A non-empty value must be a valid email address. Leave it blank to use the site's configured contact address.

Malformed or non-object policy JSON, invalid rules, or an invalid email prevent the settings from being saved. Values explicitly set in policy_json, including policy and assigner properties, take precedence and are preserved in the response. A missing policy UID and missing properties on an assigner object are filled with absolute URLs from Drupal's trusted route URL generator, system.site:name, and the effective contact email. The contact email uses the non-empty contact_email_override first, then system.site:mail. Administrators are responsible for ensuring that customized policy content has the semantics they intend.

Caching and failures

Successful endpoint responses are public and have a maximum age of one hour (3,600 seconds). Their cache metadata depends on tdmrep.settings and system.site, so configuration changes invalidate cached documents.

If stored configuration cannot produce a valid document, the affected route returns an empty 503 Service Unavailable response with Cache-Control: no-store rather than serving malformed JSON.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Sep 2026
Latest release
8 hours ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.x-dev Dev 11 Sep 29, 2026