Package org.openremote.model.datapoint
Interface AssetDatapointResource
@Path("asset/datapoint")
public interface AssetDatapointResource
-
Method Summary
Modifier and TypeMethodDescriptionvoid
getDatapointExport
(jakarta.ws.rs.container.AsyncResponse asyncResponse, String attributeRefsString, long fromTimestamp, long toTimestamp) getDatapointPeriod
(RequestParams requestParams, String assetId, String attributeName) ValueDatapoint<?>[]
getDatapoints
(RequestParams requestParams, String assetId, String attributeName, AssetDatapointQuery query) Retrieve the historical datapoints of an asset attribute.
-
Method Details
-
getDatapoints
@POST @Path("{assetId}/{attributeName}") @Consumes("application/json") @Produces("application/json") ValueDatapoint<?>[] getDatapoints(@BeanParam RequestParams requestParams, @PathParam("assetId") String assetId, @PathParam("attributeName") String attributeName, AssetDatapointQuery query) Retrieve the historical datapoints of an asset attribute. Regular users can only access assets in their authenticated realm, the superuser can access assets in other (all) realms. A 403 status is returned if a regular user tries to access an asset in a realm different than its authenticated realm, or if the user is restricted and the asset is not linked to the user. A 400 status is returned if the asset attribute does not have datapoint storage enabled. -
getDatapointPeriod
@GET @Path("periods") @Produces("application/json") @RolesAllowed("read:assets") DatapointPeriod getDatapointPeriod(@BeanParam RequestParams requestParams, @QueryParam("assetId") String assetId, @QueryParam("attributeName") String attributeName) -
getDatapointExport
@GET @Path("export") @Produces("application/zip") @RolesAllowed("read:assets") void getDatapointExport(@Suspended jakarta.ws.rs.container.AsyncResponse asyncResponse, @QueryParam("attributeRefs") String attributeRefsString, @QueryParam("fromTimestamp") long fromTimestamp, @QueryParam("toTimestamp") long toTimestamp)
-