(plugin) apps::backup::rubrik::restapi - retrieve token (#3518)
This commit is contained in:
parent
19df1b0b09
commit
94a7374394
|
@ -136,7 +136,8 @@ sub get_token {
|
||||||
) {
|
) {
|
||||||
$self->settings();
|
$self->settings();
|
||||||
my $content = $self->{http}->request(
|
my $content = $self->{http}->request(
|
||||||
url_path => '/api/v1/cluster/me',
|
method => 'POST',
|
||||||
|
url_path => '/api/v1/session',
|
||||||
credentials => 1,
|
credentials => 1,
|
||||||
basic => 1,
|
basic => 1,
|
||||||
username => $self->{api_username},
|
username => $self->{api_username},
|
||||||
|
@ -208,6 +209,7 @@ sub request_api {
|
||||||
$self->settings();
|
$self->settings();
|
||||||
my $creds = $self->credentials();
|
my $creds = $self->credentials();
|
||||||
my ($content) = $self->{http}->request(
|
my ($content) = $self->{http}->request(
|
||||||
|
method => 'GET',
|
||||||
url_path => '/api/internal' . $options{endpoint},
|
url_path => '/api/internal' . $options{endpoint},
|
||||||
get_param => $options{get_param},
|
get_param => $options{get_param},
|
||||||
%$creds
|
%$creds
|
||||||
|
@ -218,6 +220,7 @@ sub request_api {
|
||||||
$self->clean_token();
|
$self->clean_token();
|
||||||
$creds = $self->credentials();
|
$creds = $self->credentials();
|
||||||
$content = $self->{http}->request(
|
$content = $self->{http}->request(
|
||||||
|
method => 'GET',
|
||||||
url_path => '/api/internal' . $options{endpoint},
|
url_path => '/api/internal' . $options{endpoint},
|
||||||
get_param => $options{get_param},
|
get_param => $options{get_param},
|
||||||
%$creds,
|
%$creds,
|
||||||
|
|
Loading…
Reference in New Issue