How would I create a custom API endpoint with everything but
Essentially, I want an index of all my posts – but I don’t want to query the
body_content. (I’ll query that when I hit the actual page.)
I know I can create a custom API endpoint in my
config folder – but I’m not sure of the correct syntax for this.
I have a custom endpoint that queries unpublished entries:
<? return cockpit('collections')->find('posts', [ 'filter'=>array_merge($this->param('filter', ), ['published'=>false])]); ?>
Would removing the body from the response be similar to this? Essentially, I want to query:
postID, slug, title, and excerpt.