cancel
Showing results for 
Search instead for 
Did you mean: 

Get all types of a document type

Domingo_Gonzále
Confirmed Champ
Confirmed Champ

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

5 REPLIES 5

pibou_Bouvret
Elite Collaborator
Elite Collaborator

You should have a look at the directory endpoint of the REST API

http://nuxeo.github.io/api-playground/

Pierre-Gildas_M
Confirmed Champ
Confirmed Champ

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.

Using automation /api/automation/Directory.Entries can do the trick

Indeed you're right, I was thinking about that afterwards.

Pierre-Gildas_M
Confirmed Champ
Confirmed Champ

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();
Getting started

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.