REST API endpoints randomly return 'restful get permission required' despite correct config

Created on 1 July 2025, about 1 month ago
Updated 9 August 2025, 5 days ago

Problem/Motivation

I have implemented a custom REST API at the path /api/CMSDATA_product_aum_and_key_measures, provided by
the plugin custom_aum_rest_resource. I have also noticed the same behavior with REST APIs exported via
Views.

When accessing the endpoint, the following error is intermittently returned:

 Drupal\Core\Http\Exception\CacheableAccessDeniedHttpException: The 'restful get custom_aum_rest_resource' permission is required. in Drupal\Core\Routing\AccessAwareRouter->checkAccess() 

Strangely, this issue is not limited to custom REST plugins — it also affects RESTful Views exports at random. In all
such cases, the issue appears and disappears without any changes to the codebase or configuration, suggesting a
possible caching or access check bug.

Currently, I do not have reliable steps to reproduce this issue. It appears intermittently and is temporarily
resolved without making any direct application-level fixes.

Steps to reproduce

Note: The issue is intermittent and cannot be reproduced reliably.

🐛 Bug report
Status

Active

Version

9.5

Component

views_ui.module

Created by

Live updates comments and jobs are added and updated live.
  • views

    Involves, uses, or integrates with views. In Drupal 8 core, use the “VDC” tag instead.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Drupal 9 is no longer supported. Can the issue be reproduced with Drupal 11?

  • 🇳🇿New Zealand quietone

    Yes, Drupal 9 is no longer supported here. In Drupal core changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies → .
    If you are no longer having this issue, please close this issue and if possible, leave a comment describing how you fixed it, as it may help others with the same issue.

    Since we need to know if this is happening on a supported version of Drupal, I am setting the status to Postponed (maintainer needs more info. If we don't receive additional information to help with the issue, it may be closed after three months.

Production build 0.71.5 2024