Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 

2081 рядки
50 KiB

  1. {
  2. "openapi": "3.0.0",
  3. "info": {
  4. "title": "RES LEVIS API",
  5. "description": "API for RES LEVIS project",
  6. "contact": {
  7. "email": "info@reslevis.com"
  8. },
  9. "license": {
  10. "name": "Apache 2.0",
  11. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  12. },
  13. "version": "1.0.4"
  14. },
  15. "servers": [
  16. {
  17. "url": "https://192.168.1.3:5050/reslevis",
  18. "description": "Res Levis API Server"
  19. },
  20. {
  21. "url": "https://webhook.site/014887a9-bfa4-48a8-a349-935d8f8f8096",
  22. "description": "Res Levis Webhook"
  23. }
  24. ],
  25. "tags": [
  26. {
  27. "name": "Admins",
  28. "description": "Secured Admin-only calls"
  29. },
  30. {
  31. "name": "Developers",
  32. "description": "Operations available to regular developers"
  33. }
  34. ],
  35. "paths": {
  36. "/getBuildings": {
  37. "get": {
  38. "tags": [
  39. "Developers"
  40. ],
  41. "summary": "Get the buildings",
  42. "description": "Get the buildings\n",
  43. "operationId": "getBuildings",
  44. "parameters": [
  45. {
  46. "name": "id",
  47. "in": "query",
  48. "description": "id of the item to get",
  49. "required": false,
  50. "schema": {
  51. "type": "string"
  52. }
  53. },
  54. {
  55. "name": "searchString",
  56. "in": "query",
  57. "description": "pass an optional search string for looking up inventory",
  58. "required": false,
  59. "schema": {
  60. "type": "string"
  61. }
  62. },
  63. {
  64. "name": "skip",
  65. "in": "query",
  66. "description": "number of records to skip for pagination",
  67. "required": false,
  68. "schema": {
  69. "minimum": 0,
  70. "type": "integer",
  71. "format": "int32"
  72. }
  73. },
  74. {
  75. "name": "limit",
  76. "in": "query",
  77. "description": "maximum number of records to return",
  78. "required": false,
  79. "schema": {
  80. "maximum": 1000,
  81. "minimum": 0,
  82. "type": "integer",
  83. "format": "int32"
  84. }
  85. }
  86. ],
  87. "responses": {
  88. "200": {
  89. "description": "search results matching criteria",
  90. "content": {
  91. "application/json": {
  92. "schema": {
  93. "type": "array",
  94. "items": {
  95. "$ref": "#/components/schemas/BuildingItem"
  96. }
  97. }
  98. }
  99. }
  100. },
  101. "400": {
  102. "description": "bad input parameter"
  103. }
  104. }
  105. },
  106. "servers": [
  107. {
  108. "url": "",
  109. "description": ""
  110. }
  111. ]
  112. },
  113. "/postBuilding": {
  114. "post": {
  115. "tags": [
  116. "Developers"
  117. ],
  118. "summary": "Post a building item",
  119. "description": "Post a building",
  120. "operationId": "postBuilding",
  121. "requestBody": {
  122. "description": "plan item",
  123. "content": {
  124. "application/json": {
  125. "schema": {
  126. "$ref": "#/components/schemas/BuildingItem"
  127. }
  128. }
  129. }
  130. },
  131. "responses": {
  132. "201": {
  133. "description": "item created"
  134. },
  135. "400": {
  136. "description": "invalid input, object invalid"
  137. },
  138. "409": {
  139. "description": "an existing item already exists"
  140. }
  141. }
  142. },
  143. "servers": [
  144. {
  145. "url": "",
  146. "description": ""
  147. }
  148. ]
  149. },
  150. "/removeBuilding": {
  151. "post": {
  152. "tags": [
  153. "Developers"
  154. ],
  155. "summary": "Remove a building item",
  156. "description": "Remove a building",
  157. "operationId": "removeBuilding",
  158. "requestBody": {
  159. "description": "plan item",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "$ref": "#/components/schemas/removeItem"
  164. }
  165. }
  166. }
  167. },
  168. "responses": {
  169. "201": {
  170. "description": "item removed"
  171. },
  172. "400": {
  173. "description": "invalid input, object invalid"
  174. },
  175. "409": {
  176. "description": "the item can't be removed"
  177. }
  178. }
  179. },
  180. "servers": [
  181. {
  182. "url": "",
  183. "description": ""
  184. }
  185. ]
  186. },
  187. "/getPlans": {
  188. "get": {
  189. "tags": [
  190. "Developers"
  191. ],
  192. "summary": "Get the plans",
  193. "description": "Get the plans\n",
  194. "operationId": "getPlans",
  195. "parameters": [
  196. {
  197. "name": "id",
  198. "in": "query",
  199. "description": "id of the item to get",
  200. "required": false,
  201. "schema": {
  202. "type": "string"
  203. }
  204. },
  205. {
  206. "name": "searchString",
  207. "in": "query",
  208. "description": "pass an optional search string for looking up inventory",
  209. "required": false,
  210. "schema": {
  211. "type": "string"
  212. }
  213. },
  214. {
  215. "name": "skip",
  216. "in": "query",
  217. "description": "number of records to skip for pagination",
  218. "required": false,
  219. "schema": {
  220. "minimum": 0,
  221. "type": "integer",
  222. "format": "int32"
  223. }
  224. },
  225. {
  226. "name": "limit",
  227. "in": "query",
  228. "description": "maximum number of records to return",
  229. "required": false,
  230. "schema": {
  231. "maximum": 1000,
  232. "minimum": 0,
  233. "type": "integer",
  234. "format": "int32"
  235. }
  236. }
  237. ],
  238. "responses": {
  239. "200": {
  240. "description": "search results matching criteria",
  241. "content": {
  242. "application/json": {
  243. "schema": {
  244. "type": "array",
  245. "items": {
  246. "$ref": "#/components/schemas/PlanItem"
  247. }
  248. }
  249. }
  250. }
  251. },
  252. "400": {
  253. "description": "bad input parameter"
  254. }
  255. }
  256. },
  257. "servers": [
  258. {
  259. "url": "",
  260. "description": ""
  261. }
  262. ]
  263. },
  264. "/postPlan": {
  265. "post": {
  266. "tags": [
  267. "Developers"
  268. ],
  269. "summary": "Post a plan item",
  270. "description": "Post a plan",
  271. "operationId": "postPlan",
  272. "requestBody": {
  273. "description": "plan item",
  274. "content": {
  275. "application/json": {
  276. "schema": {
  277. "$ref": "#/components/schemas/PlanItem"
  278. }
  279. }
  280. }
  281. },
  282. "responses": {
  283. "201": {
  284. "description": "item created"
  285. },
  286. "400": {
  287. "description": "invalid input, object invalid"
  288. },
  289. "409": {
  290. "description": "an existing item already exists"
  291. }
  292. }
  293. },
  294. "servers": [
  295. {
  296. "url": "",
  297. "description": ""
  298. }
  299. ]
  300. },
  301. "/removePlan": {
  302. "post": {
  303. "tags": [
  304. "Developers"
  305. ],
  306. "summary": "Remove a plan item",
  307. "description": "Remove a plan",
  308. "operationId": "removePlan",
  309. "requestBody": {
  310. "description": "plan item",
  311. "content": {
  312. "application/json": {
  313. "schema": {
  314. "$ref": "#/components/schemas/removeItem"
  315. }
  316. }
  317. }
  318. },
  319. "responses": {
  320. "201": {
  321. "description": "item removed"
  322. },
  323. "400": {
  324. "description": "invalid input, object invalid"
  325. },
  326. "409": {
  327. "description": "the item can't be removed"
  328. }
  329. }
  330. },
  331. "servers": [
  332. {
  333. "url": "",
  334. "description": ""
  335. }
  336. ]
  337. },
  338. "/getZones": {
  339. "get": {
  340. "tags": [
  341. "Developers"
  342. ],
  343. "summary": "Get the zones",
  344. "description": "Get the zones\n",
  345. "operationId": "getZones",
  346. "parameters": [
  347. {
  348. "name": "id",
  349. "in": "query",
  350. "description": "id of the item to get",
  351. "required": false,
  352. "schema": {
  353. "type": "string"
  354. }
  355. },
  356. {
  357. "name": "searchString",
  358. "in": "query",
  359. "description": "pass an optional search string for looking up inventory",
  360. "required": false,
  361. "schema": {
  362. "type": "string"
  363. }
  364. },
  365. {
  366. "name": "skip",
  367. "in": "query",
  368. "description": "number of records to skip for pagination",
  369. "required": false,
  370. "schema": {
  371. "minimum": 0,
  372. "type": "integer",
  373. "format": "int32"
  374. }
  375. },
  376. {
  377. "name": "limit",
  378. "in": "query",
  379. "description": "maximum number of records to return",
  380. "required": false,
  381. "schema": {
  382. "maximum": 1000,
  383. "minimum": 0,
  384. "type": "integer",
  385. "format": "int32"
  386. }
  387. }
  388. ],
  389. "responses": {
  390. "200": {
  391. "description": "search results matching criteria",
  392. "content": {
  393. "application/json": {
  394. "schema": {
  395. "type": "array",
  396. "items": {
  397. "$ref": "#/components/schemas/ZoneItem"
  398. }
  399. }
  400. }
  401. }
  402. },
  403. "400": {
  404. "description": "bad input parameter"
  405. }
  406. }
  407. },
  408. "servers": [
  409. {
  410. "url": "",
  411. "description": ""
  412. }
  413. ]
  414. },
  415. "/postZone": {
  416. "post": {
  417. "tags": [
  418. "Developers"
  419. ],
  420. "summary": "Post a zone item",
  421. "description": "Post a zone item",
  422. "operationId": "postZone",
  423. "requestBody": {
  424. "description": "zone item",
  425. "content": {
  426. "application/json": {
  427. "schema": {
  428. "$ref": "#/components/schemas/ZoneItem"
  429. }
  430. }
  431. }
  432. },
  433. "responses": {
  434. "201": {
  435. "description": "item created"
  436. },
  437. "400": {
  438. "description": "invalid input, object invalid"
  439. },
  440. "409": {
  441. "description": "an existing item already exists"
  442. }
  443. }
  444. },
  445. "servers": [
  446. {
  447. "url": "",
  448. "description": ""
  449. }
  450. ]
  451. },
  452. "/removeZone": {
  453. "post": {
  454. "tags": [
  455. "Developers"
  456. ],
  457. "summary": "Remove a plan item",
  458. "description": "Remove a plan",
  459. "operationId": "removeZone",
  460. "requestBody": {
  461. "description": "zone item to be removed",
  462. "content": {
  463. "application/json": {
  464. "schema": {
  465. "$ref": "#/components/schemas/removeItem"
  466. }
  467. }
  468. }
  469. },
  470. "responses": {
  471. "201": {
  472. "description": "item removed"
  473. },
  474. "400": {
  475. "description": "invalid input, object invalid"
  476. },
  477. "409": {
  478. "description": "the item can't be removed"
  479. }
  480. }
  481. },
  482. "servers": [
  483. {
  484. "url": "",
  485. "description": ""
  486. }
  487. ]
  488. },
  489. "/getGateways": {
  490. "get": {
  491. "tags": [
  492. "Developers"
  493. ],
  494. "summary": "Get the gateways",
  495. "description": "Get the gateways\n",
  496. "operationId": "getGateways",
  497. "parameters": [
  498. {
  499. "name": "id",
  500. "in": "query",
  501. "description": "id of the item to get",
  502. "required": false,
  503. "schema": {
  504. "type": "string"
  505. }
  506. },
  507. {
  508. "name": "searchString",
  509. "in": "query",
  510. "description": "pass an optional search string for looking up inventory",
  511. "required": false,
  512. "schema": {
  513. "type": "string"
  514. }
  515. },
  516. {
  517. "name": "skip",
  518. "in": "query",
  519. "description": "number of records to skip for pagination",
  520. "required": false,
  521. "schema": {
  522. "minimum": 0,
  523. "type": "integer",
  524. "format": "int32"
  525. }
  526. },
  527. {
  528. "name": "limit",
  529. "in": "query",
  530. "description": "maximum number of records to return",
  531. "required": false,
  532. "schema": {
  533. "maximum": 1000,
  534. "minimum": 0,
  535. "type": "integer",
  536. "format": "int32"
  537. }
  538. }
  539. ],
  540. "responses": {
  541. "200": {
  542. "description": "search results matching criteria",
  543. "content": {
  544. "application/json": {
  545. "schema": {
  546. "type": "array",
  547. "items": {
  548. "$ref": "#/components/schemas/GatewayItem"
  549. }
  550. }
  551. }
  552. }
  553. },
  554. "400": {
  555. "description": "bad input parameter"
  556. }
  557. }
  558. },
  559. "servers": [
  560. {
  561. "url": "",
  562. "description": ""
  563. }
  564. ]
  565. },
  566. "/postGateway": {
  567. "post": {
  568. "tags": [
  569. "Developers"
  570. ],
  571. "summary": "Post a gateway item",
  572. "description": "Post a gateway item",
  573. "operationId": "postGateway",
  574. "requestBody": {
  575. "description": "gateway item",
  576. "content": {
  577. "application/json": {
  578. "schema": {
  579. "$ref": "#/components/schemas/GatewayItem"
  580. }
  581. }
  582. }
  583. },
  584. "responses": {
  585. "201": {
  586. "description": "item created"
  587. },
  588. "400": {
  589. "description": "invalid input, object invalid"
  590. },
  591. "409": {
  592. "description": "an existing item already exists"
  593. }
  594. }
  595. },
  596. "servers": [
  597. {
  598. "url": "",
  599. "description": ""
  600. }
  601. ]
  602. },
  603. "/removeGateway": {
  604. "post": {
  605. "tags": [
  606. "Developers"
  607. ],
  608. "summary": "Remove a gateway item",
  609. "description": "Remove a gateway",
  610. "operationId": "removeGateway",
  611. "requestBody": {
  612. "description": "gateway item to be removed",
  613. "content": {
  614. "application/json": {
  615. "schema": {
  616. "$ref": "#/components/schemas/removeItem"
  617. }
  618. }
  619. }
  620. },
  621. "responses": {
  622. "201": {
  623. "description": "item removed"
  624. },
  625. "400": {
  626. "description": "invalid input, object invalid"
  627. },
  628. "409": {
  629. "description": "the item can't be removed"
  630. }
  631. }
  632. },
  633. "servers": [
  634. {
  635. "url": "",
  636. "description": ""
  637. }
  638. ]
  639. },
  640. "/getTrackers": {
  641. "get": {
  642. "tags": [
  643. "Developers"
  644. ],
  645. "summary": "Get the trackers",
  646. "description": "Get the trackers\n",
  647. "operationId": "getTrackers",
  648. "parameters": [
  649. {
  650. "name": "id",
  651. "in": "query",
  652. "description": "id of the item to get",
  653. "required": false,
  654. "schema": {
  655. "type": "string"
  656. }
  657. },
  658. {
  659. "name": "searchString",
  660. "in": "query",
  661. "description": "pass an optional search string for looking up inventory",
  662. "required": false,
  663. "schema": {
  664. "type": "string"
  665. }
  666. },
  667. {
  668. "name": "skip",
  669. "in": "query",
  670. "description": "number of records to skip for pagination",
  671. "required": false,
  672. "schema": {
  673. "minimum": 0,
  674. "type": "integer",
  675. "format": "int32"
  676. }
  677. },
  678. {
  679. "name": "limit",
  680. "in": "query",
  681. "description": "maximum number of records to return",
  682. "required": false,
  683. "schema": {
  684. "maximum": 1000,
  685. "minimum": 0,
  686. "type": "integer",
  687. "format": "int32"
  688. }
  689. }
  690. ],
  691. "responses": {
  692. "200": {
  693. "description": "search results matching criteria",
  694. "content": {
  695. "application/json": {
  696. "schema": {
  697. "type": "array",
  698. "items": {
  699. "$ref": "#/components/schemas/TrackerItem"
  700. }
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "bad input parameter"
  707. }
  708. }
  709. },
  710. "servers": [
  711. {
  712. "url": "",
  713. "description": ""
  714. }
  715. ]
  716. },
  717. "/postTracker": {
  718. "post": {
  719. "tags": [
  720. "Developers"
  721. ],
  722. "summary": "Post a tracker item",
  723. "description": "Post a tracker item",
  724. "operationId": "postTracker",
  725. "requestBody": {
  726. "description": "tracker item",
  727. "content": {
  728. "application/json": {
  729. "schema": {
  730. "$ref": "#/components/schemas/TrackerItem"
  731. }
  732. }
  733. }
  734. },
  735. "responses": {
  736. "201": {
  737. "description": "item created"
  738. },
  739. "400": {
  740. "description": "invalid input, object invalid"
  741. },
  742. "409": {
  743. "description": "an existing item already exists"
  744. }
  745. }
  746. },
  747. "servers": [
  748. {
  749. "url": "",
  750. "description": ""
  751. }
  752. ]
  753. },
  754. "/removeTracker": {
  755. "post": {
  756. "tags": [
  757. "Developers"
  758. ],
  759. "summary": "Remove a tracker item",
  760. "description": "Remove a tracker",
  761. "operationId": "removeTracker",
  762. "requestBody": {
  763. "description": "tracker item to be removed",
  764. "content": {
  765. "application/json": {
  766. "schema": {
  767. "$ref": "#/components/schemas/removeItem"
  768. }
  769. }
  770. }
  771. },
  772. "responses": {
  773. "201": {
  774. "description": "item removed"
  775. },
  776. "400": {
  777. "description": "invalid input, object invalid"
  778. },
  779. "409": {
  780. "description": "the item can't be removed"
  781. }
  782. }
  783. },
  784. "servers": [
  785. {
  786. "url": "",
  787. "description": ""
  788. }
  789. ]
  790. },
  791. "/getOperators": {
  792. "get": {
  793. "tags": [
  794. "Developers"
  795. ],
  796. "summary": "Get the operators",
  797. "description": "Get the operators\n",
  798. "operationId": "getOperators",
  799. "parameters": [
  800. {
  801. "name": "id",
  802. "in": "query",
  803. "description": "id of the item to get",
  804. "required": false,
  805. "schema": {
  806. "type": "string"
  807. }
  808. },
  809. {
  810. "name": "searchString",
  811. "in": "query",
  812. "description": "pass an optional search string for looking up inventory",
  813. "required": false,
  814. "schema": {
  815. "type": "string"
  816. }
  817. },
  818. {
  819. "name": "skip",
  820. "in": "query",
  821. "description": "number of records to skip for pagination",
  822. "required": false,
  823. "schema": {
  824. "minimum": 0,
  825. "type": "integer",
  826. "format": "int32"
  827. }
  828. },
  829. {
  830. "name": "limit",
  831. "in": "query",
  832. "description": "maximum number of records to return",
  833. "required": false,
  834. "schema": {
  835. "maximum": 1000,
  836. "minimum": 0,
  837. "type": "integer",
  838. "format": "int32"
  839. }
  840. }
  841. ],
  842. "responses": {
  843. "200": {
  844. "description": "search results matching criteria",
  845. "content": {
  846. "application/json": {
  847. "schema": {
  848. "type": "array",
  849. "items": {
  850. "$ref": "#/components/schemas/OperatorItem"
  851. }
  852. }
  853. }
  854. }
  855. },
  856. "400": {
  857. "description": "bad input parameter"
  858. }
  859. }
  860. },
  861. "servers": [
  862. {
  863. "url": "",
  864. "description": ""
  865. }
  866. ]
  867. },
  868. "/postOperator": {
  869. "post": {
  870. "tags": [
  871. "Developers"
  872. ],
  873. "summary": "Post an operator item",
  874. "description": "Post an operator item",
  875. "operationId": "postOperator",
  876. "requestBody": {
  877. "description": "operator item",
  878. "content": {
  879. "application/json": {
  880. "schema": {
  881. "$ref": "#/components/schemas/OperatorItem"
  882. }
  883. }
  884. }
  885. },
  886. "responses": {
  887. "201": {
  888. "description": "item created"
  889. },
  890. "400": {
  891. "description": "invalid input, object invalid"
  892. },
  893. "409": {
  894. "description": "an existing item already exists"
  895. }
  896. }
  897. },
  898. "servers": [
  899. {
  900. "url": "",
  901. "description": ""
  902. }
  903. ]
  904. },
  905. "/removeOperator": {
  906. "post": {
  907. "tags": [
  908. "Developers"
  909. ],
  910. "summary": "Remove an operator item",
  911. "description": "Remove an operator",
  912. "operationId": "removeOperator",
  913. "requestBody": {
  914. "description": "operator item to be removed",
  915. "content": {
  916. "application/json": {
  917. "schema": {
  918. "$ref": "#/components/schemas/removeItem"
  919. }
  920. }
  921. }
  922. },
  923. "responses": {
  924. "201": {
  925. "description": "item removed"
  926. },
  927. "400": {
  928. "description": "invalid input, object invalid"
  929. },
  930. "409": {
  931. "description": "the item can't be removed"
  932. }
  933. }
  934. },
  935. "servers": [
  936. {
  937. "url": "",
  938. "description": ""
  939. }
  940. ]
  941. },
  942. "/getSubjects": {
  943. "get": {
  944. "tags": [
  945. "Developers"
  946. ],
  947. "summary": "Get the subjects",
  948. "description": "Get the subjects\n",
  949. "operationId": "getSubjects",
  950. "parameters": [
  951. {
  952. "name": "id",
  953. "in": "query",
  954. "description": "id of the item to get",
  955. "required": false,
  956. "schema": {
  957. "type": "string"
  958. }
  959. },
  960. {
  961. "name": "searchString",
  962. "in": "query",
  963. "description": "pass an optional search string for looking up inventory",
  964. "required": false,
  965. "schema": {
  966. "type": "string"
  967. }
  968. },
  969. {
  970. "name": "skip",
  971. "in": "query",
  972. "description": "number of records to skip for pagination",
  973. "required": false,
  974. "schema": {
  975. "minimum": 0,
  976. "type": "integer",
  977. "format": "int32"
  978. }
  979. },
  980. {
  981. "name": "limit",
  982. "in": "query",
  983. "description": "maximum number of records to return",
  984. "required": false,
  985. "schema": {
  986. "maximum": 1000,
  987. "minimum": 0,
  988. "type": "integer",
  989. "format": "int32"
  990. }
  991. }
  992. ],
  993. "responses": {
  994. "200": {
  995. "description": "search results matching criteria",
  996. "content": {
  997. "application/json": {
  998. "schema": {
  999. "type": "array",
  1000. "items": {
  1001. "$ref": "#/components/schemas/SubjectItem"
  1002. }
  1003. }
  1004. }
  1005. }
  1006. },
  1007. "400": {
  1008. "description": "bad input parameter"
  1009. }
  1010. }
  1011. },
  1012. "servers": [
  1013. {
  1014. "url": "",
  1015. "description": ""
  1016. }
  1017. ]
  1018. },
  1019. "/postSubject": {
  1020. "post": {
  1021. "tags": [
  1022. "Developers"
  1023. ],
  1024. "summary": "Post a subject item",
  1025. "description": "Post a subject",
  1026. "operationId": "postSubject",
  1027. "requestBody": {
  1028. "description": "subject item",
  1029. "content": {
  1030. "application/json": {
  1031. "schema": {
  1032. "$ref": "#/components/schemas/SubjectItem"
  1033. }
  1034. }
  1035. }
  1036. },
  1037. "responses": {
  1038. "201": {
  1039. "description": "item created"
  1040. },
  1041. "400": {
  1042. "description": "invalid input, object invalid"
  1043. },
  1044. "409": {
  1045. "description": "an existing item already exists"
  1046. }
  1047. }
  1048. },
  1049. "servers": [
  1050. {
  1051. "url": "",
  1052. "description": ""
  1053. }
  1054. ]
  1055. },
  1056. "/removeSubject": {
  1057. "post": {
  1058. "tags": [
  1059. "Developers"
  1060. ],
  1061. "summary": "Remove a subject item",
  1062. "description": "Remove a subject",
  1063. "operationId": "removeSubject",
  1064. "requestBody": {
  1065. "description": "subject item to be removed",
  1066. "content": {
  1067. "application/json": {
  1068. "schema": {
  1069. "$ref": "#/components/schemas/removeItem"
  1070. }
  1071. }
  1072. }
  1073. },
  1074. "responses": {
  1075. "201": {
  1076. "description": "item removed"
  1077. },
  1078. "400": {
  1079. "description": "invalid input, object invalid"
  1080. },
  1081. "409": {
  1082. "description": "the item can't be removed"
  1083. }
  1084. }
  1085. },
  1086. "servers": [
  1087. {
  1088. "url": "",
  1089. "description": ""
  1090. }
  1091. ]
  1092. },
  1093. "/getAlarms": {
  1094. "get": {
  1095. "tags": [
  1096. "Developers"
  1097. ],
  1098. "summary": "Get the alarms",
  1099. "description": "Get the alarms\n",
  1100. "operationId": "getAlarms",
  1101. "parameters": [
  1102. {
  1103. "name": "id",
  1104. "in": "query",
  1105. "description": "id of the item to get",
  1106. "required": false,
  1107. "schema": {
  1108. "type": "string"
  1109. }
  1110. },
  1111. {
  1112. "name": "searchString",
  1113. "in": "query",
  1114. "description": "pass an optional search string for looking up inventory",
  1115. "required": false,
  1116. "schema": {
  1117. "type": "string"
  1118. }
  1119. },
  1120. {
  1121. "name": "skip",
  1122. "in": "query",
  1123. "description": "number of records to skip for pagination",
  1124. "required": false,
  1125. "schema": {
  1126. "minimum": 0,
  1127. "type": "integer",
  1128. "format": "int32"
  1129. }
  1130. },
  1131. {
  1132. "name": "limit",
  1133. "in": "query",
  1134. "description": "maximum number of records to return",
  1135. "required": false,
  1136. "schema": {
  1137. "maximum": 1000,
  1138. "minimum": 0,
  1139. "type": "integer",
  1140. "format": "int32"
  1141. }
  1142. }
  1143. ],
  1144. "responses": {
  1145. "200": {
  1146. "description": "search results matching criteria",
  1147. "content": {
  1148. "application/json": {
  1149. "schema": {
  1150. "type": "array",
  1151. "items": {
  1152. "$ref": "#/components/schemas/AlarmItem"
  1153. }
  1154. }
  1155. }
  1156. }
  1157. },
  1158. "400": {
  1159. "description": "bad input parameter"
  1160. }
  1161. }
  1162. },
  1163. "servers": [
  1164. {
  1165. "url": "",
  1166. "description": ""
  1167. }
  1168. ]
  1169. },
  1170. "/postAlarm": {
  1171. "post": {
  1172. "tags": [
  1173. "Developers"
  1174. ],
  1175. "summary": "Post an alarm",
  1176. "description": "Post an alarm",
  1177. "operationId": "postAlarm",
  1178. "requestBody": {
  1179. "description": "alarm item",
  1180. "content": {
  1181. "application/json": {
  1182. "schema": {
  1183. "$ref": "#/components/schemas/AlarmItem"
  1184. }
  1185. }
  1186. }
  1187. },
  1188. "responses": {
  1189. "201": {
  1190. "description": "item created"
  1191. },
  1192. "400": {
  1193. "description": "invalid input, object invalid"
  1194. },
  1195. "409": {
  1196. "description": "an existing item already exists"
  1197. }
  1198. }
  1199. },
  1200. "servers": [
  1201. {
  1202. "url": "",
  1203. "description": ""
  1204. }
  1205. ]
  1206. },
  1207. "/removeAlarm": {
  1208. "post": {
  1209. "tags": [
  1210. "Developers"
  1211. ],
  1212. "summary": "Remove an alarm item",
  1213. "description": "Remove an alarm",
  1214. "operationId": "removeAlarm",
  1215. "requestBody": {
  1216. "description": "alarm item to be removed",
  1217. "content": {
  1218. "application/json": {
  1219. "schema": {
  1220. "$ref": "#/components/schemas/removeItem"
  1221. }
  1222. }
  1223. }
  1224. },
  1225. "responses": {
  1226. "201": {
  1227. "description": "item removed"
  1228. },
  1229. "400": {
  1230. "description": "invalid input, object invalid"
  1231. },
  1232. "409": {
  1233. "description": "the item can't be removed"
  1234. }
  1235. }
  1236. },
  1237. "servers": [
  1238. {
  1239. "url": "",
  1240. "description": ""
  1241. }
  1242. ]
  1243. },
  1244. "/getTracks": {
  1245. "get": {
  1246. "tags": [
  1247. "Developers"
  1248. ],
  1249. "summary": "Get the tracks",
  1250. "description": "Get the tracks\n",
  1251. "operationId": "getTracks",
  1252. "parameters": [
  1253. {
  1254. "name": "id",
  1255. "in": "query",
  1256. "description": "id of the item to get",
  1257. "required": false,
  1258. "schema": {
  1259. "type": "string"
  1260. }
  1261. },
  1262. {
  1263. "name": "searchString",
  1264. "in": "query",
  1265. "description": "pass an optional search string for looking up inventory",
  1266. "required": false,
  1267. "schema": {
  1268. "type": "string"
  1269. }
  1270. },
  1271. {
  1272. "name": "skip",
  1273. "in": "query",
  1274. "description": "number of records to skip for pagination",
  1275. "required": false,
  1276. "schema": {
  1277. "minimum": 0,
  1278. "type": "integer",
  1279. "format": "int32"
  1280. }
  1281. },
  1282. {
  1283. "name": "limit",
  1284. "in": "query",
  1285. "description": "maximum number of records to return",
  1286. "required": false,
  1287. "schema": {
  1288. "maximum": 1000,
  1289. "minimum": 0,
  1290. "type": "integer",
  1291. "format": "int32"
  1292. }
  1293. }
  1294. ],
  1295. "responses": {
  1296. "200": {
  1297. "description": "search results matching criteria",
  1298. "content": {
  1299. "application/json": {
  1300. "schema": {
  1301. "type": "array",
  1302. "items": {
  1303. "$ref": "#/components/schemas/TrackItem"
  1304. }
  1305. }
  1306. }
  1307. }
  1308. },
  1309. "400": {
  1310. "description": "bad input parameter"
  1311. }
  1312. }
  1313. },
  1314. "servers": [
  1315. {
  1316. "url": "",
  1317. "description": ""
  1318. }
  1319. ]
  1320. },
  1321. "/postTrack": {
  1322. "post": {
  1323. "tags": [
  1324. "Developers"
  1325. ],
  1326. "summary": "Post a track",
  1327. "description": "Post a track",
  1328. "operationId": "postTrack",
  1329. "requestBody": {
  1330. "description": "track item",
  1331. "content": {
  1332. "application/json": {
  1333. "schema": {
  1334. "$ref": "#/components/schemas/TrackItem"
  1335. }
  1336. }
  1337. }
  1338. },
  1339. "responses": {
  1340. "201": {
  1341. "description": "item created"
  1342. },
  1343. "400": {
  1344. "description": "invalid input, object invalid"
  1345. },
  1346. "409": {
  1347. "description": "an existing item already exists"
  1348. }
  1349. }
  1350. },
  1351. "servers": [
  1352. {
  1353. "url": "",
  1354. "description": ""
  1355. }
  1356. ]
  1357. },
  1358. "/removeTrack": {
  1359. "post": {
  1360. "tags": [
  1361. "Developers"
  1362. ],
  1363. "summary": "Remove a track item",
  1364. "description": "Remove a track",
  1365. "operationId": "removeTrack",
  1366. "requestBody": {
  1367. "description": "track item to be removed",
  1368. "content": {
  1369. "application/json": {
  1370. "schema": {
  1371. "$ref": "#/components/schemas/removeItem"
  1372. }
  1373. }
  1374. }
  1375. },
  1376. "responses": {
  1377. "201": {
  1378. "description": "item removed"
  1379. },
  1380. "400": {
  1381. "description": "invalid input, object invalid"
  1382. },
  1383. "409": {
  1384. "description": "the item can't be removed"
  1385. }
  1386. }
  1387. },
  1388. "servers": [
  1389. {
  1390. "url": "",
  1391. "description": ""
  1392. }
  1393. ]
  1394. },
  1395. "/getSettings": {
  1396. "get": {
  1397. "tags": [
  1398. "Developers"
  1399. ],
  1400. "summary": "Get the groups of settings",
  1401. "description": "Get the settings\n",
  1402. "operationId": "getSettings",
  1403. "parameters": [
  1404. {
  1405. "name": "id",
  1406. "in": "query",
  1407. "description": "id of the item to get",
  1408. "required": false,
  1409. "schema": {
  1410. "type": "string"
  1411. }
  1412. },
  1413. {
  1414. "name": "searchString",
  1415. "in": "query",
  1416. "description": "pass an optional search string for looking up inventory",
  1417. "required": false,
  1418. "schema": {
  1419. "type": "string"
  1420. }
  1421. },
  1422. {
  1423. "name": "skip",
  1424. "in": "query",
  1425. "description": "number of records to skip for pagination",
  1426. "required": false,
  1427. "schema": {
  1428. "minimum": 0,
  1429. "type": "integer",
  1430. "format": "int32"
  1431. }
  1432. },
  1433. {
  1434. "name": "limit",
  1435. "in": "query",
  1436. "description": "maximum number of records to return",
  1437. "required": false,
  1438. "schema": {
  1439. "maximum": 1000,
  1440. "minimum": 0,
  1441. "type": "integer",
  1442. "format": "int32"
  1443. }
  1444. }
  1445. ],
  1446. "responses": {
  1447. "200": {
  1448. "description": "search results matching criteria",
  1449. "content": {
  1450. "application/json": {
  1451. "schema": {
  1452. "type": "array",
  1453. "items": {
  1454. "$ref": "#/components/schemas/TrackItem"
  1455. }
  1456. }
  1457. }
  1458. }
  1459. },
  1460. "400": {
  1461. "description": "bad input parameter"
  1462. }
  1463. }
  1464. },
  1465. "servers": [
  1466. {
  1467. "url": "",
  1468. "description": ""
  1469. }
  1470. ]
  1471. },
  1472. "/postSetting": {
  1473. "post": {
  1474. "tags": [
  1475. "Developers"
  1476. ],
  1477. "summary": "Post a group of settings",
  1478. "description": "Post a group settings",
  1479. "operationId": "postSetting",
  1480. "requestBody": {
  1481. "description": "group of settings item",
  1482. "content": {
  1483. "application/json": {
  1484. "schema": {
  1485. "$ref": "#/components/schemas/SettingItem"
  1486. }
  1487. }
  1488. }
  1489. },
  1490. "responses": {
  1491. "201": {
  1492. "description": "item created"
  1493. },
  1494. "400": {
  1495. "description": "invalid input, object invalid"
  1496. },
  1497. "409": {
  1498. "description": "an existing item already exists"
  1499. }
  1500. }
  1501. },
  1502. "servers": [
  1503. {
  1504. "url": "",
  1505. "description": ""
  1506. }
  1507. ]
  1508. },
  1509. "/removeSetting": {
  1510. "post": {
  1511. "tags": [
  1512. "Developers"
  1513. ],
  1514. "summary": "Remove a group of settings item",
  1515. "description": "Remove a group of settings",
  1516. "operationId": "removeSetting",
  1517. "requestBody": {
  1518. "description": "group of setting item to be removed",
  1519. "content": {
  1520. "application/json": {
  1521. "schema": {
  1522. "$ref": "#/components/schemas/removeItem"
  1523. }
  1524. }
  1525. }
  1526. },
  1527. "responses": {
  1528. "201": {
  1529. "description": "item removed"
  1530. },
  1531. "400": {
  1532. "description": "invalid input, object invalid"
  1533. },
  1534. "409": {
  1535. "description": "the item can't be removed"
  1536. }
  1537. }
  1538. },
  1539. "servers": [
  1540. {
  1541. "url": "",
  1542. "description": ""
  1543. }
  1544. ]
  1545. }
  1546. },
  1547. "components": {
  1548. "schemas": {
  1549. "removeItem": {
  1550. "required": [
  1551. "id"
  1552. ],
  1553. "type": "object",
  1554. "properties": {
  1555. "id": {
  1556. "type": "string",
  1557. "format": "uuid"
  1558. }
  1559. },
  1560. "description": "Item to be removed"
  1561. },
  1562. "BuildingItem": {
  1563. "required": [
  1564. "id",
  1565. "name"
  1566. ],
  1567. "type": "object",
  1568. "properties": {
  1569. "id": {
  1570. "type": "string",
  1571. "description": "ID",
  1572. "format": "uuid"
  1573. },
  1574. "name": {
  1575. "type": "string",
  1576. "description": "Name",
  1577. "example": "Hospital"
  1578. },
  1579. "city": {
  1580. "type": "string",
  1581. "description": "City"
  1582. },
  1583. "address": {
  1584. "type": "string",
  1585. "description": "Address"
  1586. },
  1587. "latitude": {
  1588. "type": "number",
  1589. "description": "Latitude"
  1590. },
  1591. "longitude": {
  1592. "type": "number",
  1593. "description": "Longitude"
  1594. }
  1595. },
  1596. "description": "A building or an area that groups together several plan"
  1597. },
  1598. "PlanItem": {
  1599. "required": [
  1600. "id",
  1601. "name"
  1602. ],
  1603. "type": "object",
  1604. "properties": {
  1605. "id": {
  1606. "type": "string",
  1607. "description": "ID",
  1608. "format": "uuid"
  1609. },
  1610. "name": {
  1611. "type": "string",
  1612. "description": "Name",
  1613. "example": "Building 1 - Floor 1"
  1614. },
  1615. "image": {
  1616. "type": "string",
  1617. "description": "Image",
  1618. "format": "uri",
  1619. "example": "The URL of the image"
  1620. },
  1621. "scale": {
  1622. "type": "number",
  1623. "description": "Scale",
  1624. "example": 1
  1625. },
  1626. "Building": {
  1627. "type": "string",
  1628. "description": "Building",
  1629. "format": "dbid"
  1630. }
  1631. },
  1632. "description": "A plan is floor or a space of a building"
  1633. },
  1634. "ZoneItem": {
  1635. "required": [
  1636. "id",
  1637. "name"
  1638. ],
  1639. "type": "object",
  1640. "properties": {
  1641. "id": {
  1642. "type": "string",
  1643. "description": "ID",
  1644. "format": "uuid"
  1645. },
  1646. "name": {
  1647. "type": "string",
  1648. "description": "Name",
  1649. "example": "Floor 1 - Room 1"
  1650. },
  1651. "groups": {
  1652. "type": "string",
  1653. "description": "Groups"
  1654. },
  1655. "Plan": {
  1656. "type": "string",
  1657. "description": "Plan",
  1658. "format": "dbid"
  1659. },
  1660. "Building": {
  1661. "type": "string",
  1662. "description": "Building",
  1663. "format": "dbid"
  1664. }
  1665. },
  1666. "description": "A zone is a room or a sub-area of a plan"
  1667. },
  1668. "GatewayItem": {
  1669. "required": [
  1670. "id",
  1671. "name"
  1672. ],
  1673. "type": "object",
  1674. "properties": {
  1675. "id": {
  1676. "type": "string",
  1677. "description": "ID",
  1678. "format": "uuid"
  1679. },
  1680. "name": {
  1681. "type": "string",
  1682. "description": "Name"
  1683. },
  1684. "mac": {
  1685. "type": "string",
  1686. "description": "MAC"
  1687. },
  1688. "status": {
  1689. "type": "boolean",
  1690. "description": "Status"
  1691. },
  1692. "model": {
  1693. "type": "string",
  1694. "description": "Model"
  1695. },
  1696. "ip": {
  1697. "type": "string",
  1698. "description": "IP"
  1699. },
  1700. "position": {
  1701. "type": "string",
  1702. "description": "Position"
  1703. },
  1704. "x": {
  1705. "type": "number",
  1706. "description": "X"
  1707. },
  1708. "y": {
  1709. "type": "number",
  1710. "description": "Y"
  1711. },
  1712. "Plan": {
  1713. "type": "string",
  1714. "description": "Plan",
  1715. "format": "dbid"
  1716. },
  1717. "Zone": {
  1718. "type": "string",
  1719. "description": "Zone",
  1720. "format": "dbid"
  1721. },
  1722. "Building": {
  1723. "type": "string",
  1724. "description": "Building",
  1725. "format": "dbid"
  1726. },
  1727. "notes": {
  1728. "type": "string",
  1729. "description": "Notes"
  1730. }
  1731. },
  1732. "description": "A gateway of the system"
  1733. },
  1734. "TrackerItem": {
  1735. "required": [
  1736. "id",
  1737. "name"
  1738. ],
  1739. "type": "object",
  1740. "properties": {
  1741. "id": {
  1742. "type": "string",
  1743. "description": "ID",
  1744. "format": "uuid"
  1745. },
  1746. "name": {
  1747. "type": "string",
  1748. "description": "Name"
  1749. },
  1750. "mac": {
  1751. "type": "string",
  1752. "description": "MAC"
  1753. },
  1754. "status": {
  1755. "type": "string",
  1756. "description": "Status"
  1757. },
  1758. "model": {
  1759. "type": "string",
  1760. "description": "Model"
  1761. },
  1762. "position": {
  1763. "type": "string",
  1764. "description": "Position"
  1765. },
  1766. "x": {
  1767. "type": "number",
  1768. "description": "X"
  1769. },
  1770. "y": {
  1771. "type": "number",
  1772. "description": "Y"
  1773. },
  1774. "Zone": {
  1775. "type": "string",
  1776. "description": "Zone",
  1777. "format": "dbid"
  1778. },
  1779. "Building": {
  1780. "type": "string",
  1781. "description": "Building",
  1782. "format": "dbid"
  1783. },
  1784. "notes": {
  1785. "type": "string",
  1786. "description": "Notes"
  1787. }
  1788. },
  1789. "description": "A tracker of the system"
  1790. },
  1791. "OperatorItem": {
  1792. "required": [
  1793. "id",
  1794. "name"
  1795. ],
  1796. "type": "object",
  1797. "properties": {
  1798. "id": {
  1799. "type": "string",
  1800. "description": "ID"
  1801. },
  1802. "name": {
  1803. "type": "string",
  1804. "description": "Name"
  1805. },
  1806. "phone": {
  1807. "type": "string",
  1808. "description": "Phone"
  1809. },
  1810. "zones": {
  1811. "type": "string",
  1812. "description": "Zones"
  1813. },
  1814. "groups": {
  1815. "type": "string",
  1816. "description": "Groups"
  1817. },
  1818. "notes": {
  1819. "type": "string",
  1820. "description": "Notes"
  1821. },
  1822. "Building": {
  1823. "type": "string",
  1824. "description": "Building",
  1825. "format": "dbid"
  1826. }
  1827. },
  1828. "description": "An operator who monitors the subjects"
  1829. },
  1830. "SubjectItem": {
  1831. "required": [
  1832. "id",
  1833. "name"
  1834. ],
  1835. "type": "object",
  1836. "properties": {
  1837. "id": {
  1838. "type": "string",
  1839. "description": "ID"
  1840. },
  1841. "name": {
  1842. "type": "string",
  1843. "description": "Name"
  1844. },
  1845. "role": {
  1846. "type": "string",
  1847. "description": "Role"
  1848. },
  1849. "phone": {
  1850. "type": "string",
  1851. "description": "Phone"
  1852. },
  1853. "zones": {
  1854. "type": "string",
  1855. "description": "Zones"
  1856. },
  1857. "groups": {
  1858. "type": "string",
  1859. "description": "Groups"
  1860. },
  1861. "Building": {
  1862. "type": "string",
  1863. "description": "Building",
  1864. "format": "dbid"
  1865. },
  1866. "notes": {
  1867. "type": "string",
  1868. "description": "Notes"
  1869. }
  1870. },
  1871. "description": "Person or object monitored by the operators"
  1872. },
  1873. "AlarmItem": {
  1874. "required": [
  1875. "id"
  1876. ],
  1877. "type": "object",
  1878. "properties": {
  1879. "id": {
  1880. "type": "string",
  1881. "description": "ID"
  1882. },
  1883. "time": {
  1884. "type": "string",
  1885. "description": "Time",
  1886. "format": "time"
  1887. },
  1888. "type": {
  1889. "type": "string",
  1890. "description": "Type"
  1891. },
  1892. "status": {
  1893. "type": "string",
  1894. "description": "Status"
  1895. },
  1896. "gateway": {
  1897. "type": "string",
  1898. "description": "Gateway",
  1899. "format": "uuid"
  1900. },
  1901. "gatewayMac": {
  1902. "type": "string",
  1903. "description": "Gateway MAC"
  1904. },
  1905. "gatewayName": {
  1906. "type": "string",
  1907. "description": "Gateway name"
  1908. },
  1909. "Tracker": {
  1910. "type": "string",
  1911. "description": "Tracker",
  1912. "format": "dbid"
  1913. },
  1914. "trackerMac": {
  1915. "type": "string",
  1916. "description": "Tracker MAC"
  1917. },
  1918. "trackerName": {
  1919. "type": "string",
  1920. "description": "Tracker name"
  1921. },
  1922. "Subject": {
  1923. "type": "string",
  1924. "description": "Subject",
  1925. "format": "dbid"
  1926. },
  1927. "subjectName": {
  1928. "type": "string",
  1929. "description": "Subject name"
  1930. },
  1931. "Operator": {
  1932. "type": "string",
  1933. "description": "Operator",
  1934. "format": "dbid"
  1935. },
  1936. "operatorName": {
  1937. "type": "string",
  1938. "description": "Operator name"
  1939. },
  1940. "Zone": {
  1941. "type": "string",
  1942. "description": "Zone",
  1943. "format": "dbid"
  1944. },
  1945. "zoneName": {
  1946. "type": "string",
  1947. "description": "Zone name"
  1948. },
  1949. "Building": {
  1950. "type": "string",
  1951. "description": "Building",
  1952. "format": "dbid"
  1953. },
  1954. "buildingName": {
  1955. "type": "string",
  1956. "description": "Building name"
  1957. }
  1958. },
  1959. "description": "Alarm triggered if a monitored subject is lost or out of their zone"
  1960. },
  1961. "TrackItem": {
  1962. "required": [
  1963. "id"
  1964. ],
  1965. "type": "object",
  1966. "properties": {
  1967. "id": {
  1968. "type": "string"
  1969. },
  1970. "time": {
  1971. "type": "string",
  1972. "description": "Time",
  1973. "format": "date-time"
  1974. },
  1975. "type": {
  1976. "type": "string",
  1977. "description": "Type"
  1978. },
  1979. "status": {
  1980. "type": "string",
  1981. "description": "Status",
  1982. "enum": [
  1983. "lost",
  1984. "detected",
  1985. "away",
  1986. "help"
  1987. ]
  1988. },
  1989. "Gateway": {
  1990. "type": "string",
  1991. "description": "Gateway",
  1992. "format": "dbid"
  1993. },
  1994. "gatewayMac": {
  1995. "type": "string",
  1996. "description": "Gateway MAC"
  1997. },
  1998. "gatewayName": {
  1999. "type": "string",
  2000. "description": "Gateway name"
  2001. },
  2002. "Tracker": {
  2003. "type": "string",
  2004. "description": "Tracker",
  2005. "format": "dbid"
  2006. },
  2007. "trackerMac": {
  2008. "type": "string",
  2009. "description": "Tracker MAC"
  2010. },
  2011. "trackerName": {
  2012. "type": "string",
  2013. "description": "Tracker name"
  2014. },
  2015. "Subject": {
  2016. "type": "string",
  2017. "description": "Subject",
  2018. "format": "dbid"
  2019. },
  2020. "subjectName": {
  2021. "type": "string",
  2022. "description": "Subject name"
  2023. },
  2024. "Zone": {
  2025. "type": "string",
  2026. "description": "Zone",
  2027. "format": "dbid"
  2028. },
  2029. "zoneName": {
  2030. "type": "string",
  2031. "description": "Zone name"
  2032. },
  2033. "signal": {
  2034. "type": "number"
  2035. },
  2036. "Building": {
  2037. "type": "string",
  2038. "description": "Building",
  2039. "format": "dbid"
  2040. },
  2041. "buildingName": {
  2042. "type": "string",
  2043. "description": "Building name"
  2044. }
  2045. },
  2046. "description": "Log of a state change of a tracker with respect to a gateway"
  2047. },
  2048. "SettingItem": {
  2049. "required": [
  2050. "id"
  2051. ],
  2052. "type": "object",
  2053. "properties": {
  2054. "id": {
  2055. "type": "string",
  2056. "description": "ID"
  2057. },
  2058. "name": {
  2059. "type": "string",
  2060. "description": "Setting name"
  2061. },
  2062. "role": {
  2063. "type": "string",
  2064. "description": "Role",
  2065. "enum": [
  2066. "developer",
  2067. "administrator",
  2068. "user"
  2069. ]
  2070. },
  2071. "debug": {
  2072. "type": "boolean",
  2073. "description": "Debug mode",
  2074. "format": "boolean"
  2075. }
  2076. },
  2077. "description": "General setting of the app"
  2078. }
  2079. }
  2080. }
  2081. }