For anyone else who lands here - it was nothing to do with the REST APIs directly, there was an issue with permissions (specifically; the IAM Client service user that was making the request wasn’t a member of the correct Authority Class).
Hi,
I have checked the access of the user linked to the IAM client. He does have access to the projections and he does have the permission set for FND_QUICK_REPORTS, but I still don't get any results when calling the service via Postman.
The service is active in API Explorer.
For other web services, there's no problem.
Do you have any ideas for solving this problem?
Hi @SolLudovic, can you share any more about the return from Postman? E.g. is it a 200 status code, but with an empty payload; or is the status code something else?
If it’s a 200 status code, but with an empty empty payload, then it sounds like a permissions error with the IAM client. It might be useful to create a test user with identical permissions to the IAM client user, and see if that test user can view the page that you’re trying to GET?
Hi @al-v ,
Thank you for your replie.
You've put me on the right track to finding the error. It came from the quick report I was trying to retrieve, the query was badly constructed because of the user's language. The user had hard-coded in French the description of an IFS code instead of using the DB value.
After correction, I was able to read and obtain the QR data from Postman.
I have another point in case you've already encountered this problem. I'm now trying to create a new quick report from the POST method but I'm getting error 405 - Method Not Allowed and the following JSON return:
{
"error": {
"code": "ODP_NOT_ALLOWED",
"message": "Illegal operation."
}
}
Would you know where the error might have come from?
Hi @SolLudovic, I’ve never tried creating a Quick Report via the API before so can’t offer much help I’m afraid.
From a few very quick experiments - and assuming you’re using the “QuickReportHandling > Add new entity to QuickReportSet” API - I would guess that it doesn’t like something in the JSON body that you’ve sent in the POST request. E.g. when I tried creating a test report and included the SQL in both the SqlExpression and the Query fields, it threw that error; but the error went away when I removed the “Query” field.
That said - I couldn’t actually get the API to create a new Quick Report, I just got it to throw a different error(!):
{
"error": {
"code": "DATABASE_ERROR",
"message": "Database error occurred. Contact administrator.",
"details": "
{
"code": 20109,
"message": "ORA-20109: QuickReport.UNREACHABLE: Failed to create the entity as it would be unreachable from the current path."
}
]
}
}
In case it helps at all; the minimal JSON body I used was:
{
"QuickReportId": 123456,
"Description": "Testing Quick Report creation from API",
"SqlExpression": "SELECT * FROM QUICK_REPORT",
"QrType": "SQLStatement"
}
This was based on the docs, and the return for the equivalent GET request (“Get entities from QuickResponseSet”). I did try adding in some other fields, in case that was the issue (e.g. “QrTypeDb”, “DefinitionModifiedDate”), but that didn’t help. I suspect the issue may be with that “QuickReportId” field; but I’ve no idea what values IFS would be ok with!