Serverless Function to call Netlify API example?

A general request for a Javascript example/tutorial to create a Netlify serverless function that will call the Netlify API.

My goal:
To create a serverless function that will return all results from a form submission.

I am aware that the correct way to GET this data via Postman is:

https://api.netlify.com/api/v1/forms/:form_id/submissions

However, I do not fully understand how to call this, with bearer token, via a serverless function.

Any example of a serverless function calling the Netlify API would be helpful.

Thank you!

Hey there @insp-dmd, :wave:

Great question! We have two places that I recommend starting when looking into this. The first is our GitHub repo for functions. Take a look and see if the information you are looking for is outlined there!

The second is this doc on our API. Have you seen this already? It outlines what API endpoints are available.

Let me know if this is helpful.