-
sumeet
- Service Provider
- Posts: 280
- Liked: 54 times
- Joined: Apr 23, 2021 6:40 am
- Full Name: Sumeet P
- Contact:
After upgrade v8.4 Invoke-WebRequest fails
After upgrade v8.4 Invoke-WebRequest fails - I'm still investigating this, but want to check if anyone else has faced this.
We have power-shell scripts that we use for monitoring, by using Invoke-WebRequest.
Below is the snippet code. I know the version is v6, but this works fine for v8.3 and according to doco, previous two versions is supported.
Checked the doco - https://helpcenter.veeam.com/references ... t/tag/Auth
do not see anything that can raise red flags
Anyone else run into this problem?
$apiver = '/v6'
#region: Authenticate
$url = '/Token'
$body = @{
"username" = $username;
"password" = $password;
"grant_type" = "password";
}
$headers = @{
"Content-Type"= "application/x-www-form-urlencoded"
}
$jsonResult = Invoke-WebRequest -Uri $apiUrl$apiver$url -Body $body -Headers $headers -Method Post
After v8.4 upgrade, the above invocation fails with the below error -
Invoke-WebRequest : The remote server returned an error: (403) Forbidden.
We have power-shell scripts that we use for monitoring, by using Invoke-WebRequest.
Below is the snippet code. I know the version is v6, but this works fine for v8.3 and according to doco, previous two versions is supported.
Checked the doco - https://helpcenter.veeam.com/references ... t/tag/Auth
do not see anything that can raise red flags
Anyone else run into this problem?
$apiver = '/v6'
#region: Authenticate
$url = '/Token'
$body = @{
"username" = $username;
"password" = $password;
"grant_type" = "password";
}
$headers = @{
"Content-Type"= "application/x-www-form-urlencoded"
}
$jsonResult = Invoke-WebRequest -Uri $apiUrl$apiver$url -Body $body -Headers $headers -Method Post
After v8.4 upgrade, the above invocation fails with the below error -
Invoke-WebRequest : The remote server returned an error: (403) Forbidden.
-
sumeet
- Service Provider
- Posts: 280
- Liked: 54 times
- Joined: Apr 23, 2021 6:40 am
- Full Name: Sumeet P
- Contact:
Re: After upgrade v8.4 Invoke-WebRequest fails
Checked the Swagger UI and now on the top right, the drop down does not V6 API.
This is listed for v8.3, so with v8.4 V6 API is no longer supported.
The deprecations section does not list this - https://helpcenter.veeam.com/rn/veeam_b ... precations
Usually such deprecations happened with major version upgrade - which we were aware as our API calls have to updated, as they no longer work with v7. But this has been done with a .x release, without any notifications.
But as mentioned in my earlier message, even though it shows /v6, I have tested the invocation with /v8 and it still does not work.
Is this something to do with TLS?
I have checked from swagger API, the same invocation works using curl - will try to testing this using curl from powershell
This is listed for v8.3, so with v8.4 V6 API is no longer supported.
The deprecations section does not list this - https://helpcenter.veeam.com/rn/veeam_b ... precations
Usually such deprecations happened with major version upgrade - which we were aware as our API calls have to updated, as they no longer work with v7. But this has been done with a .x release, without any notifications.
But as mentioned in my earlier message, even though it shows /v6, I have tested the invocation with /v8 and it still does not work.
Is this something to do with TLS?
I have checked from swagger API, the same invocation works using curl - will try to testing this using curl from powershell
-
Polina
- Veeam Software
- Posts: 4026
- Liked: 1031 times
- Joined: Oct 21, 2011 11:22 am
- Full Name: Polina Vasileva
- Contact:
Re: After upgrade v8.4 Invoke-WebRequest fails
Hi Sumeet,
Veeam maintains REST APIs backward compatibility for 2 years after the release. Version 6 was released in March, 2022. Backward compatibility was deprecated in April 2026 - 4 years after release.
You can find REST versioning information in our HelpCenter, and the note on v6 deprecation in the Changelog.
I'd suggest you contacting our support to resolve the invocation issue faster.
Thanks!
Veeam maintains REST APIs backward compatibility for 2 years after the release. Version 6 was released in March, 2022. Backward compatibility was deprecated in April 2026 - 4 years after release.
You can find REST versioning information in our HelpCenter, and the note on v6 deprecation in the Changelog.
I'd suggest you contacting our support to resolve the invocation issue faster.
Thanks!
-
e.rottier
- Enthusiast
- Posts: 40
- Liked: 21 times
- Joined: May 06, 2021 1:45 pm
- Contact:
Re: After upgrade v8.4 Invoke-WebRequest fails
I have an old monitoring server which uses Invoke-WebRequest. I had to use the -UseBasicParsing parameter for it to continue working somehow.
This is because the server still uses an old version of PS (<6). Also see https://learn.microsoft.com/en-us/power ... sicparsing.
Maybe this can help you or someone else reading this.
This is because the server still uses an old version of PS (<6). Also see https://learn.microsoft.com/en-us/power ... sicparsing.
Maybe this can help you or someone else reading this.
-
sumeet
- Service Provider
- Posts: 280
- Liked: 54 times
- Joined: Apr 23, 2021 6:40 am
- Full Name: Sumeet P
- Contact:
Re: After upgrade v8.4 Invoke-WebRequest fails
Even with -UseBasicParsing, my invoke-webrequest does not work.
I'm re-writing the whole code to now work with v8
Hi Polina,
I still feel that the API deprecation should be metioned in the primary release notes of the version.
Regards!!
I'm re-writing the whole code to now work with v8
Hi Polina,
I still feel that the API deprecation should be metioned in the primary release notes of the version.
Regards!!
-
Polina
- Veeam Software
- Posts: 4026
- Liked: 1031 times
- Joined: Oct 21, 2011 11:22 am
- Full Name: Polina Vasileva
- Contact:
Re: After upgrade v8.4 Invoke-WebRequest fails
Hi Sumeet,
I understand it, however, to the best of my knowledge, none of Veeam solutions documents it this way.
I understand it, however, to the best of my knowledge, none of Veeam solutions documents it this way.
Who is online
Users browsing this forum: No registered users and 92 guests