@Path(value="/apis/dashboards") public class DashboardRestApi extends Object implements org.wso2.msf4j.Microservice
| Constructor and Description |
|---|
DashboardRestApi() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(org.osgi.framework.BundleContext bundleContext) |
javax.ws.rs.core.Response |
create(org.wso2.carbon.dashboards.core.bean.DashboardMetadata dashboardMetadata)
Creates a new dashboard.
|
protected void |
deactivate(org.osgi.framework.BundleContext bundleContext) |
javax.ws.rs.core.Response |
delete(String id)
Deletes the dashboard corresponding to the supplied ID.
|
javax.ws.rs.core.Response |
get()
Returns a list of available dashboards.
|
javax.ws.rs.core.Response |
get(String id)
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) |
protected void |
setMetadataProvider(org.wso2.carbon.dashboards.core.DashboardMetadataProvider dashboardDataProvider) |
protected void |
unsetMetadataProvider(org.wso2.carbon.dashboards.core.DashboardMetadataProvider dashboardDataProvider) |
javax.ws.rs.core.Response |
update(String id,
org.wso2.carbon.dashboards.core.bean.DashboardMetadata dashboardMetadata)
Updates the dashboard corresponding to the supplied ID with the supplied data.
|
javax.ws.rs.core.Response |
updateDashboardRoles(String url,
Map<String,List<String>> roles) |
protected void activate(org.osgi.framework.BundleContext bundleContext)
protected void deactivate(org.osgi.framework.BundleContext bundleContext)
protected void setMetadataProvider(org.wso2.carbon.dashboards.core.DashboardMetadataProvider dashboardDataProvider)
protected void unsetMetadataProvider(org.wso2.carbon.dashboards.core.DashboardMetadataProvider dashboardDataProvider)
@GET @Consumes(value="application/json") @Produces(value="application/json") @Path(value="/") public javax.ws.rs.core.Response get()
@GET
@Consumes(value="application/json")
@Produces(value="application/json")
@Path(value="/{id}")
public javax.ws.rs.core.Response get(@PathParam(value="id")
String id)
id - dashboard ID@POST @Consumes(value="application/json") @Produces(value="application/json") @Path(value="/") public javax.ws.rs.core.Response create(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)
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)
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 © 2017 WSO2. All rights reserved.