12-07-2012 10:53 AM
Hi,
I'm using Nuxeo 5.6. I try to use REST api to get related documents. I use operation Relations.GetRelations with parameters: predicate = References outgoing = true and input: doc:344fad4a-99bf-45b2-85fc-63c45e48093d.
Operation returns empty list of documents although document with this uid has outgoing reference with predicate References. I tried some other operations and they worked so I know how to create correct request. Did someone have similar issue? Does operation Relations.GetRelations work correctly? There is also one additional parameter graphName, what is it's purpose?
Thanks for help.
10-26-2013 10:25 AM
Hi,
did you find an answer? I encounter a similar issue.
Thanks
11-14-2013 12:16 PM
I know this answer is a year late, but I just learned how to do this in 5.8 LTS. The trick is to understand what valid "predicate" values are, e.g. I had to use a DOM inspector on the DM UI to realize that they are actually URIs, here are valid values:
So, to query the relations of a document with the API, do the following:
Your request body should be like this:
{
"input":"/default-domain/workspaces/mydoc",
"context":{},
"params":{
"predicate":"http://purl.org/dc/terms/References",
"outgoing":false
}
}
Notes:
hope that helps!
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.