question

maheshpalem-7124 avatar image
0 Votes"
maheshpalem-7124 asked ·

<scomhost>/OperationsManager/data/alert fails from postman

But when I invoke the http://<scomhost>/OperationsManager/data/alert api by passing the authentication from postman I always get the following error
{
"errorMessage": "Your session with the Web console server expired.",
"errorTrace": ""
}

msc-operations-manager-general
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

maheshpalem-7124 avatar image
0 Votes"
maheshpalem-7124 answered ·

Question with full details :-

I have scom2019. Whenever I run the rest api http://<scomhost>/OperationsManager/data/alert from powershell script on the same scom host then I am getting the result.

But when I invoke the http://<scomhost>/OperationsManager/data/alert api by passing the authentication from postman I always get the following error
{
"errorMessage": "Your session with the Web console server expired.",
"errorTrace": ""
}

Am I missing something? Do I need to pass any headers or paramaters or do I need to enable something on scom side to make the rest api work from some other host?

Can you please help to resolve the issue.

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LeonLaude avatar image
0 Votes"
LeonLaude answered ·

Hi @maheshpalem-7124,

I don't know how to use Postman, but to retrieve alert data you will need to specify some criteria as you can see in my PowerShell example over here:
https://thesystemcenterblog.com/2020/07/09/quick-start-scom-rest-api/#311_Retrieve_all_new_alerts

Which SCOM version and build are you running? There is a fix in Update Rollup 1 for SCOM 2019 that fixes an issue with the “Your session with the Web Console server expired."
https://support.microsoft.com/en-us/help/4533415/update-rollup-1-for-system-center-operations-manager-2019


(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)


Best regards,
Leon

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.