Hi SuiteCRM community,
I can request single entities via API (/api/v8/modules/Accounts/61…0d?fields[Accounts]=name), but for lists (/api/v8/modules/Accounts?fields[Accounts]=name) I get the following response:
{
"errors": [
{
"code": 0,
"title": "Generate JSON API Response exception detected: InvalidArgumentException: Invalid HTTP status code (0)",
"status": 400
},
{
"id": "1",
"links": {
"about": null
},
"status": "200",
"code": 0,
"title": "JSON API Error",
"detail": "JSON API Error occurred.",
"source": {
"pointer": null,
"parameter": null
},
"meta": {
"about": "Exception",
"class": "RuntimeException",
"code": 0
}
}
],
"meta": {
"suiteapi": {
"major": 8,
"minor": 0,
"patch": 0,
"stability": "ALPHA"
}
},
"jsonapi": {
"version": "1.0"
}
}
In the suitecrm.log I see the desired result with all Accounts in the log file, but before there’s an error message:
Wed Jun 12 16:57:52 2019 [115][9527537f-f31e-1c55-a0cf-5981a28334e9][FATAL] Expected data to be a string; received "array"
Wed Jun 12 16:57:52 2019 [115][9527537f-f31e-1c55-a0cf-5981a28334e9][FATAL] [ERROR] [Invalid Payload Response]{"links":[],"data":[{"id":"135a0...4f111","type":"Accounts","attributes":{"name":"H\u00f...G"},"relationships":{"created_by....
The data is the list of all Accounts, so for me it seems OK that data is an array…
Is this a known bug or a misconfiguration on our side?