The documentation in the 1.4 API implies that the response for pathways/byTarget should only have 1 hasPart and this should have only 1 exactMatch (both in green is the API docs) but for http://rdf.ebi.ac.uk/resource/chembl/target/CHEMBL2096668 there are multiple hasPart with multiple exactMatch.
Is the documentation or the response wrong?
PS. 1.3 returns the same response
http://rdf.ebi.ac.uk/resource/chembl/target/CHEMBL2096668 is a protein family in chembl, which contains several single proteins. You can see this also in the target information API call.
The issue here is, that it seems that even if the pathway contains only a single protein, all names are returned. So I fear both the documentation and the response are not exactly correct here.
Please be aware that this only happens if you start with a URI which contains several targets. If you start with just one of them (e.g. http://rdf.ebi.ac.uk/resource/chembl/targetcomponent/CHEMBL_TC_1321, which is one component of this family, i.e. a single protein) you retrieve only the correct name.
I think the response is wrong. If the pathway contains the family (for instance when an EC number is used to annotate a GeneProduct) this would be expected. If you query the pathway with the group and it contains only one of the genes it should indeed find the pathway but it should not return the other genes as part of the pathway.
This is in fact what we expect of BridgeDb behaviour in pathway analysis (but I haven't tested this recently). I think these issues will come up when we start to reintegrate BridgeDb code used in the IMS with BridgeDb code used by the other pathway tools. I will mention this discussion also on the BridgeDb discussion list. Since it is clearly related.