Get all types of a document type
Hello, I have a question. In my nuxeo db I have an a table, who name is studio_vocabulary_type_doc but I can't access this through sql out of nuxeo. This table contains a diferent types of documents which I would want get all of this types from php but I don't know the correct way for do it.
I want to get all the types of documents that are set in the vocabulary of nuxeo using php
Any idea? thanks
I managed to fix the issue in the client v1.1.1 (if you're using the 1.5-rc1 it's still a WIP).
You should be able to get the entries with the following:
$client = new \Nuxeo\Automation\Client\NuxeoPhpAutomationClient('http://nuxeo:8080/nuxeo/site/automation'); $session = $client->getSession('Administrator', 'Administrator'); $entries = $session->newRequest("Directory.Entries")->set('params', 'directoryName', 'category')->sendRequest();
As pibou Bouvret mentioned, you can use the playground to find out how to get the content of your vocabulary.
Unfortunately the Automation PHP Client is currently only a client for the Command Endpoint (Automation API). Support for the other endpoints are planned as new features with the next releases.
I recommend you create a ticket to our support so we can work on a dedicated patch for your use-case as soon as possible.
Still, if you have a dependency to the Automation PHP Client v1.0.0+, you have access to the Guzzle HTTP Client as a transitive dependency; you could write your own call to the Resources Endpoint to get the content of your vocabulary.
You should have a look at the directory endpoint of the REST API