Reports REST API, Running Report error, Required report parameter "entities" not found and Run report error

I’m trying this API and getting an error.
Here is my report info
image
and i want get report from this but how ??
i try this
image
but not working, my report dont have any parameter
and i try this
image
what exactly entities ???
and i try this
image
how i can get my report ???

My English is not very good, sorry

Hi,

I’m not sure but in the documentation(REST API :: Jmix Documentation) the element ‘entities’ is never mentioned so my guess would be that your REST request body should not contain entities but :

[
{
    "id": "cb090350-2694-e2bb-f5d9-813daa8dc418", 
    "name": "booksAvailability(xlsx)",
    "code": "BOOKS_AVAIL",
    "group": "4e083530-0b9c-11e1-9b41-6bdaa41bff94"
},
{
    "id": "d8c7f4c5-2dd7-c7f1-7286-f8dd286d2603",
    "name": "LiteratureTypes(csv)",
    "group": "4e083530-0b9c-11e1-9b41-6bdaa41bff94"
}

]
json

- report ID,
- report name,
- report system code (if exists),
- group ID.

Hello,

a parameter can be a name:value pair or name:values pair as i see it.
If you want to give a entity over parameter:

  • name=paramterName
  • value=idForTheEntity

For the example the documentation provides:
{parameters: [{name: 'author',value: '4b3a21b0-d6b7-4161-b0b6-55f118fbaac5'}]}
→ This would mean there is a parameter named author for the report which corresponds to some Entity which has as UUID as ID Type.

For your case a with “ENTITY_LIST” you need to specify values:

 {
 	parameters: 
 	[
 		{
 			name: 'authors',
 			values: ['4b3a21b0-d6b7-4161-b0b6-55f118fbaac5', '5x3a21b0-d6b7-4161-b0b6-55f118fbaac5']
 		}
 	]
 }

Best Regrads

PS: Just saw that this question was from 2021 sorry for the necrobump

1 Like