openAPISpec.yaml 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701
  1. openapi: "3.0.0"
  2. info:
  3. version: 1.0.0
  4. title: SensLog Telemetry
  5. servers:
  6. - url: http://127.0.0.1:8080
  7. - url: https://theros.wirelessinfo.cz
  8. paths:
  9. /info:
  10. get: # done
  11. operationId: infoGET
  12. summary: Information about running instance
  13. responses:
  14. 200:
  15. description: Instance information
  16. content:
  17. application/json:
  18. schema:
  19. $ref: "#/components/schemas/Info"
  20. default:
  21. description: unexpected error
  22. content:
  23. application/json:
  24. schema:
  25. $ref: "#/components/schemas/Error"
  26. /campaigns:
  27. get: # done
  28. operationId: campaignsGET
  29. summary: Publish info about all campaigns
  30. parameters:
  31. - in: query
  32. name: zone
  33. schema:
  34. type: string
  35. default: UTC
  36. required: false
  37. examples:
  38. UTC:
  39. value: UTC
  40. GMT:
  41. value: GMT
  42. - in: query
  43. name: navigationLinks
  44. schema:
  45. type: boolean
  46. default: true
  47. description: Option to disable @NavigationLinks in a response
  48. responses:
  49. 200:
  50. description: JSON array of basic info of each campaign
  51. content:
  52. application/json:
  53. schema:
  54. type: array
  55. items:
  56. $ref: '#/components/schemas/CampaignBasicInfo'
  57. default:
  58. description: unexpected error
  59. content:
  60. application/json:
  61. schema:
  62. $ref: '#/components/schemas/Error'
  63. /campaigns/{campaignId}:
  64. get: # done
  65. operationId: campaignIdGET
  66. summary: Publish info about a campaign
  67. parameters:
  68. - in: path
  69. name: campaignId
  70. schema:
  71. type: integer
  72. format: int64
  73. required: true
  74. description: Numeric ID of the campaign to get
  75. - in: query
  76. name: zone
  77. schema:
  78. type: string
  79. default: UTC
  80. required: false
  81. examples:
  82. UTC:
  83. value: UTC
  84. GMT:
  85. value: GMT
  86. - in: query
  87. name: navigationLinks
  88. schema:
  89. type: boolean
  90. default: true
  91. description: Option to disable @NavigationLinks in a response
  92. responses:
  93. 200:
  94. description: JSON object containing info about a campaign
  95. content:
  96. application/json:
  97. schema:
  98. $ref: '#/components/schemas/CampaignDetailInfo'
  99. default:
  100. description: unexpected error
  101. content:
  102. application/json:
  103. schema:
  104. $ref: '#/components/schemas/Error'
  105. /campaigns/{campaignId}/units:
  106. get: # done
  107. operationId: campaignIdUnitsGET
  108. summary: Publish info about the campaign's units
  109. parameters:
  110. - in: path
  111. name: campaignId
  112. schema:
  113. type: integer
  114. format: int64
  115. required: true
  116. description: Numeric ID of the campaign to get
  117. - in: query
  118. name: zone
  119. schema:
  120. type: string
  121. default: UTC
  122. required: false
  123. examples:
  124. UTC:
  125. value: UTC
  126. GMT:
  127. value: GMT
  128. - in: query
  129. name: navigationLinks
  130. schema:
  131. type: boolean
  132. default: true
  133. description: Option to disable @NavigationLinks in a response
  134. responses:
  135. 200:
  136. description: JSON Array containing info about campaign's units
  137. content:
  138. application/json:
  139. schema:
  140. type: array
  141. items:
  142. $ref: '#/components/schemas/CampaignUnitBasicInfo'
  143. default:
  144. description: unexpected error
  145. content:
  146. application/json:
  147. schema:
  148. $ref: '#/components/schemas/Error'
  149. /campaigns/{campaignId}/units/observations:
  150. get: # done
  151. operationId: campaignIdUnitsObservationsGET
  152. summary: Publish info about all data of units merged together within the campaign
  153. parameters:
  154. - in: path
  155. name: campaignId
  156. schema:
  157. type: integer
  158. format: int64
  159. required: true
  160. description: Numeric ID of the campaign to get
  161. - in: query
  162. name: from
  163. schema:
  164. type: string
  165. format: date-time
  166. required: false
  167. - in: query
  168. name: to
  169. schema:
  170. type: string
  171. format: date-time
  172. required: false
  173. - in: query
  174. name: zone
  175. schema:
  176. type: string
  177. required: false
  178. - in: query
  179. name: offset
  180. schema:
  181. type: integer
  182. format: int64
  183. - in: query
  184. name: limit
  185. schema:
  186. type: integer
  187. format: int64
  188. required: false
  189. - in: query
  190. name: navigationLinks
  191. schema:
  192. type: boolean
  193. default: true
  194. description: Option to disable @NavigationLinks in a response
  195. responses:
  196. 200:
  197. description: JSON containing stream of telemetry data
  198. content:
  199. application/json:
  200. schema:
  201. $ref: '#/components/schemas/CampaignObservation'
  202. default:
  203. description: unexpected error
  204. content:
  205. application/json:
  206. schema:
  207. $ref: '#/components/schemas/Error'
  208. /campaigns/{campaignId}/units/observations/locations:
  209. get: # done
  210. operationId: campaignIdUnitsObservationsLocationsGET
  211. summary: Publish info about all data of units merged together within the campaign
  212. parameters:
  213. - in: path
  214. name: campaignId
  215. schema:
  216. type: integer
  217. format: int64
  218. required: true
  219. description: Numeric ID of the campaign to get
  220. - in: query
  221. name: limitPerUnit
  222. required: true
  223. schema:
  224. type: integer
  225. default: 1
  226. examples:
  227. Last locations:
  228. value: 1
  229. summary: Last Locations of each unit
  230. - in: query
  231. name: from
  232. schema:
  233. type: string
  234. format: date-time
  235. required: false
  236. example: 2017-07-21T17:32:28Z
  237. - in: query
  238. name: to
  239. schema:
  240. type: string
  241. format: date-time
  242. required: false
  243. example: 2017-07-21T17:32:28Z
  244. - in: query
  245. name: zone
  246. schema:
  247. type: string
  248. default: UTC
  249. required: false
  250. - in: query
  251. name: sort
  252. schema:
  253. type: string
  254. enum: [asc, desc]
  255. default: asc
  256. examples:
  257. Descending Order:
  258. value: desc
  259. Ascending Order:
  260. value: asc
  261. - in: query
  262. name: navigationLinks
  263. schema:
  264. type: boolean
  265. default: true
  266. description: Option to disable @NavigationLinks in a response
  267. responses:
  268. 200:
  269. description: JSON containing stream of telemetry data
  270. content:
  271. application/json:
  272. schema:
  273. $ref: '#/components/schemas/CampaignUnitsLocations'
  274. default:
  275. description: unexpected error
  276. content:
  277. application/json:
  278. schema:
  279. $ref: '#/components/schemas/Error'
  280. /campaigns/{campaignId}/units/{unitId}:
  281. get:
  282. operationId: campaignIdUnitIdGET
  283. summary: Publish info about the unit within its campaign's scope
  284. parameters:
  285. - in: path
  286. name: campaignId
  287. schema:
  288. type: integer
  289. required: true
  290. description: Numeric ID of the campaign to get
  291. - in: path
  292. name: unitId
  293. schema:
  294. type: integer
  295. required: true
  296. description: Numeric ID of the unit to get
  297. responses:
  298. 200:
  299. description: JSON Object containing info about the unit within its campaign' scope
  300. content:
  301. application/json:
  302. schema:
  303. $ref: '#/components/schemas/CampaignUnitDetailInfo'
  304. default:
  305. description: unexpected error
  306. content:
  307. application/json:
  308. schema:
  309. $ref: '#/components/schemas/Error'
  310. /campaigns/{campaignId}/units/{unitId}/observations:
  311. get: # done
  312. operationId: campaignIdUnitIdObservationsGET
  313. summary: Publish info about all data of the unit within the campaign
  314. parameters:
  315. - in: path
  316. name: campaignId
  317. schema:
  318. type: integer
  319. format: int64
  320. required: true
  321. description: Numeric ID of the campaign to get
  322. - in: path
  323. name: unitId
  324. schema:
  325. type: integer
  326. format: int64
  327. required: true
  328. description: Numeric ID of the unit to get
  329. - in: query
  330. name: from
  331. schema:
  332. type: string
  333. format: date-time
  334. required: false
  335. - in: query
  336. name: to
  337. schema:
  338. type: string
  339. format: date-time
  340. required: false
  341. - in: query
  342. name: zone
  343. schema:
  344. type: string
  345. required: false
  346. - in: query
  347. name: offset
  348. schema:
  349. type: integer
  350. format: int64
  351. required: false
  352. - in: query
  353. name: limit
  354. schema:
  355. type: integer
  356. format: int64
  357. required: false
  358. - in: query
  359. name: navigationLinks
  360. schema:
  361. type: boolean
  362. default: true
  363. description: Option to disable @NavigationLinks in a response
  364. responses:
  365. 200:
  366. description: JSON containing stream of telemetry data
  367. content:
  368. application/json:
  369. schema:
  370. $ref: '#/components/schemas/CampaignUnitObservation'
  371. default:
  372. description: unexpected error
  373. content:
  374. application/json:
  375. schema:
  376. $ref: '#/components/schemas/Error'
  377. /campaigns/{campaignId}/units/{unitId}/observations/location:
  378. get: # done
  379. operationId: campaignIdUnitIdLocationsGET
  380. summary: Publish locations of the unit within the campaign
  381. parameters:
  382. - in: path
  383. name: campaignId
  384. schema:
  385. type: integer
  386. format: int64
  387. required: true
  388. example: 1
  389. description: Numeric ID of the campaign to get
  390. - in: path
  391. name: unitId
  392. schema:
  393. type: integer
  394. format: int64
  395. required: true
  396. example: 25
  397. description: Numeric ID of the unit to get
  398. - in: query
  399. name: from
  400. schema:
  401. type: string
  402. format: date-time
  403. required: false
  404. example: 2017-07-21T17:32:28Z
  405. - in: query
  406. name: to
  407. schema:
  408. type: string
  409. format: date-time
  410. required: false
  411. example: 2017-07-21T17:32:28Z
  412. - in: query
  413. name: zone
  414. schema:
  415. type: string
  416. required: false
  417. examples:
  418. UTC:
  419. value: UTC
  420. GMT:
  421. value: GMT
  422. - in: query
  423. name: offset
  424. schema:
  425. type: integer
  426. format: int64
  427. required: false
  428. example: 50
  429. - in: query
  430. name: limit
  431. schema:
  432. type: integer
  433. format: int64
  434. required: false
  435. example: 100
  436. - in: query
  437. name: filter
  438. schema:
  439. type: string
  440. required: false
  441. examples:
  442. Value of Sensor ID 105 > 10:
  443. value: sensorId(105)gt10
  444. summary: Filter locations of units having value of sensor id 105 > 10
  445. Value :
  446. value: driverId(34245)eq3
  447. summary: Filter locations of units driven by Driver ID 34245 == Activity 3
  448. - in: query
  449. name: navigationLinks
  450. schema:
  451. type: boolean
  452. default: true
  453. description: Option to disable @NavigationLinks in a response
  454. responses:
  455. 200:
  456. description: JSON containing stream of locations
  457. content:
  458. application/json:
  459. schema:
  460. $ref: '#/components/schemas/CampaignUnitLocation'
  461. default:
  462. description: unexpected error
  463. content:
  464. application/json:
  465. schema:
  466. $ref: '#/components/schemas/Error'
  467. /campaigns/{campaignId}/units/{unitId}/sensors:
  468. get:
  469. operationId: campaignIdUnitIdSensorsGET
  470. summary: Publish info about all sensors of the unit within the campaign
  471. parameters:
  472. - in: path
  473. name: campaignId
  474. schema:
  475. type: integer
  476. format: int64
  477. required: true
  478. description: Numeric ID of the campaign to get
  479. - in: path
  480. name: unitId
  481. schema:
  482. type: integer
  483. format: int64
  484. required: true
  485. description: Numeric ID of the unit to get
  486. responses:
  487. 200:
  488. description: JSON containing information of sensors assigned to the unit within its campaign
  489. content:
  490. application/json:
  491. schema:
  492. type: array
  493. items:
  494. $ref: '#/components/schemas/CampaignUnitBasicSensor'
  495. default:
  496. description: unexpected error
  497. content:
  498. application/json:
  499. schema:
  500. $ref: '#/components/schemas/Error'
  501. /campaigns/{campaignId}/units/{unitId}/sensors/{sensorId}/observations:
  502. get:
  503. operationId: campaignIdUnitIdSensorIdObservationsGET
  504. summary: Publish info about all data of the unit within the campaign
  505. parameters:
  506. - in: path
  507. name: campaignId
  508. schema:
  509. type: integer
  510. format: int64
  511. required: true
  512. description: Numeric ID of the campaign to get
  513. - in: path
  514. name: unitId
  515. schema:
  516. type: integer
  517. format: int64
  518. required: true
  519. description: Numeric ID of the unit to get
  520. - in: path
  521. name: sensorId
  522. schema:
  523. type: integer
  524. required: true
  525. description: Numeric ID of the sensor to get
  526. - in: query
  527. name: offset
  528. schema:
  529. type: integer
  530. format: int64
  531. description: Offset for the data
  532. - in: query
  533. name: navigationLinks
  534. schema:
  535. type: boolean
  536. default: true
  537. description: Option to disable @NavigationLinks in a response
  538. responses:
  539. 200:
  540. description: JSON containing stream of telemetry data
  541. content:
  542. application/json:
  543. schema:
  544. $ref: '#/components/schemas/CampaignUnitSensorObservation'
  545. default:
  546. description: unexpected error
  547. content:
  548. application/json:
  549. schema:
  550. $ref: '#/components/schemas/Error'
  551. /units:
  552. get: # done
  553. operationId: unitsGET
  554. summary: Publish info about all units
  555. parameters:
  556. - in: query
  557. name: navigationLinks
  558. schema:
  559. type: boolean
  560. default: true
  561. description: Option to disable @NavigationLinks in a response
  562. responses:
  563. 200:
  564. description: JSON array of basic info of each unit
  565. content:
  566. application/json:
  567. schema:
  568. type: array
  569. items:
  570. $ref: '#/components/schemas/UnitBasicInfo'
  571. default:
  572. description: unexpected error
  573. content:
  574. application/json:
  575. schema:
  576. $ref: '#/components/schemas/Error'
  577. /units/{unitId}:
  578. get: # done
  579. operationId: unitIdGET
  580. summary: Publish info about the unit
  581. parameters:
  582. - in: path
  583. name: unitId
  584. schema:
  585. type: integer
  586. format: int64
  587. required: true
  588. description: Numeric ID of the unit to get
  589. responses:
  590. 200:
  591. description: JSON Object of info of the unit
  592. content:
  593. application/json:
  594. schema:
  595. $ref: '#/components/schemas/UnitDetailInfo'
  596. default:
  597. description: unexpected error
  598. content:
  599. application/json:
  600. schema:
  601. $ref: '#/components/schemas/Error'
  602. /units/{unitId}/sensors:
  603. get: # done
  604. operationId: unitIdSensorsGET
  605. summary: Publish info about sensors assigned to the unit
  606. parameters:
  607. - in: path
  608. name: unitId
  609. schema:
  610. type: integer
  611. format: int64
  612. required: true
  613. description: Numeric ID of the unit to get
  614. - in: query
  615. name: navigationLinks
  616. schema:
  617. type: boolean
  618. default: true
  619. description: Option to disable @NavigationLinks in a response
  620. responses:
  621. 200:
  622. description: JSON Array of info of the sensors
  623. content:
  624. application/json:
  625. schema:
  626. type: array
  627. items:
  628. $ref: '#/components/schemas/UnitSensorBasicInfo'
  629. default:
  630. description: unexpected error
  631. content:
  632. application/json:
  633. schema:
  634. $ref: '#/components/schemas/Error'
  635. /units/{unitId}/campaigns:
  636. get: # done
  637. operationId: unitIdCampaignsGET
  638. summary: Publish info about campaigns where the unit was/is assigned
  639. parameters:
  640. - in: path
  641. name: unitId
  642. schema:
  643. type: integer
  644. format: int64
  645. required: true
  646. description: Numeric ID of the unit to get
  647. - in: query
  648. name: zone
  649. schema:
  650. type: string
  651. default: UTC
  652. required: false
  653. - in: query
  654. name: navigationLinks
  655. schema:
  656. type: boolean
  657. default: true
  658. description: Option to disable @NavigationLinks in a response
  659. responses:
  660. 200:
  661. description: JSON Array of info about campaigns
  662. content:
  663. application/json:
  664. schema:
  665. type: array
  666. items:
  667. $ref: '#/components/schemas/UnitCampaignBasicInfo'
  668. default:
  669. description: unexpected error
  670. content:
  671. application/json:
  672. schema:
  673. $ref: '#/components/schemas/Error'
  674. /sensors:
  675. get: # done
  676. operationId: sensorsGET
  677. summary: Publish info about all sensors
  678. parameters:
  679. - in: query
  680. name: navigationLinks
  681. schema:
  682. type: boolean
  683. default: true
  684. description: Option to disable @NavigationLinks in a response
  685. responses:
  686. 200:
  687. description: JSON Array of info about sensors
  688. content:
  689. application/json:
  690. schema:
  691. type: array
  692. items:
  693. $ref: '#/components/schemas/SensorBasicInfo'
  694. default:
  695. description: unexpected error
  696. content:
  697. application/json:
  698. schema:
  699. $ref: '#/components/schemas/Error'
  700. /sensors/{sensorId}:
  701. get: # done
  702. operationId: sensorIdGET
  703. summary: Publish info about the sensor
  704. parameters:
  705. - in: path
  706. name: sensorId
  707. schema:
  708. type: integer
  709. format: int64
  710. required: true
  711. description: Numeric ID of the sensor to get
  712. - in: query
  713. name: navigationLinks
  714. schema:
  715. type: boolean
  716. default: true
  717. description: Option to disable @NavigationLinks in a response
  718. responses:
  719. 200:
  720. description: JSON Object of info about the sensor
  721. content:
  722. application/json:
  723. schema:
  724. $ref: '#/components/schemas/SensorDetailInfo'
  725. default:
  726. description: unexpected error
  727. content:
  728. application/json:
  729. schema:
  730. $ref: '#/components/schemas/Error'
  731. /sensors/{sensorId}/units:
  732. get:
  733. operationId: sensorIdUnitsGET
  734. summary: Publish info about units to whom the sensor is assigned
  735. parameters:
  736. - in: path
  737. name: sensorId
  738. schema:
  739. type: integer
  740. format: int64
  741. required: true
  742. description: Numeric ID of the sensor to get
  743. - in: query
  744. name: navigationLinks
  745. schema:
  746. type: boolean
  747. default: true
  748. description: Option to disable @NavigationLinks in a response
  749. responses:
  750. 200:
  751. description: JSON Array of info about the units
  752. content:
  753. application/json:
  754. schema:
  755. type: array
  756. items:
  757. $ref: '#/components/schemas/SensorUnitBasicInfo'
  758. default:
  759. description: unexpected error
  760. content:
  761. application/json:
  762. schema:
  763. $ref: '#/components/schemas/Error'
  764. /phenomenons:
  765. get: # done
  766. operationId: phenomenonsGET
  767. summary: Publish info about all phenomenons
  768. parameters:
  769. - in: query
  770. name: navigationLinks
  771. schema:
  772. type: boolean
  773. default: true
  774. description: Option to disable @NavigationLinks in a response
  775. responses:
  776. 200:
  777. description: JSON Array of info about phenomenons
  778. content:
  779. application/json:
  780. schema:
  781. type: array
  782. items:
  783. $ref: '#/components/schemas/PhenomenonBasicInfo'
  784. default:
  785. description: unexpected error
  786. content:
  787. application/json:
  788. schema:
  789. $ref: '#/components/schemas/Error'
  790. /phenomenons/{phenomenonId}:
  791. get: # done
  792. operationId: phenomenonIdGET
  793. summary: Publish info about the phenomenon
  794. parameters:
  795. - in: path
  796. name: phenomenonId
  797. schema:
  798. type: integer
  799. format: int64
  800. required: true
  801. description: Numeric ID of the phenomenon to get
  802. - in: query
  803. name: navigationLinks
  804. schema:
  805. type: boolean
  806. default: true
  807. description: Option to disable @NavigationLinks in a response
  808. responses:
  809. 200:
  810. description: JSON Object of info about the phenomenon
  811. content:
  812. application/json:
  813. schema:
  814. $ref: '#/components/schemas/PhenomenonDetailInfo'
  815. default:
  816. description: unexpected error
  817. content:
  818. application/json:
  819. schema:
  820. $ref: '#/components/schemas/Error'
  821. /phenomenons/{phenomenonId}/sensors:
  822. get: # done
  823. operationId: phenomenonIdSensorsGET
  824. summary: Publish info about sensors of the phenomenon
  825. parameters:
  826. - in: path
  827. name: phenomenonId
  828. schema:
  829. type: integer
  830. format: int64
  831. required: true
  832. description: Numeric ID of the phenomenon to get
  833. - in: query
  834. name: navigationLinks
  835. schema:
  836. type: boolean
  837. default: true
  838. description: Option to disable @NavigationLinks in a response
  839. responses:
  840. 200:
  841. description: JSON Array of info about sensors
  842. content:
  843. application/json:
  844. schema:
  845. type: array
  846. items:
  847. $ref: '#/components/schemas/PhenomenonSensorBasicInfo'
  848. default:
  849. description: unexpected error
  850. content:
  851. application/json:
  852. schema:
  853. $ref: '#/components/schemas/Error'
  854. components:
  855. schemas:
  856. CampaignBasicInfo:
  857. type: object
  858. required:
  859. - id
  860. - fromTime
  861. - toTime
  862. properties:
  863. Campaign@NavigationLink:
  864. type: string
  865. format: uri
  866. id:
  867. type: integer
  868. format: int64
  869. description:
  870. type: string
  871. fromTime:
  872. type: string
  873. format: date-time
  874. toTime:
  875. type: string
  876. format: date-time
  877. example:
  878. Campaign@NavigationLink: "<domain>/campaigns/1"
  879. id: 1
  880. description: "Campaign 1"
  881. fromTime: "2023-01-25 15:35:32Z"
  882. toTime: "2023-03-20 10:35:32Z"
  883. CampaignDetailInfo:
  884. type: object
  885. required:
  886. - id
  887. - fromTime
  888. - toTime
  889. properties:
  890. self@NavigationLink:
  891. type: string
  892. format: uri
  893. Observations@NavigationLink:
  894. description: Navigation link to all campaign's data across all units
  895. type: string
  896. format: uri
  897. Locations@NavigationLink:
  898. description: Navigation link to all campaigns' locations across all units
  899. type: string
  900. format: uni
  901. Units@NavigationLink:
  902. description: Navigation link to campaign's assigned units
  903. type: string
  904. format: uri
  905. id:
  906. description: Identifier of the campaign
  907. type: integer
  908. format: int64
  909. description:
  910. description: Text description of the campaign
  911. type: string
  912. fromTime:
  913. description: Time when the campaign starts
  914. type: string
  915. format: date-time
  916. toTime:
  917. description: Time when the campaign ends
  918. type: string
  919. format: date-time
  920. example:
  921. self@NavigationLink: "<domain>/campaigns/1"
  922. Observations@NavigationLink: "<domain>/campaigns/1/units/observations"
  923. Locations@NavigationLink: "<domain>/campaigns/1/units/observations/locations"
  924. Units@NavigationLink: "<domain>/campaigns/1/units"
  925. id: 1
  926. description: "Campaign example"
  927. fromTime: "2023-01-25 15:35:32Z"
  928. toTime: "2023-03-20 10:35:32Z"
  929. CampaignUnitBasicInfo:
  930. type: object
  931. required:
  932. - unitId
  933. - name
  934. - fromTime
  935. - toTime
  936. properties:
  937. Unit@NavigationLink:
  938. type: string
  939. format: uri
  940. unitId:
  941. description: Identifier of the unit
  942. type: integer
  943. format: int64
  944. name:
  945. type: string
  946. description:
  947. type: string
  948. fromTime:
  949. description: Time when the validity of the unit starts within the campaign
  950. type: string
  951. format: date-time
  952. toTime:
  953. description: Time when the validity of the unit ends within the campaign
  954. type: string
  955. format: date-time
  956. example:
  957. Unit@NavigationLink: "<domain>/units/25"
  958. unitId: 25
  959. name: "Unit name"
  960. description: "Purpose of the Unit 25"
  961. fromTime: "2023-01-25 15:35:32Z"
  962. toTime: "2023-03-20 10:35:32Z"
  963. CampaignUnitDetailInfo:
  964. type: object
  965. required:
  966. - self@NavigationLink
  967. - Campaign@NavigationLink
  968. - Unit@NavigationLink
  969. - Sensors@NavigationLink
  970. - Observations@NavigationLink
  971. - id
  972. - fromTime
  973. - toTime
  974. properties:
  975. self@NavigationLink:
  976. type: string
  977. format: uri
  978. Campaign@NavigationLink:
  979. type: string
  980. format: uri
  981. Unit@NavigationLink:
  982. type: string
  983. format: uri
  984. Sensors@NavigationLink:
  985. type: string
  986. format: uri
  987. Observations@NavigationLink:
  988. description: Navigation link to all campaign's data across all units
  989. type: string
  990. format: uri
  991. id:
  992. description: Identifier of the unit
  993. type: integer
  994. format: int64
  995. description:
  996. type: string
  997. fromTime:
  998. description: Time when the validity of the unit starts within the campaign
  999. type: string
  1000. format: date-time
  1001. toTime:
  1002. description: Time when the validity of the unit ends within the campaign
  1003. type: string
  1004. format: date-time
  1005. example:
  1006. self@NavigationLink: "<domain>/campaigns/1/units/25"
  1007. Campaign@NavigationLink: "<domain>/campaigns/1"
  1008. Observations@NavigationLink: "<domain>/campaigns/1/units/25/observations"
  1009. Sensors@NavigationLink: "<domain>/campaigns/1/units/25/sensors"
  1010. Unit@NavigationLink: "<domain>/units/25"
  1011. id: 25
  1012. description: "Purpose of the Unit 25"
  1013. fromTime: "2023-01-25 15:35:32Z"
  1014. toTime: "2023-03-20 10:35:32Z"
  1015. CampaignUnitBasicSensor:
  1016. type: object
  1017. required:
  1018. - Campaign@NavigationLink
  1019. - Unit@NavigationLink
  1020. - Observations@NavigationLink
  1021. - Sensor@NavigationLink
  1022. - id
  1023. - name
  1024. properties:
  1025. Campaign@NavigationLink:
  1026. type: string
  1027. format: uri
  1028. Unit@NavigationLink:
  1029. description: Navigation link to the unit
  1030. type: string
  1031. format: uri
  1032. Observations@NavigationLink:
  1033. description: Navigation link to all campaign's data of the sensor assigned to unit
  1034. type: string
  1035. format: uri
  1036. Sensor@NavigationLink:
  1037. description: Navigation link to detail info of the sensor
  1038. type: string
  1039. format: uri
  1040. id:
  1041. description: Identifier of the unit
  1042. type: integer
  1043. format: int64
  1044. name:
  1045. type: string
  1046. description:
  1047. type: string
  1048. example:
  1049. Campaign@NavigationLink: "<domain>/campaigns/1"
  1050. Observations@NavigationLink: "<domain>/campaigns/1/units/25/sensors/105/observations"
  1051. Unit@NavigationLink: "<domain>/units/25"
  1052. Sensor@NavigationLink: "<domain>/sensors/105"
  1053. id: 105
  1054. name: "Sensor 105"
  1055. description: "Description of the sensor 105"
  1056. CampaignObservation:
  1057. type: object
  1058. required:
  1059. - params
  1060. - hasNext
  1061. - size
  1062. - offset
  1063. - data
  1064. properties:
  1065. Campaign@NavigationLink:
  1066. type: string
  1067. format: uri
  1068. next@NavigationLink:
  1069. type: string
  1070. format: uri
  1071. params:
  1072. type: object
  1073. description: Used params in URL
  1074. hasNext:
  1075. type: boolean
  1076. size:
  1077. type: integer
  1078. offset:
  1079. type: integer
  1080. data:
  1081. type: array
  1082. items:
  1083. $ref: '#/components/schemas/CampaignDataObservation'
  1084. example:
  1085. Campaign@NavigationLink: "<domain>/campaigns/1"
  1086. next@NavigationLink: "<domain>/campaigns/1/observations?offset=500"
  1087. size: 500
  1088. offset: 0
  1089. data:
  1090. - size: 500 TODO
  1091. CampaignUnitObservation:
  1092. type: object
  1093. required:
  1094. - params
  1095. - hasNext
  1096. - size
  1097. - offset
  1098. - data
  1099. properties:
  1100. Campaign@NavigationLink:
  1101. type: string
  1102. format: uri
  1103. Unit@NavigationLink:
  1104. type: string
  1105. format: uri
  1106. next@NavigationLink:
  1107. type: string
  1108. format: uri
  1109. params:
  1110. type: object
  1111. description: Used params in URL
  1112. hasNext:
  1113. type: boolean
  1114. size:
  1115. type: integer
  1116. offset:
  1117. type: integer
  1118. data:
  1119. type: array
  1120. items:
  1121. $ref: '#/components/schemas/UnitDataObservation'
  1122. example:
  1123. Campaign@NavigationLink: "<domain>/campaigns/1"
  1124. Unit@NavigationLink: "<domain>/campaigns/1/units/25"
  1125. next@NavigationLink: "<domain>/campaigns/1/units/25/observations?offset=500"
  1126. params: []
  1127. size: 500
  1128. hasNext: true
  1129. offset: 0
  1130. data: []
  1131. CampaignUnitSensorObservation:
  1132. type: object
  1133. properties:
  1134. Campaign@NavigationLink:
  1135. type: string
  1136. format: uri
  1137. Unit@NavigationLink:
  1138. type: string
  1139. format: uri
  1140. Sensor@NavigationLink:
  1141. type: string
  1142. format: uri
  1143. next@NavigationLink:
  1144. type: string
  1145. format: uri
  1146. size:
  1147. type: integer
  1148. offset:
  1149. type: integer
  1150. data:
  1151. type: array
  1152. items:
  1153. $ref: '#/components/schemas/SensorDataObservation'
  1154. example:
  1155. Campaign@NavigationLink: "<domain>/campaigns/1"
  1156. Unit@NavigationLink: "<domain>/campaigns/1/units/25"
  1157. Sensor@NavigationLink: "<domain>/sensors/105"
  1158. next@NavigationLink: "<domain>/campaigns/1/units/25/sensors/105/observations?offset=500"
  1159. size: 500
  1160. offset: 0
  1161. data: []
  1162. CampaignDataObservation:
  1163. type: object
  1164. required:
  1165. - unitId
  1166. - timestamp
  1167. - speed
  1168. - location
  1169. - observedValues
  1170. properties:
  1171. unitId:
  1172. type: integer
  1173. format: int64
  1174. timestamp:
  1175. type: string
  1176. format: date-time
  1177. speed:
  1178. type: integer
  1179. format: int64
  1180. location:
  1181. $ref: '#/components/schemas/Location'
  1182. observedValues:
  1183. type: object
  1184. example:
  1185. unitId: 25
  1186. timestamp: "2023-01-25 15:35:32Z"
  1187. location:
  1188. longitude: 49.7384
  1189. latitude: 13.3736
  1190. altitude: 350.3
  1191. observedValues:
  1192. 105: 1434
  1193. UnitDataObservation:
  1194. type: object
  1195. required:
  1196. - timestamp
  1197. - speed
  1198. - location
  1199. - observedValues
  1200. properties:
  1201. timestamp:
  1202. type: string
  1203. format: date-time
  1204. speed:
  1205. type: integer
  1206. format: int64
  1207. location:
  1208. $ref: '#/components/schemas/Location'
  1209. observedValues:
  1210. type: object
  1211. example:
  1212. timestamp: "2023-01-25 15:35:32Z"
  1213. speed: 34
  1214. location:
  1215. longitude: 49.7384
  1216. latitude: 13.3736
  1217. altitude: 350.3
  1218. observedValues:
  1219. 105: 1434
  1220. SensorDataObservation:
  1221. type: object
  1222. required:
  1223. - timestamp
  1224. - value
  1225. properties:
  1226. timestamp:
  1227. type: string
  1228. format: date-time
  1229. value:
  1230. type: integer
  1231. format: int64
  1232. example:
  1233. timestamp: "2023-01-25 15:35:32Z"
  1234. value: 1435
  1235. CampaignUnitLocation:
  1236. type: object
  1237. properties:
  1238. Campaign@NavigationLink:
  1239. type: string
  1240. format: uri
  1241. Unit@NavigationLink:
  1242. type: string
  1243. format: uri
  1244. next@NavigationLink:
  1245. type: string
  1246. format: uri
  1247. params:
  1248. type: object
  1249. description: Used params in URL
  1250. hasNext:
  1251. type: boolean
  1252. size:
  1253. type: integer
  1254. offset:
  1255. type: integer
  1256. data:
  1257. type: array
  1258. items:
  1259. type: object
  1260. properties:
  1261. timestamp:
  1262. type: string
  1263. format: date-time
  1264. location:
  1265. description: Array in a format [longitude, latitude, altitude]
  1266. type: array
  1267. items:
  1268. type: integer
  1269. example:
  1270. Campaign@NavigationLink: "<domain>/campaigns/1"
  1271. Unit@NavigationLink: "<domain>/campaigns/1/units/25"
  1272. next@NavigationLink: "<domain>/campaigns/1/units/25/observations/location?offset=500"
  1273. params:
  1274. offset: 0
  1275. limit: 500
  1276. navigationLinks: true
  1277. size: 500
  1278. hasNext: true
  1279. offset: 0
  1280. data:
  1281. - timestamp: "2023-01-25 15:35:32Z"
  1282. location: [49.7384, 13.3736, 350.3]
  1283. CampaignUnitsLocations:
  1284. type: object
  1285. required:
  1286. - size
  1287. - data
  1288. properties:
  1289. Campaign@NavigationLink:
  1290. type: string
  1291. format: uri
  1292. params:
  1293. type: object
  1294. description: Used params in URL
  1295. size:
  1296. type: integer
  1297. data:
  1298. type: array
  1299. items:
  1300. type: object
  1301. required:
  1302. - unitId
  1303. - timestamp
  1304. - location
  1305. properties:
  1306. unitId:
  1307. type: integer
  1308. format: int64
  1309. timestamp:
  1310. type: string
  1311. format: date-time
  1312. location:
  1313. description: Array in a format [longitude, latitude, altitude]
  1314. type: array
  1315. items:
  1316. type: integer
  1317. example:
  1318. Campaign@NavigationLink: "<domain>/campaigns/1"
  1319. params:
  1320. from: "2023-01-25 15:35:32Z"
  1321. to: "2023-01-25 15:35:32Z"
  1322. navigationLinks: true
  1323. size: 8
  1324. data:
  1325. - unitId: 25
  1326. timestamp: "2023-01-25 15:35:32Z"
  1327. location: [ 49.7384, 13.3736, 350.3 ]
  1328. Location:
  1329. type: object
  1330. properties:
  1331. longitude:
  1332. type: number
  1333. format: float
  1334. latitude:
  1335. type: number
  1336. format: float
  1337. altitude:
  1338. type: number
  1339. format: float
  1340. example:
  1341. longitude: 49.7384
  1342. latitude: 13.3736
  1343. altitude: 350.3
  1344. UnitBasicInfo:
  1345. type: object
  1346. required:
  1347. - id
  1348. - name
  1349. properties:
  1350. Unit@NavigationLink:
  1351. type: string
  1352. format: uri
  1353. id:
  1354. description: Identifier of the unit
  1355. type: integer
  1356. format: int64
  1357. name:
  1358. type: string
  1359. description:
  1360. type: string
  1361. example:
  1362. Unit@NavigationLink: "<domain>/units/25"
  1363. id: 25
  1364. name: "Mobile Unit"
  1365. description: "Mobile Unit 25"
  1366. UnitDetailInfo:
  1367. type: object
  1368. required:
  1369. - id
  1370. - name
  1371. - imei
  1372. properties:
  1373. self@NavigationLink:
  1374. type: string
  1375. format: uri
  1376. Sensors@NavigationLink:
  1377. type: string
  1378. format: uri
  1379. Campaigns@NavigationLink:
  1380. type: string
  1381. format: uri
  1382. id:
  1383. description: Identifier of the unit
  1384. type: integer
  1385. format: int64
  1386. name:
  1387. type: string
  1388. imei:
  1389. type: string
  1390. description:
  1391. type: string
  1392. example:
  1393. self@NavigationLink: "<domain>/units/25"
  1394. Sensors@NavigationLink: "<domain>/units/25/sensors"
  1395. Campaigns@NavigationLink: "<domain>/units/25/campaigns"
  1396. id: 25
  1397. name: "Mobile Unit"
  1398. description: "Mobile Unit 25"
  1399. imei: "3434535323345"
  1400. UnitSensorBasicInfo:
  1401. type: object
  1402. required:
  1403. - sensorId
  1404. - name
  1405. properties:
  1406. Sensor@NavigationLink:
  1407. description: Navigation link to detail info of the sensor
  1408. type: string
  1409. format: uri
  1410. sensorId:
  1411. description: Identifier of the unit
  1412. type: integer
  1413. format: int64
  1414. name:
  1415. type: string
  1416. type:
  1417. type: string
  1418. example:
  1419. Sensor@NavigationLink: "<domain>/sensors/105"
  1420. sensorId: 105
  1421. name: "Sensor 105"
  1422. type: "temperature"
  1423. UnitCampaignBasicInfo:
  1424. type: object
  1425. required:
  1426. - id
  1427. - fromTime
  1428. - toTime
  1429. properties:
  1430. Campaign@NavigationLink:
  1431. type: string
  1432. format: uri
  1433. description: Navigation link to the campaign info
  1434. id:
  1435. type: integer
  1436. format: int64
  1437. description: Identifier of the campaign
  1438. description:
  1439. type: string
  1440. description: Description of the campaign
  1441. fromTime:
  1442. type: string
  1443. format: date-time
  1444. description: Time from the unit was active in the campaign
  1445. toTime:
  1446. type: string
  1447. format: date-time
  1448. description: Time until the unit was active in the campaign
  1449. example:
  1450. Campaign@NavigationLink: "<domain>/campaigns/1"
  1451. id: 1
  1452. description: "Campaign 1"
  1453. fromTime: "2023-01-25 15:35:32Z"
  1454. toTime: "2023-03-20 10:35:32Z"
  1455. SensorBasicInfo:
  1456. type: object
  1457. required:
  1458. - id
  1459. - name
  1460. properties:
  1461. Sensor@NavigationLink:
  1462. description: Navigation link to detail info of the sensor
  1463. type: string
  1464. format: uri
  1465. id:
  1466. type: integer
  1467. format: int64
  1468. name:
  1469. type: string
  1470. description:
  1471. type: string
  1472. example:
  1473. Sensor@NavigationLink: "<domain>/sensors/105"
  1474. id: 105
  1475. name: "Sensor 105"
  1476. description: "Description of the sensor 105"
  1477. SensorDetailInfo:
  1478. type: object
  1479. required:
  1480. - sensorId
  1481. - name
  1482. - phenomenon
  1483. properties:
  1484. self@NavigationLink:
  1485. type: string
  1486. format: uri
  1487. Units@NavigationLink:
  1488. type: string
  1489. format: uri
  1490. Phenomenon@NavigationLink:
  1491. type: string
  1492. format: uri
  1493. sensorId:
  1494. type: integer
  1495. format: int64
  1496. name:
  1497. type: string
  1498. phenomenon:
  1499. type: string
  1500. type:
  1501. type: string
  1502. description:
  1503. type: string
  1504. example:
  1505. self@NavigationLink: "<domain>/sensors/105"
  1506. Phenomenon@NavigationLink: "<domain>/phenomenons/15"
  1507. Units@NavigationLink: "<domain>/sensors/105/units"
  1508. sensorId: 105
  1509. name: "Sensor 105"
  1510. description: "Description of the sensor 105"
  1511. type: "type of sensor"
  1512. phenomenon: "Temperature"
  1513. SensorUnitBasicInfo:
  1514. type: object
  1515. required:
  1516. - unitId
  1517. - name
  1518. properties:
  1519. Unit@NavigationLink:
  1520. type: string
  1521. format: uri
  1522. unitId:
  1523. description: Identifier of the unit
  1524. type: integer
  1525. format: int64
  1526. name:
  1527. type: string
  1528. description:
  1529. type: string
  1530. example:
  1531. Unit@NavigationLink: "<domain>/units/25"
  1532. unitId: 25
  1533. name: "Mobile Unit"
  1534. description: "Mobile Unit 25"
  1535. PhenomenonBasicInfo:
  1536. type: object
  1537. required:
  1538. - id
  1539. - name
  1540. properties:
  1541. Phenomenon@NavigationLink:
  1542. type: string
  1543. format: uri
  1544. id:
  1545. type: integer
  1546. format: int64
  1547. name:
  1548. type: string
  1549. example:
  1550. Phenomenon@NavigationLink: "<domain>/phenomenons/15"
  1551. id: 15
  1552. name: "Temperature"
  1553. PhenomenonDetailInfo:
  1554. type: object
  1555. required:
  1556. - id
  1557. - name
  1558. - uom
  1559. properties:
  1560. self@NavigationLink:
  1561. type: string
  1562. format: uri
  1563. Sensors@NavigationLink:
  1564. type: string
  1565. format: uri
  1566. id:
  1567. type: integer
  1568. format: int64
  1569. name:
  1570. type: string
  1571. uom:
  1572. type: string
  1573. maxLength: 30
  1574. uomLink:
  1575. type: string
  1576. format: uri
  1577. example:
  1578. self@NavigationLink: "<domain>/phenomenons/15"
  1579. Sensors@NavigationLink: "<domain>/phenomenons/15/sensors"
  1580. id: 15
  1581. name: "Temperature"
  1582. uom: "uom"
  1583. uomLink: "uom link"
  1584. PhenomenonSensorBasicInfo:
  1585. type: object
  1586. required:
  1587. - Phenomenon@NavigationLink
  1588. - Sensor@NavigationLink
  1589. - sensorId
  1590. - name
  1591. properties:
  1592. Phenomenon@NavigationLink:
  1593. type: string
  1594. format: uri
  1595. Sensor@NavigationLink:
  1596. type: string
  1597. format: uri
  1598. sensorId:
  1599. type: integer
  1600. format: int64
  1601. name:
  1602. type: string
  1603. description:
  1604. type: string
  1605. example:
  1606. Phenomenon@NavigationLink: "<domain>/phenomenons/15"
  1607. Sensor@NavigationLink: "<domain>/sensors/105"
  1608. sensorId: 105
  1609. name: "Sensor 105"
  1610. description: "Description of Sensor 105"
  1611. Info:
  1612. required:
  1613. - name
  1614. - version
  1615. - build
  1616. - uptime
  1617. - uptimeMillis
  1618. properties:
  1619. name:
  1620. type: string
  1621. version:
  1622. type: string
  1623. build:
  1624. type: string
  1625. uptimeMillis:
  1626. type: integer
  1627. format: int64
  1628. uptime:
  1629. type: string
  1630. example:
  1631. name: "senslog-telemetry"
  1632. version: "1.1.0"
  1633. build: "123456789"
  1634. uptimeMillis: 1684862333
  1635. uptime: "1:20:00"
  1636. Error:
  1637. required:
  1638. - code
  1639. - message
  1640. properties:
  1641. code:
  1642. type: integer
  1643. format: int32
  1644. message:
  1645. type: string
  1646. example:
  1647. code: 404
  1648. message: "Not Found"