Generate a API URL
gen_url(
ou_uid,
org_lvl,
org_type = "facility",
value_type = "results",
is_hts = FALSE,
fy_pd = NULL,
baseurl = "https://final.datim.org/"
)
UID for the country, recommend using identify_ouuids()
org hierarchy level, eg facility is level 7 in country X, recommend using identify_levels()
organization type, either facility (default) or community
results (default) or targets
is the API for HTS indicators (HTS_TST or HTS_TST_POS), default = FALSE
fiscal year(s) to cover, default will be current FY if not provided
API base url, default = https://final.datim.org/
if (FALSE) {
#get OU UID
ouuid <- identify_ouuids() %>% dplyr::filter(ou == "Ghana")
#get facility level
faclvl <- identify_levels("Ghana", "facility", username = myuser, password = mypwd())
#gen url
myurl <- gen_url(ouuid, faclvl, org_type = facility) }