Skip to contents

Shared documentation for the read functions

Filtering

The named arguments cover the filters people reach for most. Anything else the endpoint accepts can be passed through ..., where species_id = 4 becomes filter[species_id]=4.

To find out what an endpoint accepts rather than guessing, ask it with spdgt.auth::api_discover():

spdgt.auth::api_discover("telemetry", "/individuals")

That lists every filter, include, sort and pagination option, read from the description the API publishes, so it cannot drift from what the API does.

A filter value understands a small vocabulary: "!Dead" for not equal, "?" for is-null and "!?" for is-not-null, "~elk" for a partial match, ">10" and "<10" for comparisons, and "a,b,c" for any of several values. There is no two-sided comparison — ">a,<b" does not mean between — which is why periods are given as from and to rather than as one string.

Time periods

from and to are both inclusive, and take a Date, a POSIXct, or a string such as "2026-01-01" or "2026-01-01T14:30:00Z". A plain date as to means the end of that day.

The API cannot express both ends of a period in one request, so when you give both, the lower bound is sent to the server and the upper bound is applied to the rows that come back. The result is the same; the cost is that more rows travel than you asked for. Giving only one bound sends exactly that comparison and nothing is trimmed.

Pagination

Reads return every matching record. The API pages at 100, so a read that stopped there would silently drop the rest. Pass pages = list(size = 100) to page deliberately.