Skip to contents

The function provides a high-level access to APIs based on kobotoolbox. It parses the base URL for the ´api´ and returns the JSON response in a standard format.

Usage

get_asset_id_df(
  api = c("humanitarian_response", "kobotoolbox"),
  auth_type = c("client", "token"),
  auth_key = NULL
)

Arguments

api

(character) The type of API to be used or URL at which the API can be accessed. Can be either: - `humanitarian_response`: "https:://kobo.humanitarianresponse.info" will be used as the base URL (default) - `kobotoolbox`: "https:://https://kf.kobotoolbox.org" will be used as the base URL - `custom`: custom URL. Must at least start with "https://"

auth_type

(character) Two types of authentication are possible: - `client`: use the `auth_key` `user:password` to authenticate to the kobo API - `token`: uses the `token` provided in `auth_key` to authenticate

auth_key

(character) Can either be: - A combination of the kobo and password in format: `user:password` (e.g. 'my_user:my_password') - A kobo API V2 token. See the https://support.kobotoolbox.org/api.html

Value

A data frame with asset IDs, names, type, and deployment status.