Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.
Commander
Commander
191 views

REST API HTTP 500 error

Jump to solution

Hello,

When trying to access REST API of SMAX 2020.11 we get HTTP error code 500, except for authentication token generation which works fine.

For example, when trying to create a person:

Type: POST

URL: https://<SMAX Hostname>/rest/<tenant id>/ums/managePersons

Headers: Content-Type : application/json

Cookie : SMAX_AUTH_TOKEN=<generated token>

Body: 

{
     "operation": "CREATE_OR_UPDATE",
     "users": [
         {
             "properties": {
                 "FirstName": "First",
                 "LastName": "Last",
                 "OfficePhoneNumber": "2901",
                 "MobilePhoneNumber": "0500000028",
                 "Upn": "xxxx@xxx",
                 "Email": "xxxx@xxx",
                 "EmployeeNumber" : "123456789"
             }
         }
     ]
 }
 

Response: HTTP Status 500 – Internal Server Error

 

Or trying to access requests:

Type: GET

URL: https://<SMAX Hostname>/rest/<tenant id>/ems/Request?layout=id

Headers: Content-Type : application/json

Cookie : SMAX_AUTH_TOKEN=<generated token>

Response: 

{
    "entities": [],
    "meta": {
        "completion_status": "FAILED",
        "errorDetails": {
            "httpStatus": 500,
            "message": "The server encountered an unexpected condition which prevented it from fulfilling the request",
            "developer_message": "",
            "message_key": "500",
            "message_rb": "locale/platform_errors",
            "message_arguments": []
        },
        "total_count": 320,
        "errorDetailsList": [],
        "errorDetailsMetaList": []
    }
}

We are using a user which has Tenant-Admin role so has access to everything.

Thanks

0 Likes
1 Solution

Accepted Solutions
Commander
Commander

Does this user by chance have the same UPN as a suite-admin account in the same tenant? I noticed similar issues. I was able to receive a token, but the user wasn't able to execute the POST.

Have you tried with another/new tenant admin?

View solution in original post

0 Likes
5 Replies
Micro Focus Expert
Micro Focus Expert

Hi,

 

Try to user following name for the token:

LWSSO_COOKIE_KEY

 

Regards,

Dusko

0 Likes
Commander
Commander

Hi Dusko,

Thanks for the suggestion, tried to change SMAX_AUTH_TOKEN to LWSSO_COOKIE_KEY but the result is still the same.

0 Likes
Vice Admiral Vice Admiral
Vice Admiral

Hi,

you need these 2 header items:

Content-Type: application/json

Cookie: LWSSO_COOKIE_KEY=<auth-token>;TENANTID=<tenant-id>

If this is your first contact with the API I suggest to test your calls with Postman. You might see some more details of the error. In addition you can take a look at the logfile maas_error.log located in .../global-volume/logs/xservices/platform/itom-xruntime-platform-... (not itom-xruntime-platform-offline-...). You have to look into 2 directories, because 2 pods itom-xruntime-platform are up and running.

BR, Volker

0 Likes
Commander
Commander

Does this user by chance have the same UPN as a suite-admin account in the same tenant? I noticed similar issues. I was able to receive a token, but the user wasn't able to execute the POST.

Have you tried with another/new tenant admin?

View solution in original post

0 Likes
Commander
Commander

It actually worked with a newly created user even though the permissions are configured the same. I'll check this issue further and will post an update if the root cause will be found.

Thanks!

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.