getMetadata | R Documentation |
General utility to get metadata details from DATIM
getMetadata(
end_point,
...,
fields = "name,id",
as_vector = TRUE,
d2_session = dynGet("d2_default_session", inherits = TRUE),
retry = 1,
timeout = 180,
verbose = FALSE,
quiet = TRUE
)
end_point |
string - api endpoint for the metadata of interest e.g. dataElements, organisationUnits. Non-standard evaluation supported. |
... |
- one or more metadata filters specified as a combination of strings and/or character vectors, eg: "name:!eq:ANC", "indicators.name:like:ANC" or c("name:!eq:ANC", "indicators.name:like:ANC"), "id:!in:[a11111111111,b22222222222]" see datimutils::metadataFilter and related helpers |
fields |
- the metadata fields requested as a comma seperated string or character vector, eg: "name, id" or c("name", "id") #' or c("name,id", "code") |
as_vector |
attempt to return an atomic vector when only a single field is requested and returned. Defaults to TRUE. |
d2_session |
the d2Session object, default is "d2_default_session", it will be made upon logining in to datim with loginToDATIM |
retry |
number of times to retry |
timeout |
integer - seconds to wait for a response, default = 180 |
verbose |
return raw content with data |
quiet |
Echo the URL which is called to the console if TRUE. |
the metadata response in json format and flattened
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.