Creating an http-endpoint

Shan you are my hero! :sunglasses: I got it, i am able to see my own messages, although no data is shown, but doesn’t matter, it already works.

My mistake was:
https://www.media-junkie.com/http-test/_functions/filter <— wrong-way
https://www.media-junkie.com/_functions/filter <— the right one!!!

But now the question is, why it got no data out of my DB ?

Connection to a similar post (post instead of get).

@shantanukumar847 Ok, i also got the last step.

export function get_filter(request) {
 // First check if a query parameter is present in the request or not
 //if(request.query) {console.log("x1")
        return wixData.query("Team") //remember to put a return here
        .find() //suppress authorization checks
        .then((res) => {console.log(res)
 // Now check the length of the items retrieved
 if(res.items.length > 0) {
 // Items found so return a 200 HTTP response
 let options = {
                     status: 200,
                     body: res.items
                 };
                 return response(options); // similar to ok()
            } else {
 // No items found, return a 404 HTTP response
 let options = {
                     status: 404,
                     body: 'No items found'
                };
                return response(options); // similar to notFound()
            }
        })   
        .catch( (error) => {
 // This will catch any error with the wixdata query
 let options = {
                status: 500,
                body: 'ERROR shit happens again XD.' //error
             };
             return response(options); // similar to serverError()
        });
 /*
    } else {
         // Send a 400 response if no query params are found
         let options = {
            status: 400,
            body: 'No query parameters found XXXXXD'
         };
         return response(options); // similar to badRequest()
    }
    */
}

I deactivated the…

First check if a query parameter is present in the request or not

…since i do not send any params in my query, but i understood what it is used for.

Now, i get my wished results out of DATABASE.

A new door is opened to a new world! :smiling_imp::stuck_out_tongue_winking_eye: