From 0235b5c40d3ee36e581b709d6f0a404d49a95130 Mon Sep 17 00:00:00 2001 From: qgarnier Date: Thu, 9 Mar 2023 08:31:44 +0000 Subject: [PATCH] (plugin) apps::controlm::restapi - fix endpoints (#4272) --- src/apps/controlm/restapi/custom/api.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/controlm/restapi/custom/api.pm b/src/apps/controlm/restapi/custom/api.pm index 79c363703..f4fd1f81f 100644 --- a/src/apps/controlm/restapi/custom/api.pm +++ b/src/apps/controlm/restapi/custom/api.pm @@ -145,7 +145,7 @@ sub get_token { $self->settings(); my $content = $self->{http}->request( method => 'POST', - url_path => '/session/login', + url_path => '/automation-api/session/login', query_form_post => $encoded, unknown_status => $self->{unknown_http_status}, warning_status => $self->{warning_http_status}, @@ -193,7 +193,7 @@ sub request_api { $self->settings(); my $token = $self->get_token(); my ($content) = $self->{http}->request( - url_path => $options{endpoint}, + url_path => '/automation-api' . $options{endpoint}, get_param => $get_param, header => ['Authorization: Bearer ' . $token], unknown_status => '', @@ -206,7 +206,7 @@ sub request_api { $self->clean_token(); $token = $self->get_token(); $content = $self->{http}->request( - url_path => $options{endpoint}, + url_path => '/automation-api' . $options{endpoint}, get_param => $get_param, header => ['Authorization: Bearer ' . $token], unknown_status => $self->{unknown_http_status},