05-26-2015 05:52 AM
I am trying to get a content using REST APIs described here. But getting error "Failed to get document 7fc1cb55-0ce6-4a09-bbff-123cfb6cfb79".
In the logs I am getting this exception:
org.nuxeo.ecm.core.api.ClientException: Failed to get document 7fc1cb55-0ce6-4a09-bbff-123cfb6cfb79
Caused by: org.nuxeo.ecm.core.api.DocumentException: Unknown document type: content at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.newDocument(SQLSession.java:656)
The exact GET request I am making is http://localhost:8080/nuxeo/site/api/v1/id/7fc1cb55-0ce6-4a09-bbff-123cfb6cfb79
The content table does have a content with id "7fc1cb55-0ce6-4a09-bbff-123cfb6cfb79".
Any idea what is going wrong here? I am using Nuxeo 6.0 Community Edition.
05-26-2015 11:15 AM
The content
table may have something with id
7fc1cb55-0ce6-4a09-bbff-123cfb6cfb79, but it's a complex property id, not a document id.
From a complex property to find the enclosing document you have to find the id in the hierarchy.id
column, find the hierarchy.parentid
on the same line, check that this second id is present in the hierarchy
table with isproperty
= false / 0, then you'll know you have a document id. If it's still a complex property you have to do the parentid
stuff again.
See the structure of the VCS tables in VCS Tables.
05-26-2015 11:15 AM
The content
table may have something with id
7fc1cb55-0ce6-4a09-bbff-123cfb6cfb79, but it's a complex property id, not a document id.
From a complex property to find the enclosing document you have to find the id in the hierarchy.id
column, find the hierarchy.parentid
on the same line, check that this second id is present in the hierarchy
table with isproperty
= false / 0, then you'll know you have a document id. If it's still a complex property you have to do the parentid
stuff again.
See the structure of the VCS tables in VCS Tables.
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.