This is what the mobile app would typically need: * single record:
perPage = 1. * latest temporal entry (descending sort on
FLIGHT_DATE, sort = "-FLIGHT_DATE" ).
Here we also make sure not to ask for totals because this improves
performance/speed on the server side,i.e. set skipTotal to
any value.
# only last temporal entry, no totals
ph_list_records(
app = app,
api = "/api/collections/",
collection = collection,
perPage = 1,
sort = "-FLIGHT_DATE",
skipTotal = 1)All (paged) records (two per page, just as an example) and totals.
username <- "[email protected]"
password <- "xyzzy"
# req_dry_run(redact_headers = FALSE)
adm <- ph_authenticate_admin_username_password(
app,
"/api/admins/auth-with-password",
username,
password)You need to know the record ID in order to send a delete request. You
can get all record IDs with a read records request
ph_list_records(), see above.
You need to pass an admin token to do so (in this app at least), so you need to be authenticated first.