Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I exposed a custom entity created using ECK and enabled POST request in REST UI. If I create a new entity content in POST request using url pattern shown in REST UI ( something like entity/entity_type/bundle_name), i get an error shown below :
Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException : No route found for "POST /entity/entity_type/bundle_name": Method Not Allowed (Allow: PATCH, DELETE) in
Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest() (line 180 of
vendor/symfony/http-kernel/EventListener/RouterListener.php
There was no problem in creating new Articls or Basic Pages.
Comments
Comment #2
zuhair_akComment #3
zuhair_akI just found out there is another resource api with uri '/admin/structure/eck/entity/entity_name/{entity_name}' has to be enabled. I can get data using GET request now, but still can't get the POST request to create new content, since i get a '403' error now. Anybody has any leads.
Comment #4
zuhair_ak