Query Entry Using multiple custom Fields Element API I'm trying to return just one entry from Element API based on custom fields created?

return [
    'endpoints' =&gt; [
        'students.json' =&gt; [
            'elementType' =&gt; 'Entry',
                'criteria' =&gt; [
                    'studentNumber' =&gt; craft()-&gt;request-&gt;getPost('studentNumber'),
                    'email' =&gt; craft()-&gt;request-&gt;getPost('email'),
                    'section' =&gt; 'students',
                ],
                'transformer' =&gt; function(EntryModel $entry) {
                return [
                    'studentNumber' =&gt; $entry-&gt;studentNumber,
                    'email' =&gt; $entry-&gt;email,
                ];
            }
        ]
    ]
];


The Fields are studentNumber and email but it seems to be returning everything. Even when specifying first =&gt; true

Anybody point me in the right direction on this? I'd imagine I'm missing something obvious?

Even hitting the url students.json?studentNumber=001 is returning everything.
getPost() will search the request’s POST data, but you are setting the parameter values as query string params, so you should be using getQuery().

'studentNumber' =&gt; craft()-&gt;request-&gt;getQuery('studentNumber'),
'email' =&gt; craft()-&gt;request-&gt;getQuery('email'),