on 12-14-2023 2:41 PM
Dear Community,
(probably) since applying SP29 for the Landscape Management components (this Monday) we're facing a problem with getting the activity status via REST API with activities/<activityno>?query=fields=items(activityNumber,status)
It worked fine until now. Suddenly we're facing "500 Internal Server Error" responses and find the following error in LaMas java logs: "Cannot process an HTTP request to servlet [lama_api] in [lama-api] web application. For more details on the problem please check traces searching by logId: C000C2AFA09DB07600000005000052A6"
The only trace / log entry we find with this logId is the quoted one and nothing related during the time period it occured.
And as is always the case - the colleague who wrote the script is not available anymore...
Do you have any idea what changed / what's wrong here out of a sudden? The only thing I see in SAP note 3316859 that might refer to this is "The REST API returns an error when invalid query parameters are sent." - but how come this is suddenly invalid when it worked all the time before ... and I don't see any difference in the API reference...
Hopefully you experts can help us here.
Thanks & regards, Marie
Dear all,
problem solved completely: we found out the correct syntax through trial and error - so this (hopefully) works now for all Lama APIs - here are two examples:
activities/<act.No>?fields=activityNumber,status
systems/SystemID.<SID>.SystemHost.<Host>?fields=name,systemUUID
Maybe this might help someone else.
Cheers, Marie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello again,
problem "solved" - or more precisely: workaround implemented. Seems the Lama API just doesn't respond as it used to.
But first of all thank you, Naeem. We didn't get any helpful error message - until we restarted the whole system. After that we received a much more informative error message:
{"status":400,"code":"INVALID_REQUEST","message":"Received unknown query parameters: [query]. REST Method GET /activities/2390601 allows the following query parameters: [embed, fields]","severity":"ERROR"}<br>
Hence using "query" in a query seems to be deprecated, we changed the query to look like this: activities/<activityno>?fields=items(activityNumber,status) ... which, as far as we know, should've worked... but didn't - the response is empty: {}
So we changed our script to simply get all information via activities/<activityno> and cut out the activity status then. Not the most elegant way, but it works for us - for this one script...
We see this behaviour of the API in different queries, like systems, hosts etc. - especially when executed for a single item (system/host/activity...). When executed as a mass query it seems to work.
Anyone else having trouble with this since SP29?
Thanks & cheers, Marie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naeem,
first of all: happy new year 🙂 Sorry for the delay - sickness and holiday season here at the moment...
And yep, it's still an issue...
But why should we restart NetWeaver after applying SPs? I mean, it has just been restarted by SUM. Well, I trust in SUM that it does everything necessary when the patches are applied 😉 but to be save I double checked the SUM logs and I see no issues - deployment without problems and after that system start and restart services were performed without errors or warnings. I just want to understand why you think another restart would change something..?
Best regards, Marie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Is this still an issue? Could it be that you forgot to restart Neweaver after applying the new SP level ?
Cheers,
Naeem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.