I use REST often. And I'm posting on this website daily.
Now I need to get the taxonomy items related to a vocabulary, let say tags, which exists.
I activated such endpoint with settings:

  • Methods: GET
  • Format: json
  • Authentication provider: basic_auth

I'm adding the administrator credential for the basic_auth.

When I make the request:

http://mywebsite.dev/entity/taxonomy_vocabulary/tags?_format=json

I get the answer:

{"message":"No route found for \u0022GET \/entity\/taxonomy_vocabulary\/tags\u0022"}The website encountered an unexpected error. Please try again later.<br />

Comments

donnadulcinea created an issue. See original summary.

clemens.tolboom’s picture

Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)

Querying using http://drupal.d8/entity/taxonomy_vocabulary/tags?_format=json I do get a json response

{"uuid":"5a0a892b-7b86-4519-9a0a-39d5ea3dd69e","langcode":"en","status":true,"dependencies":[],"_core":{"default_config_hash":"lO5ziR5dVI1PpEeHZsSOfQ-Y7NWihSDKW8-MMf6uoms"},"name":"Tags","vid":"tags","description":"Use tags to group articles on similar topics into categories.","hierarchy":0,"weight":0}

I used the cookie based Authentication providers and requested the resource through my browser as admin user.

So my guess is your setup / rest UI config is not correct.

donnadulcinea’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Just found the problem.
I had: Content-Type: application/json among the headers.
For some reason this leads to that error.
I don't know if this behavior is desirable, anyway I close as works as designed.

Wim Leers’s picture

Status: Closed (works as designed) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.