Display related entries on entry page using ElementAPI
If you want to show all ingredients related to the current entry you'd use the Single Entry Endpoint to pass the entry into the relatedTo param.

'ingredients/&lt;entryId:\d+&gt;.json' =&gt; function($entryId) {
  return [
    'elementType' =&gt; 'Entry',
    'criteria' =&gt; [
        'section' =&gt; 'ingredients',
        'relatedTo' =&gt; $entryId
    ],
    'transformer' =&gt; function(EntryModel $entry) {
      return [
        'title' =&gt; $entry-&gt;title,
        'url' =&gt; $entry-&gt;url
      ];
    },
  ];
},