This function returns the base URL for the DHIS2 API from the provided auth
object, or falls back to the global auth credentials if auth
is not provided.
See also
Other credential functions:
khis_cred()
,
khis_cred_clear()
,
khis_display_name()
,
khis_has_cred()
,
khis_username()
Examples
if (FALSE) { # \dontrun{
# Set the credentials using the global .auth object
khis_cred(username = 'DHIS2 username',
password = 'DHIS2 password',
base_url = 'https://dhis2-instance/api')
# Retrieve the DHIS2 instance API base URL (expect 'https://dhis2-instance/api')
khis_base_url()
# Clear credentials
khis_cred_clear()
# Retrieve the base URL again (expect 'NULL')
khis_base_url()
} # }