0

I want to expose a vocabulary to an external server using services module. I have followed this question How to create test_endpoint, and checked every checkbox, and enabled the `REST Server Module.

The only endpoint that I interest is getTree. But I don't know how to compose the URL. I can't find any document describing the detail (please tell me if you know).

  1. Which HTTP method should I use? GET or POST? I think it should be a GET, but I got nothing
  2. how to specify the vid? /taxonomy_vocabulary/[vid]/getTree ? /taxonomy_vocabulary/getTree/[vid] ? or /taxonomy_vocabulary/getTree?vid=[vid]? any other params?

I have try some URL,

GET [endpoint]/taxonomy_vocabulary/getTree will response [false] (what is this mean?)

POST [endpoint]/taxonomy_vocabulary/getTree will response 401 Unauthorized, but whatever I disable or enable the Session Authorization, I got the same response.

2

you must add {"vid":"1234"} in the body of HTTP POST request and add Content-Type in the header request with "application/json"

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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