Hello, i would like to ask, how can i use WHERE in Alfresco API
GET /nodes/{nodeId}/secondary-children
using WHERE and more than one assocType, for example like
where=(assocType='my:type1') or (assocType='my:type2')
If i use AND or OR in WHERE param, result is the same. I't there some possibility how to get two different associations using WHERE? Thanks
I don't know if I get you.
AFAIK a secondary child can be only from assoc type cm:contains and primary=false.
Did you define custom secondary associations?
Thank you for the answer but it's not true. I have custom association in content model like
<child-association name="my:type1"> <title>My Type</title> <source> <mandatory>true</mandatory> <many>true</many> </source> <target> <class>cm:content</class> <mandatory>false</mandatory> <many>true</many> </target> </child-association>
I need to get results for two associations, my:type1 or my:type2 in one request using where condition.
Those are not secondary associations. They are source and target associations.
You need to use these other REST API calls:
GET /nodes/{nodeId}/sources GET /nodes/{nodeId}/targets
Are you sure? And what about this https://api-explorer.alfresco.com/api-explorer/#!/nodes/listSecondaryChildren
As I said before that REST API invocation handles the cm:contains secondary associations.
But if you are not sure, let's wait for someone else that may have deeper knowledge of the API than me.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.