-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Querying the files api endpoint will return all files. If your astrobox has been running a while, there could be hundreds of thousands of files returned by the call.
While it is trivial to filter the results once received. It makes the api calls take much longer
HEADER="X-Api-Key:$ASTROBOX_APIKEY"
files=$(curl -s -X GET -H "${HEADER}" "${ASTROBOX_ENDPOINT}/api/files")
filenames=$(echo "$files" | jq -r '.files | sort_by(.date)| reverse | .[].name')
Is there a way to limit the number of results returned from the api?
curl -X GET \
http://astrobox1.local/api/files \
-H 'X-Api-Key: xxxx' \
-H 'cache-control: no-cache'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels