Skip to contents

list_validation_statuses() is the bulk form and the one a pipeline should call; this single-submission accessor exists because update_validation_status() re-reads what it wrote.

Usage

get_validation_status(
  submission_id = NULL,
  asset_id = NULL,
  token = NULL,
  username = NULL,
  password = NULL,
  url = "eu.kobotoolbox.org",
  debug = FALSE
)

Arguments

submission_id

Character or integer. The submission to query.

asset_id

Character. The KoBoToolbox asset id.

token

Character. A KoBoToolbox API token, with or without the Token prefix. Ignored when username is supplied.

username, password

Character. Basic-auth credentials.

url

Character. The KoBoToolbox host.

debug

Logical. Print the request before performing it.

Value

A one-row tibble: submission_id, validation_status, validated_at, validated_by, fetch_error. A submission that has never been validated reports not_validated; fetch_error marks a genuine transport failure, not an absent status. KoBoToolbox answers 404 for the former, which is why kobo_request() does not let httr2 throw on a 4xx — otherwise every unvalidated submission is recorded as a fetch failure.

Examples

if (FALSE) { # \dontrun{
conf <- read_config()
get_validation_status(
  submission_id = "452176760",
  asset_id = conf$ingestion$landings$v3$asset_id,
  username = conf$ingestion$landings$v3$username,
  password = conf$ingestion$landings$v3$password
)
} # }