All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netgrif.application.engine.integration.dashboards.web.DashboardController Maven / Gradle / Ivy

Go to download

System provides workflow management functions including user, role and data management.

There is a newer version: 6.4.0
Show newest version
package com.netgrif.application.engine.integration.dashboards.web;

import com.netgrif.application.engine.integration.dashboards.service.interfaces.IDashboardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Authorization;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/dashboard")
@Api(tags = {"Dashboard"}, authorizations = @Authorization("BasicAuth"))
public class DashboardController {

    @Autowired
    private IDashboardService dashboardService;

    @ApiOperation(value = "Execute Elasticsearch aggregation",
            notes = "The provided aggregation is executed and its result is returned",
            authorizations = @Authorization("BasicAuth"))
    @RequestMapping(value = "/search", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
    public String getAggregationByQuery(@RequestBody String query, @RequestParam("type") String type) {
        return dashboardService.searchByQuery(query, type);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy