public class DashboardRestApi extends Object implements org.wso2.msf4j.Microservice
| Modifier and Type | Field and Description |
|---|---|
static String |
API_CONTEXT_PATH |
| Constructor and Description |
|---|
DashboardRestApi(org.wso2.carbon.dashboards.core.DashboardMetadataProvider dashboardDataProvider)
Creates a new dashboard REST API.
|
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
create(org.wso2.msf4j.Request request,
org.wso2.carbon.dashboards.core.bean.DashboardMetadata dashboardMetadata)
Creates a new dashboard.
|
javax.ws.rs.core.Response |
delete(String id,
org.wso2.msf4j.Request request)
Deletes the dashboard corresponding to the supplied ID.
|
javax.ws.rs.core.Response |
get(org.wso2.msf4j.Request request)
Returns a list of available dashboards.
|
javax.ws.rs.core.Response |
get(String id,
org.wso2.msf4j.Request request)
Returns the dashboard for the given ID.
|
javax.ws.rs.core.Response |
getDashboardRoles(String url) |
javax.ws.rs.core.Response |
getRoles() |
javax.ws.rs.core.Response |
getRolesByUsername(String username) |
javax.ws.rs.core.Response |
update(String id,
org.wso2.carbon.dashboards.core.bean.DashboardMetadata dashboardMetadata,
org.wso2.msf4j.Request request)
Updates the dashboard corresponding to the supplied ID with the supplied data.
|
javax.ws.rs.core.Response |
updateDashboardRoles(String url,
org.wso2.msf4j.Request request,
Map<String,List<String>> roles) |
public static final String API_CONTEXT_PATH
public DashboardRestApi(org.wso2.carbon.dashboards.core.DashboardMetadataProvider dashboardDataProvider)
dashboardDataProvider - metadata provider for dhashboards@GET
@Consumes(value="application/json")
@Produces(value="application/json")
@Path(value="/")
public javax.ws.rs.core.Response get(@Context
org.wso2.msf4j.Request request)
@GET
@Consumes(value="application/json")
@Produces(value="application/json")
@Path(value="/{id}")
public javax.ws.rs.core.Response get(@PathParam(value="id")
String id,
@Context
org.wso2.msf4j.Request request)
id - dashboard ID@POST
@Consumes(value="application/json")
@Produces(value="application/json")
@Path(value="/")
public javax.ws.rs.core.Response create(@Context
org.wso2.msf4j.Request request,
org.wso2.carbon.dashboards.core.bean.DashboardMetadata dashboardMetadata)
dashboardMetadata - data for the creating dashboard@PUT
@Consumes(value="application/json")
@Produces(value="application/json")
@Path(value="/{id}")
public javax.ws.rs.core.Response update(@PathParam(value="id")
String id,
org.wso2.carbon.dashboards.core.bean.DashboardMetadata dashboardMetadata,
@Context
org.wso2.msf4j.Request request)
id - ID of the dashboard to updatedashboardMetadata - updating data@DELETE
@Path(value="/{id}")
public javax.ws.rs.core.Response delete(@PathParam(value="id")
String id,
@Context
org.wso2.msf4j.Request request)
id - ID of the dashboard to delete@GET @Path(value="/roles") @Produces(value="application/json") public javax.ws.rs.core.Response getRoles()
@GET
@Path(value="/roles/{username}")
@Produces(value="application/json")
public javax.ws.rs.core.Response getRolesByUsername(@PathParam(value="username")
String username)
@GET
@Path(value="/{url}/roles")
@Produces(value="application/json")
public javax.ws.rs.core.Response getDashboardRoles(@PathParam(value="url")
String url)
Copyright © 2018 WSO2. All rights reserved.