Post a list of records to TSC API endpoint "occ-observation/bulk_create"

tsc_occ_obs_post(
  data,
  obstype = "PhysicalSample",
  chunksize = 100,
  api_url = get_tsc_api_url(),
  api_token = get_tsc_api_token(),
  verbose = get_tsc_verbose()
)

Arguments

data

A tbl_df of occ-observation records

obstype

The model type of the occ-observation model, default: "PhysicalSample".

chunksize

The number of records to post at a time, default: 1000.

api_url

(character) The TSC API URL, default get_tsc_api_url, see tsc_setup

api_token

(character) The TSC API token, default get_tsc_api_token, see tsc_setup

verbose

Whether to show verbose messages. Default: get_tsc_verbose.

Examples

if (FALSE) {
testthat::skip_if_not(tsc_works())
data("phys_sample")
x <- tsc_occ_obs_post(phys_sample,
  obstype = "PhysicalSample",
  chunksize = 10,
  api_url = get_tsc_test_api_url(),
  api_token = get_tsc_test_api_token(),
  verbose = TRUE
)
}