Drupal API Endpoints
Patterns for custom Drupal API endpoints that use UUIDs instead of sequential IDs: route, controller, and fetch templates, response-shape contracts for installed app clients, webhook handlers, authenticated cURL testing, and the JSON:API filter-access cache-poisoning fix. Use when creating custom routes, AJAX or JSON endpoints for a frontend or mobile app, webhook receivers, or JSON:API filters, and before adding an endpoint, to check whether an existing one already serves the need.
Install
npx skills add grasmash/drupal-claude-skills --skill drupal-api-endpointsgit clone --depth 1 https://github.com/grasmash/drupal-claude-skills.git /tmp/drupal-claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/drupal-claude-skills/skills/drupal-api-endpoints ~/.claude/skills/drupal-api-endpointsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Drupal API Endpoint Patterns
## Critical Rules
**ALWAYS follow these rules for ALL endpoints**:
1. **ALWAYS use UUIDs** - never expose entity IDs.
2. **ALWAYS check for existing endpoints** before creating a new one.
3. **NEVER use the core REST module** - use custom routes.
4. **ALWAYS use JSON** for request/response.
5. **ALWAYS implement access controls** and caching.
6. **Place routes in the correct module** - the module that owns the functionality.
7. **AVOID `/api/*` paths** for custom routes - reserved for JSON:API.
## URL Pattern Convention
**Preferred pattern**: `/MODULE-api/resource/action`
### Examples
```
✅ /achievements-api/unlock # my_achievements module
✅ /scoring-api/ingest # my_scoring module
❌ /api/custom-endpoint # Conflicts with JSON:API
```
## Check for Existing Endpoints
**ALWAYS search before creating**:
```bash
# Search all custom module routes
grep -r "path: '/" web/modules/custom/*/routing.yml
# Search for API patterns
grep -r "path: '/.*-api" web/modules/custom/
# Check by pattern
ddev drush ev "print_r(\Drupal::service('router.route_provider')->getRoutesByPattern('/scoring-api')->all());"
```
## Creating API Endpoints
### Step 1: Define Route (MODULE.routing.yml)Details
- Skill name
drupal-api-endpoints- Repository
- grasmash/drupal-claude-skills
- Path
skills/drupal-api-endpoints/SKILL.md- License
- MIT
- Repo updated
- 1 October 2026
FAQ
What does the Drupal API Endpoints skill do?
Patterns for custom Drupal API endpoints that use UUIDs instead of sequential IDs: route, controller, and fetch templates, response-shape contracts for installed app clients, webhook handlers, authenticated cURL testing, and the JSON:API filter-access cache-poisoning fix. Use when creating custom routes, AJAX or JSON endpoints for a frontend or mobile app, webhook receivers, or JSON:API filters, and before adding an endpoint, to check whether an existing one already serves the need.
How do I install the Drupal API Endpoints skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add grasmash/drupal-claude-skills --skill drupal-api-endpoints. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Drupal API Endpoints popular?
It lives in grasmash/drupal-claude-skills, which has 84 GitHub stars and 5 forks.
Related skills
Acquia Source
84grasmash/drupal-claude-skills
Connect to an Acquia Source ("Source powered by Drupal CMS") site — its JSON:API and MCP endpoints, OAuth2 auth, the @drupal-canvas CLI, and the Canvas Page API deploy workflow. Use when wiring an AI agent or app to a Source CMS site, building/uploading Drupal Canvas Code Components, deploying landing pages via the Page API, or registering the Source MCP server with Claude Code/Cursor.
Canvas Contribution
84grasmash/drupal-claude-skills
Workflow for contributing features and fixes to the Drupal Canvas module on drupal.org while consuming it from a separate project: the two-repository setup, Canvas UI development, issue forks, merge requests, and composer patches. Use when developing a Canvas feature or bug fix intended for upstream, or when moving a local Canvas change onto a drupal.org issue. Extends drupal-contrib-mgmt with Canvas-specific details.
Claude Code MCP Setup
84grasmash/drupal-claude-skills
Add and configure MCP (Model Context Protocol) servers in Claude Code. Use when adding new MCP servers, configuring remote MCP, setting up OAuth MCP servers, troubleshooting MCP connections, or running /mcp diagnostics. Covers stdio, HTTP, and SSE transport types.
Drupal At Your Fingertips
84grasmash/drupal-claude-skills
Drupal 9-11 core API patterns from Selwyn Polit's book "Drupal at Your Fingertips". In-depth references cover services and dependency injection, hooks, events, plugins, entities, Form API, routes and controllers, Twig, caching, AJAX, database queries, configuration, Paragraphs, and Drupal Test Traits; every other chapter (views, blocks, migrate, drush, taxonomy, and more) is linked online. Use when writing or reviewing custom Drupal module or theme code and a worked example or API refresher is needed for one of these subsystems.
Developer Growth Analysis
52ArogyaReddy/ComposioHQ-awesome-claude-skills
Analyzes your recent Claude Code chat history to identify coding patterns, development gaps, and areas for improvement, curates relevant learning resources from HackerNews, and automatically sends a personalized growth report to your Slack DMs.
Drupal Search API
84grasmash/drupal-claude-skills
Search API configuration, boosting strategies, and processor patterns for Drupal. Covers index field types, custom boost processors, number-field and engagement-metric boosting, Solr field-type drift on config export, and reindexing workflows. Use when configuring or debugging a Search API index, tuning relevance or result ranking, writing a custom search processor, or when search results are missing, stale, or ordered unexpectedly.
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.