How to do this endpoint: /wp-json/acf/v3/pages/2 (Added code snippet)

Has anyone been able to do a handler for the following endpoint or do you have any examples? The endpoint does return correct data in the browser, but not sure how to do this inside frontity. It just says server not found, but the endpoint works in the browser.


export const homeSlideHandler = {
    name: "homeSliderItems",
    priority: 10,
    pattern: "slider/",
    func: async ({ route, state, libraries }) => {

        const { api } = libraries.source;

        const response = await api.get({
            endpoint: "/wp-json/acf/v3/pages/2",

        const items = await response.json();
        const currentPageData =[route];

        Object.assign(currentPageData, {

Thanks in advance!

I got this working in the end, the endpoint was incorrect in the code above. I should of been using:

endpoint: "/acf/v3/pages/2"

1 Like