I imagine this should be a simple question but I cannot find an answer.
I am trying to query using the REST API for one article with my custom field id of THIS_IS_IT ;
The issue is I receive an array of every article no matter how I configure the filter object. What am I doing wrong?
const options = {
url: `${config.cms.endpoint}collections/get/articles?token=${config.cms.apiKey}`,
method: 'POST',
encoding: 'utf-8',
body: JSON.stringify({
filter: { published: true, id: 'THIS_IS_IT' },
sort: { _created: -1 },
}),
resolveWithFullResponse: false,
};
const articles = await request(options);
Thank you so much!