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
https://github.com/gossiperl/erflux/blob/master/src/erflux_http.erl
Thanks in advance
Alberto Perri
aperri@REDACTED
More information about the erlang-questions
mailing list