This was caused by an old dataset. It's not clear why the id was an empty string, for new reports it's null but we should fix this issue.
Endpoint //api/entities
Given:
There is a stored report with an empty string ad definition key (not the case for new reports but
When:
I request /api/entities
Then:
I get a 500 response
14:23:04.226 [qtp1170111701-17] ERROR o.c.o.r.p.GenericExceptionMapper - Mapping generic REST error
org.elasticsearch.action.ActionRequestValidationException: Validation Failed: 1: id is missing;
at org.elasticsearch.action.ValidateActions.addValidationError(ValidateActions.java:26)
at org.elasticsearch.action.get.GetRequest.validate(GetRequest.java:115)
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1399)
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1373)
at org.elasticsearch.client.RestHighLevelClient.get(RestHighLevelClient.java:699)
at org.camunda.optimize.service.es.OptimizeElasticsearchClient.get(OptimizeElasticsearchClient.java:140)
at org.camunda.optimize.service.es.reader.EventProcessMappingReader.getEventProcessRoles(EventProcessMappingReader.java:116)
at org.camunda.optimize.service.EventProcessRoleService.getRoles(EventProcessRoleService.java:33)
at org.camunda.optimize.service.security.EventProcessAuthorizationService.isAuthorizedToEventProcess(EventProcessAuthorizationService.java:45)
at org.camunda.optimize.service.security.DefinitionAuthorizationService.isAuthorizedToAccessDefinition(DefinitionAuthorizationService.java:82)
at org.camunda.optimize.service.security.ReportAuthorizationService.isAuthorizedToAccessProcessReportDefinition(ReportAuthorizationService.java:88)
at org.camunda.optimize.service.security.ReportAuthorizationService.isAuthorizedToAccessReportDefinition(ReportAuthorizationService.java:63)
at org.camunda.optimize.service.security.AuthorizedEntitiesService.lambda$getAuthorizedPrivateEntities$1(AuthorizedEntitiesService.java:43)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
Expected:
a response