dhis2_datasets: Get all currently available datasets from a DHIS2 server.

View source: R/dhis2_datasets.R

dhis2_datasetsR Documentation

Get all currently available datasets from a DHIS2 server.

Description

dhis2_datasets queries a DHIS2 server and returns all available datasets.

Usage

dhis2_datasets(api_url, username, password)

Arguments

api_url

the URL of the DHIS2 api. Usually it is the server URL ending with "/api/"

username

the username required to access the DHIS2 server.

password

the password required to access the DHIS2 server.

Value

A list with the unique id and names of each available dataset.

Warning

A Internet connection is needed to use this function.

Watch out for hardcoded login and password.

Examples

## Not run: 
# Demo available at https://play.dhis2.org/demo/
library("r-epigraphhub")
api_url <- "https://play.dhis2.org/demo/api/"
username <- "admin"
password <- "district"
datasets <- dhis2_datasets(api_url = api_url, username = username, password = password)
datasets

## End(Not run)

thegraphnetwork/r-epigraphhub documentation built on May 23, 2022, 7:45 p.m.