forming a path uisng HTTP path to query databases in Influxdb.

Alberto Perri aperri@REDACTED
Wed Sep 1 19:08:12 CEST 2021

Dear Erlang friends

would any of you know how to create a path to retrieve all databases in influxdb version 1.8.9. I have been trying to modify my copy of  erflux from github to do this. Here is the snippet of code in question

-spec get_databases( Pid :: pid() | atom() ) -> list() | { error, json_parse, json_parse_error_reason() } | { error, status_code() }.
%% @doc Lists available databases.
get_databases(Pid) when is_pid(Pid) orelse is_atom(Pid) ->
  get_( Pid, path( Pid, <<"db">> ) ).

Could anyone please enlighten me what i should add to <<"db">>  in this function  path( Pid, <<"db">> to get all databases. The Pid is the name of the module this code is in e.g.,  erflux_http. You will find erflux at this website

Thanks in advance
  Alberto Perri

More information about the erlang-questions mailing list