11-30-2016 09:19 AM
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
11-30-2016 10:31 AM
You should have a look at the directory endpoint of the REST API
12-02-2016 11:28 AM
Hi,
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.
12-02-2016 12:52 PM
Using automation /api/automation/Directory.Entries can do the trick
12-02-2016 01:56 PM
Indeed you're right, I was thinking about that afterwards.
12-07-2016 06:15 AM
Hi,
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();
Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.