khis_base_url | R Documentation |
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.
khis_base_url(auth = NULL)
auth |
(Optional) An auth object containing the DHIS2 credentials. If not provided, the function retrieves the base URL from the global auth object. |
The DHIS2 base URL as a string, or NULL
if no credentials are available.
Other credential functions:
khis_cred()
,
khis_cred_clear()
,
khis_display_name()
,
khis_has_cred()
,
khis_username()
## Not run:
# 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()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.