Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

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