@HTTPService(name="cserc") public class ClientService extends java.lang.Object
SensorService
Constructor and Description |
---|
ClientService() |
Modifier and Type | Method and Description |
---|---|
core.tut.pori.http.Response |
createTask(core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser,
core.tut.pori.http.parameters.InputStreamParameter xml)
The request is to be sent in the body of POST method.
|
core.tut.pori.http.Response |
getMeasurements(core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser,
core.tut.pori.http.parameters.StringParameter taskId,
core.tut.pori.http.parameters.LongParameter backendIdFilter,
core.tut.pori.http.parameters.DateIntervalParameter createdFilter,
core.tut.pori.http.parameters.DataGroups dataGroups,
core.tut.pori.http.parameters.Limits limits,
core.tut.pori.http.parameters.StringParameter measurementIdFilter)
This method can be used to retrieve measurements for a single task or for a list of tasks defined by the task ids.
|
core.tut.pori.http.Response |
modifyTask(core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser,
core.tut.pori.http.parameters.InputStreamParameter xml)
The request is to be sent in the body of POST method.
|
public ClientService()
@HTTPServiceMethod(name="createTask", acceptedMethods="POST") public core.tut.pori.http.Response createTask(@HTTPAuthenticationParameter(required=false) core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser, @HTTPMethodParameter(name="body",bodyParameter=true) core.tut.pori.http.parameters.InputStreamParameter xml)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <task> <createdTimestamp>2018-06-28T14:07:58Z</createdTimestamp> <description>xpgxsrlbtsmyvdwsbhthimfhugiwififaxqtaztegebciensgdloyywvkazuzill</description> <dataVisibility>LIMITED</dataVisibility> <name>jrqdiduqtwslleoqnhtpnvlevonvvmfxwpobonqwubnbllgahayviyeeixqhrmxc</name> <taskState>INACTIVE</taskState> <taskIdList> <taskId>26da7056-5805-47ea-a777-456d3d44aa54</taskId> </taskIdList> <taskTypeList> <taskType>gather</taskType> </taskTypeList> <updatedTimestamp>2018-10-05T08:32:42Z</updatedTimestamp> <userDetails> <userId>305333806699583257</userId> </userDetails> <backendList> <backend> <backendId>2518355905700124467</backendId> </backend> </backendList> <callbackUri>http://example.org:8080/ApiltaService/rest/sensors/taskFinished</callbackUri> <when> <condition> <terms> <entry> <key>flpwe</key> <value>ewdujsyrcc</value> </entry> <entry> <key>time/validFromToRange</key> <value>2018-03-14T18:52:19.284Z/2019-06-26T20:06:40.284Z</value> </entry> <entry> <key>utrdc</key> <value>pgffaytzni</value> </entry> <entry> <key>vbygl</key> <value>uepwbizbaq</value> </entry> <entry> <key>vlzlg</key> <value>agtbbvmzpq</value> </entry> </terms> </condition> <condition> <terms> <entry> <key>djmuv</key> <value>tsyglahska</value> </entry> <entry> <key>igqnf</key> <value>sqajcmafdq</value> </entry> <entry> <key>pbuqx</key> <value>gfshrpdimk</value> </entry> <entry> <key>raphn</key> <value>fgigwupvaj</value> </entry> <entry> <key>time/validFromToRange</key> <value>2017-07-23T08:24:24.284Z/2019-06-23T19:18:38.284Z</value> </entry> </terms> </condition> <condition> <terms> <entry> <key>gtxkq</key> <value>mzfdiiywuh</value> </entry> <entry> <key>time/validFromToRange</key> <value>2017-10-09T13:16:08.284Z/2019-03-18T10:42:08.284Z</value> </entry> <entry> <key>ttjso</key> <value>leiauvnnjz</value> </entry> </terms> </condition> <condition> <terms> <entry> <key>cgimm</key> <value>gwodanvcpq</value> </entry> <entry> <key>ikefu</key> <value>pcjmecceql</value> </entry> <entry> <key>time/validFromToRange</key> <value>2018-01-23T00:49:38.284Z/2019-06-28T06:22:19.284Z</value> </entry> <entry> <key>txjik</key> <value>gpkkyatqsp</value> </entry> <entry> <key>xiwfy</key> <value>wlcvsofbag</value> </entry> </terms> </condition> <condition> <terms> <entry> <key>time/validFromToRange</key> <value>2017-08-03T12:05:37.285Z/2018-08-22T05:09:43.285Z</value> </entry> <entry> <key>tljae</key> <value>dhnapzfqib</value> </entry> <entry> <key>ulaci</key> <value>kxdwxhuslo</value> </entry> <entry> <key>vettk</key> <value>byohceayud</value> </entry> </terms> </condition> </when> <what> <output> <feature>axtev</feature> </output> <output> <feature>hunhf</feature> </output> </what> </task>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="createTask" service="cserc"> <taskList> <task> <taskIdList> <taskId>c8e50ff7-7cc6-45dd-8e8e-853e3e45b8a0</taskId> </taskIdList> <callbackUri>http://example.org:8080/ApiltaService/rest/sensors/taskFinished</callbackUri> </task> </taskList> <status>OK</status> </response>
authenticatedUser
- xml
- Only the workload data should be in the body. See SensorTask
TaskList
with identifier for the generated task@HTTPServiceMethod(name="modifyTask", acceptedMethods="POST") public core.tut.pori.http.Response modifyTask(@HTTPAuthenticationParameter(required=false) core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser, @HTTPMethodParameter(name="body",bodyParameter=true) core.tut.pori.http.parameters.InputStreamParameter xml)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <task> <createdTimestamp>2018-03-12T19:30:57Z</createdTimestamp> <description>fuaibzqrdhzqtgnnvuwmpkctcnmqgncpzrfsebukyixhtzjohbkrnwahiygylnss</description> <dataVisibility>PUBLIC</dataVisibility> <name>xjuzpekdtbbftdtnmofbgyrivbieyqbremwacobmsdgoeudgcqvimhrgmqmkttyw</name> <taskState>ARCHIVED</taskState> <taskIdList> <taskId>fe4228c6-9fb2-4d2e-864a-cfcc60d7dab5</taskId> </taskIdList> <taskTypeList> <taskType>gather</taskType> </taskTypeList> <updatedTimestamp>2018-08-24T13:19:39Z</updatedTimestamp> <userDetails> <userId>3468448085365618569</userId> </userDetails> <backendList> <backend> <backendId>4656714478818812018</backendId> </backend> </backendList> <callbackUri>http://example.org:8080/ApiltaService/rest/sensors/taskFinished</callbackUri> <when> <condition> <terms> <entry> <key>thvzs</key> <value>wnyrjgxops</value> </entry> <entry> <key>time/validFromToRange</key> <value>2017-09-21T06:41:55.407Z/2018-11-16T23:50:24.407Z</value> </entry> </terms> </condition> <condition> <terms> <entry> <key>btmoq</key> <value>wgwartvhmf</value> </entry> <entry> <key>icekc</key> <value>yuuavuxrrx</value> </entry> <entry> <key>inarl</key> <value>vnwlysztbg</value> </entry> <entry> <key>rcxgx</key> <value>jednlpdvyh</value> </entry> <entry> <key>time/validFromToRange</key> <value>2018-04-13T21:09:29.407Z/2019-04-18T00:46:57.407Z</value> </entry> </terms> </condition> <condition> <terms> <entry> <key>bbwol</key> <value>xyummwsryp</value> </entry> <entry> <key>npvpo</key> <value>qkszdugsrz</value> </entry> <entry> <key>time/validFromToRange</key> <value>2018-04-24T04:30:48.407Z/2019-06-26T07:25:11.407Z</value> </entry> </terms> </condition> <condition> <terms> <entry> <key>hlbed</key> <value>lifnsoixdc</value> </entry> <entry> <key>time/validFromToRange</key> <value>2017-12-27T03:46:01.407Z/2018-07-31T10:36:17.407Z</value> </entry> </terms> </condition> </when> <what> <output> <feature>sncjs</feature> </output> <output> <feature>lislx</feature> </output> <output> <feature>vkzhw</feature> </output> <output> <feature>tvkdi</feature> </output> </what> </task>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="modifyTask" service="cserc"> <taskList> <task> <taskIdList> <taskId>7eb12144-6394-41d7-963c-0ad6576ab2fe</taskId> </taskIdList> <callbackUri>http://example.org:8080/ApiltaService/rest/sensors/taskFinished</callbackUri> </task> </taskList> <status>OK</status> </response>
authenticatedUser
- xml
- Only the workload data should be in the body. See SensorTask
TaskList
with identifier for the generated task@HTTPServiceMethod(name="getMeasurements", acceptedMethods="GET") public core.tut.pori.http.Response getMeasurements(@HTTPAuthenticationParameter(required=false) core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser, @HTTPMethodParameter(name="task_id") core.tut.pori.http.parameters.StringParameter taskId, @HTTPMethodParameter(name="backend_id",required=false) core.tut.pori.http.parameters.LongParameter backendIdFilter, @HTTPMethodParameter(name="created",required=false) core.tut.pori.http.parameters.DateIntervalParameter createdFilter, @HTTPMethodParameter(name="data_groups",required=false) core.tut.pori.http.parameters.DataGroups dataGroups, @HTTPMethodParameter(name="limits",required=false) core.tut.pori.http.parameters.Limits limits, @HTTPMethodParameter(name="measurement_id",required=false) core.tut.pori.http.parameters.StringParameter measurementIdFilter)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="getMeasurements" service="cserc"> <measurementList> <measurement> <backendId>2551694222120874244</backendId> <measurementId>15a60fa2-3408-4c6a-acf2-372ec3939272</measurementId> </measurement> </measurementList> <status>OK</status> </response>
authenticatedUser
- taskId
- backendIdFilter
- createdFilter
- dataGroups
- limits
- measurementIdFilter
- MeasurementList
Copyright © 2015-2018 Tampere University of Technology, Pori Department.