Get all the sales invoice details

How to get all the sales Invoice details along with the sales invoice items through an api call. what will be the script for it…!?

Hi,

There are some examples in the docs: https://frappeframework.com/docs/user/en/api/server-calls