1

I found this identical question but it seems to be dead and none of the answers help me. I also don't have enough reputation to ask in a comment, so, since I'm at the end of my rope with this issue, I'm posting my own question.

I'll preface the issue with what I've done as I have put effort into solving this on my own:

I have the additional operations enabled:

I have the additional operations enabled

I'm using the path /jsonapi/taxonomy_vocabulary/taxonomy_vocabulary.

I'm sending the following request body:

{
  "data": [
    {
      "type": "taxonomy_vocabulary--taxonomy_vocabulary",
      "id": "d0a3157e-58ad-7a43-93ff-a9b76f2273b6",
      "attributes": {
        "name": "Listing Categories",
        "drupal_internal__vid": "listing_categories"
      }
    }
  ]
}

And I get the following response:

{
  "jsonapi": {...},
  "errors": [
    {
      "title": "Method Not Allowed",
      "status": "405",
      "detail": "No route found for \"POST /jsonapi/taxonomy_vocabulary/taxonomy_vocabulary\": Method Not Allowed (Allow: GET, HEAD)",
      "links": {...},
      "source": {...},
      "meta": {...}
    }
  ]
}

I'm having no issues creating nodes, terms, or even paragraphs with POST requests, so I'm at a complete loss as to why POST requests to create vocabularies are being denied. I've tried searching various terms to see if this is a known bug with vocabularies, but I haven't been able to find anything, which leads me to suspect that I'm missing something on my end. Thanks in advance

Lastly, I apologize for the tags. I'm not used to asking on stack exchange, so I might be missing something obvious, but I can't seem to actually add relevant tags such as jsonapi, json, rest, taxonomy, or vocabulary. The only thing close I can add is taxonomy-terms.

1 Answer 1

1

Vocabularies are config entities, and config entities don't currently allow post operations.

See this issue:

https://www.drupal.org/node/2300677

1
  • Ah, that would do it. Thanks. I didn't know the term "config entity" so I never searched for that.
    – JBHUTT09
    Nov 29, 2022 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.