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

mahesh palem 41 Reputation points
2021-01-18T05:26:05.15+00:00

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": ""
}

Operations Manager
Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,419 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. mahesh palem 41 Reputation points
    2021-01-18T05:26:37.6+00:00

    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.

    0 comments No comments

  2. Leon Laude 85,676 Reputation points
    2021-01-18T07:48:21.89+00:00

    Hi @mahesh palem ,

    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

    0 comments No comments