Class StatisticsRestService
java.lang.Object
org.opencastproject.statistics.endpoint.StatisticsRestService
REST endpoint for Statistics Service.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) Activates REST service (needed by OSGi)javax.ws.rs.core.Responsejavax.ws.rs.core.ResponsegetTimeSeriesData(String providerId, String resourceId, String from, String to, String resolution, String zoneId) voidsetService(org.opencastproject.statistics.api.StatisticsService statisticsService) OSGi callback for setting statistics service.javax.ws.rs.core.ResponsewriteDuration(String organizationId, String measurementName, String retentionPolicy, String organizationIdResourceName, String fieldName, String temporalResolution, String duration)
-
Constructor Details
-
StatisticsRestService
public StatisticsRestService()
-
-
Method Details
-
setService
public void setService(org.opencastproject.statistics.api.StatisticsService statisticsService) OSGi callback for setting statistics service.- Parameters:
statisticsService-
-
activate
public void activate(org.osgi.service.component.ComponentContext cc) Activates REST service (needed by OSGi)- Parameters:
cc- ComponentContext
-
writeDuration
@GET @Produces("application/json") @Path("writeDuration") public javax.ws.rs.core.Response writeDuration(@QueryParam("organizationId") String organizationId, @QueryParam("measurementName") String measurementName, @QueryParam("retentionPolicy") String retentionPolicy, @QueryParam("organizationIdResourceName") String organizationIdResourceName, @QueryParam("fieldName") String fieldName, @QueryParam("temporalResolution") String temporalResolution, @QueryParam("duration") String duration) -
getProviders
@GET @Produces("application/json") @Path("providers.json") public javax.ws.rs.core.Response getProviders() -
getTimeSeriesData
@GET @Produces("application/json") @Path("timeseries/{providerId:.+}.json") public javax.ws.rs.core.Response getTimeSeriesData(@PathParam("providerId") String providerId, @QueryParam("resourceId") String resourceId, @QueryParam("from") String from, @QueryParam("to") String to, @QueryParam("resolution") String resolution, @QueryParam("zoneId") String zoneId)
-