Advertisement
Guest User

Untitled

a guest
May 6th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 92.71 KB | None | 0 0
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "This file provides API endpoints for User Setup Users Services.",
  5. "version": "1.0.0",
  6. "title": "Rabobank User Setup Users Services",
  7. "termsOfService": "http://usersetup.rabobankapis.com",
  8. "contact": {
  9. "email": "tbd@rabobank.com"
  10. }
  11. },
  12. "host": "rbbdevapimgmt01.azure-api.net",
  13. "basePath": "/api/users",
  14. "tags": [
  15. {
  16. "name": "users",
  17. "description": "User's services",
  18. "externalDocs": {
  19. "description": "Services to manage user",
  20. "url": "http://users.rabobankapis.com"
  21. }
  22. },
  23. {
  24. "name": "notifications",
  25. "description": "User's notifications preferences services",
  26. "externalDocs": {
  27. "description": "Services to manage user",
  28. "url": "http://users-notification.rabobankapis.com"
  29. }
  30. },
  31. {
  32. "name": "device",
  33. "description": "User's device update",
  34. "externalDocs": {
  35. "description": "Services to manage user's device",
  36. "url": "http://user-device.rabobankapis.com"
  37. }
  38. },
  39. {
  40. "name": "terms",
  41. "description": "User's term service",
  42. "externalDocs": {
  43. "description": "Services to manage user's terms",
  44. "url": "http://user-device.rabobankapis.com"
  45. }
  46. }
  47. ],
  48. "schemes": [
  49. "https",
  50. "http"
  51. ],
  52. "consumes": [
  53. "application/json;version=1"
  54. ],
  55. "produces": [
  56. "application/json;version=1"
  57. ],
  58. "paths": {
  59. "/": {
  60. "get": {
  61. "tags": [
  62. "users"
  63. ],
  64. "summary": "List all users",
  65. "description": "List all users matching informed criteria",
  66. "operationId": "getUsers",
  67. "produces": [
  68. "application/json",
  69. "application/json;version=1"
  70. ],
  71. "parameters": [
  72. {
  73. "name": "channel-id",
  74. "in": "header",
  75. "description": "Channel where the requests come from",
  76. "required": true,
  77. "type": "string"
  78. },
  79. {
  80. "name": "device-id",
  81. "in": "header",
  82. "description": "Device's ID",
  83. "required": true,
  84. "type": "string"
  85. },
  86. {
  87. "name": "Authorization",
  88. "in": "header",
  89. "description": "Authorization token",
  90. "required": true,
  91. "type": "string"
  92. },
  93. {
  94. "name": "filter",
  95. "in": "query",
  96. "description": "String for filtering purposes",
  97. "required": false,
  98. "type": "string"
  99. },
  100. {
  101. "name": "status",
  102. "in": "query",
  103. "description": "User´s status a additional filter",
  104. "required": false,
  105. "type": "string"
  106. },
  107. {
  108. "name": "size",
  109. "in": "query",
  110. "description": "Maximun number of user setups to be returned",
  111. "required": false,
  112. "type": "integer",
  113. "minimum": 0,
  114. "default": 0
  115. },
  116. {
  117. "name": "offset",
  118. "in": "query",
  119. "description": "Number of user setups to be skipped",
  120. "required": false,
  121. "type": "integer",
  122. "minimum": 0,
  123. "default": 0
  124. }
  125. ],
  126. "responses": {
  127. "200": {
  128. "description": "OK",
  129. "schema": {
  130. "type": "array",
  131. "items": {
  132. "$ref": "#/definitions/user-return"
  133. }
  134. }
  135. },
  136. "301": {
  137. "description": "Moved Permanently",
  138. "schema": {
  139. "$ref": "#/definitions/error"
  140. }
  141. },
  142. "304": {
  143. "description": "Not Modified",
  144. "schema": {
  145. "$ref": "#/definitions/error"
  146. }
  147. },
  148. "400": {
  149. "description": "A Bad Request Error occured",
  150. "schema": {
  151. "$ref": "#/definitions/error"
  152. }
  153. },
  154. "401": {
  155. "description": "Invalid access token.",
  156. "schema": {
  157. "$ref": "#/definitions/error"
  158. }
  159. },
  160. "403": {
  161. "description": "Forbidden - the user is not authorized to use this resource",
  162. "schema": {
  163. "$ref": "#/definitions/error"
  164. }
  165. },
  166. "404": {
  167. "description": "Resource with supplied ID not found",
  168. "schema": {
  169. "$ref": "#/definitions/error"
  170. }
  171. },
  172. "405": {
  173. "description": "Method Not Allowed",
  174. "schema": {
  175. "$ref": "#/definitions/error"
  176. }
  177. },
  178. "406": {
  179. "description": "Not Acceptable",
  180. "schema": {
  181. "$ref": "#/definitions/error"
  182. }
  183. },
  184. "408": {
  185. "description": "Request timeout",
  186. "schema": {
  187. "$ref": "#/definitions/error"
  188. }
  189. },
  190. "410": {
  191. "description": "Gone - resource does not exist any longe",
  192. "schema": {
  193. "$ref": "#/definitions/error"
  194. }
  195. },
  196. "428": {
  197. "description": "Precondition Required",
  198. "schema": {
  199. "$ref": "#/definitions/error"
  200. }
  201. },
  202. "429": {
  203. "description": "Too many request",
  204. "schema": {
  205. "$ref": "#/definitions/error"
  206. }
  207. },
  208. "500": {
  209. "description": "Internal Server Error",
  210. "schema": {
  211. "$ref": "#/definitions/error"
  212. }
  213. },
  214. "501": {
  215. "description": "Not Implemented - server cannot fulfill the request",
  216. "schema": {
  217. "$ref": "#/definitions/error"
  218. }
  219. },
  220. "503": {
  221. "description": "Service Unavailable - server is (temporarily) not available",
  222. "schema": {
  223. "$ref": "#/definitions/error"
  224. }
  225. }
  226. },
  227. "security": [
  228. {
  229. "users_auth": [
  230. "write:users",
  231. "read:users"
  232. ]
  233. }
  234. ]
  235. },
  236. "post": {
  237. "tags": [
  238. "users"
  239. ],
  240. "summary": "Add a new user",
  241. "description": "Add a new user",
  242. "operationId": "postUser",
  243. "produces": [
  244. "application/json",
  245. "application/json;version=1"
  246. ],
  247. "parameters": [
  248. {
  249. "name": "channel-id",
  250. "in": "header",
  251. "description": "Channel where the requests come from",
  252. "required": true,
  253. "type": "string"
  254. },
  255. {
  256. "name": "device-id",
  257. "in": "header",
  258. "description": "Device's ID",
  259. "required": true,
  260. "type": "string"
  261. },
  262. {
  263. "name": "Authorization",
  264. "in": "header",
  265. "description": "Authorization token",
  266. "required": true,
  267. "type": "string"
  268. },
  269. {
  270. "in": "body",
  271. "name": "user",
  272. "description": "Usaer to be included",
  273. "required": true,
  274. "schema": {
  275. "$ref": "#/definitions/user-return"
  276. }
  277. }
  278. ],
  279. "responses": {
  280. "202": {
  281. "description": "OK",
  282. "schema": {
  283. "$ref": "#/definitions/operation"
  284. }
  285. },
  286. "301": {
  287. "description": "Moved Permanently",
  288. "schema": {
  289. "$ref": "#/definitions/error"
  290. }
  291. },
  292. "304": {
  293. "description": "Not Modified",
  294. "schema": {
  295. "$ref": "#/definitions/error"
  296. }
  297. },
  298. "400": {
  299. "description": "A Bad Request Error occured",
  300. "schema": {
  301. "$ref": "#/definitions/error"
  302. }
  303. },
  304. "401": {
  305. "description": "Invalid access token.",
  306. "schema": {
  307. "$ref": "#/definitions/error"
  308. }
  309. },
  310. "403": {
  311. "description": "Forbidden - the user is not authorized to use this resource",
  312. "schema": {
  313. "$ref": "#/definitions/error"
  314. }
  315. },
  316. "404": {
  317. "description": "Resource with supplied ID not found",
  318. "schema": {
  319. "$ref": "#/definitions/error"
  320. }
  321. },
  322. "405": {
  323. "description": "Method Not Allowed",
  324. "schema": {
  325. "$ref": "#/definitions/error"
  326. }
  327. },
  328. "406": {
  329. "description": "Not Acceptable",
  330. "schema": {
  331. "$ref": "#/definitions/error"
  332. }
  333. },
  334. "408": {
  335. "description": "Request timeout",
  336. "schema": {
  337. "$ref": "#/definitions/error"
  338. }
  339. },
  340. "410": {
  341. "description": "Gone - resource does not exist any longe",
  342. "schema": {
  343. "$ref": "#/definitions/error"
  344. }
  345. },
  346. "428": {
  347. "description": "Precondition Required",
  348. "schema": {
  349. "$ref": "#/definitions/error"
  350. }
  351. },
  352. "429": {
  353. "description": "Too many request",
  354. "schema": {
  355. "$ref": "#/definitions/error"
  356. }
  357. },
  358. "500": {
  359. "description": "Internal Server Error",
  360. "schema": {
  361. "$ref": "#/definitions/error"
  362. }
  363. },
  364. "501": {
  365. "description": "Not Implemented - server cannot fulfill the request",
  366. "schema": {
  367. "$ref": "#/definitions/error"
  368. }
  369. },
  370. "503": {
  371. "description": "Service Unavailable - server is (temporarily) not available",
  372. "schema": {
  373. "$ref": "#/definitions/error"
  374. }
  375. }
  376. },
  377. "security": [
  378. {
  379. "users_auth": [
  380. "write:users",
  381. "read:users"
  382. ]
  383. }
  384. ]
  385. }
  386. },
  387. "/{user-id}": {
  388. "get": {
  389. "tags": [
  390. "users"
  391. ],
  392. "summary": "User info",
  393. "description": "Show user info matching informed criterias",
  394. "operationId": "getUser",
  395. "produces": [
  396. "application/json",
  397. "application/json;version=1"
  398. ],
  399. "parameters": [
  400. {
  401. "name": "channel-id",
  402. "in": "header",
  403. "description": "Channel where the requests come from",
  404. "required": true,
  405. "type": "string"
  406. },
  407. {
  408. "name": "device-id",
  409. "in": "header",
  410. "description": "Device's ID",
  411. "required": true,
  412. "type": "string"
  413. },
  414. {
  415. "name": "Authorization",
  416. "in": "header",
  417. "description": "Authorization token",
  418. "required": true,
  419. "type": "string"
  420. },
  421. {
  422. "name": "user-id",
  423. "in": "path",
  424. "description": "User to be retreaved",
  425. "required": true,
  426. "type": "string",
  427. "format": "email"
  428. },
  429. {
  430. "name": "size",
  431. "in": "query",
  432. "description": "Maximun number of user setups to be returned",
  433. "required": false,
  434. "type": "integer",
  435. "minimum": 0,
  436. "default": 0
  437. },
  438. {
  439. "name": "offset",
  440. "in": "query",
  441. "description": "Number of user setups to be skipped",
  442. "required": false,
  443. "type": "integer",
  444. "minimum": 0,
  445. "default": 0
  446. }
  447. ],
  448. "responses": {
  449. "200": {
  450. "description": "OK",
  451. "schema": {
  452. "$ref": "#/definitions/user-return"
  453. }
  454. },
  455. "301": {
  456. "description": "Moved Permanently",
  457. "schema": {
  458. "$ref": "#/definitions/error"
  459. }
  460. },
  461. "304": {
  462. "description": "Not Modified",
  463. "schema": {
  464. "$ref": "#/definitions/error"
  465. }
  466. },
  467. "400": {
  468. "description": "A Bad Request Error occured",
  469. "schema": {
  470. "$ref": "#/definitions/error"
  471. }
  472. },
  473. "401": {
  474. "description": "Invalid access token.",
  475. "schema": {
  476. "$ref": "#/definitions/error"
  477. }
  478. },
  479. "403": {
  480. "description": "Forbidden - the user is not authorized to use this resource",
  481. "schema": {
  482. "$ref": "#/definitions/error"
  483. }
  484. },
  485. "404": {
  486. "description": "Resource with supplied ID not found",
  487. "schema": {
  488. "$ref": "#/definitions/error"
  489. }
  490. },
  491. "405": {
  492. "description": "Method Not Allowed",
  493. "schema": {
  494. "$ref": "#/definitions/error"
  495. }
  496. },
  497. "406": {
  498. "description": "Not Acceptable",
  499. "schema": {
  500. "$ref": "#/definitions/error"
  501. }
  502. },
  503. "408": {
  504. "description": "Request timeout",
  505. "schema": {
  506. "$ref": "#/definitions/error"
  507. }
  508. },
  509. "410": {
  510. "description": "Gone - resource does not exist any longe",
  511. "schema": {
  512. "$ref": "#/definitions/error"
  513. }
  514. },
  515. "428": {
  516. "description": "Precondition Required",
  517. "schema": {
  518. "$ref": "#/definitions/error"
  519. }
  520. },
  521. "429": {
  522. "description": "Too many request",
  523. "schema": {
  524. "$ref": "#/definitions/error"
  525. }
  526. },
  527. "500": {
  528. "description": "Internal Server Error",
  529. "schema": {
  530. "$ref": "#/definitions/error"
  531. }
  532. },
  533. "501": {
  534. "description": "Not Implemented - server cannot fulfill the request",
  535. "schema": {
  536. "$ref": "#/definitions/error"
  537. }
  538. },
  539. "503": {
  540. "description": "Service Unavailable - server is (temporarily) not available",
  541. "schema": {
  542. "$ref": "#/definitions/error"
  543. }
  544. }
  545. },
  546. "security": [
  547. {
  548. "users_auth": [
  549. "write:users",
  550. "read:users"
  551. ]
  552. }
  553. ]
  554. },
  555. "put": {
  556. "tags": [
  557. "users"
  558. ],
  559. "summary": "Alter a user",
  560. "description": "Alter a user",
  561. "operationId": "putUser",
  562. "produces": [
  563. "application/json",
  564. "application/json;version=1"
  565. ],
  566. "parameters": [
  567. {
  568. "name": "channel-id",
  569. "in": "header",
  570. "description": "Channel where the requests come from",
  571. "required": true,
  572. "type": "string"
  573. },
  574. {
  575. "name": "device-id",
  576. "in": "header",
  577. "description": "Device's ID",
  578. "required": true,
  579. "type": "string"
  580. },
  581. {
  582. "name": "Authorization",
  583. "in": "header",
  584. "description": "Authorization token",
  585. "required": true,
  586. "type": "string"
  587. },
  588. {
  589. "name": "user-id",
  590. "in": "path",
  591. "description": "User to be altered",
  592. "required": true,
  593. "type": "string",
  594. "format": "email"
  595. },
  596. {
  597. "in": "body",
  598. "name": "user",
  599. "description": "User's data",
  600. "required": true,
  601. "schema": {
  602. "$ref": "#/definitions/user-return"
  603. }
  604. }
  605. ],
  606. "responses": {
  607. "202": {
  608. "description": "OK",
  609. "schema": {
  610. "$ref": "#/definitions/operation"
  611. }
  612. },
  613. "301": {
  614. "description": "Moved Permanently",
  615. "schema": {
  616. "$ref": "#/definitions/error"
  617. }
  618. },
  619. "304": {
  620. "description": "Not Modified",
  621. "schema": {
  622. "$ref": "#/definitions/error"
  623. }
  624. },
  625. "400": {
  626. "description": "A Bad Request Error occured",
  627. "schema": {
  628. "$ref": "#/definitions/error"
  629. }
  630. },
  631. "401": {
  632. "description": "Invalid access token.",
  633. "schema": {
  634. "$ref": "#/definitions/error"
  635. }
  636. },
  637. "403": {
  638. "description": "Forbidden - the user is not authorized to use this resource",
  639. "schema": {
  640. "$ref": "#/definitions/error"
  641. }
  642. },
  643. "404": {
  644. "description": "Resource with supplied ID not found",
  645. "schema": {
  646. "$ref": "#/definitions/error"
  647. }
  648. },
  649. "405": {
  650. "description": "Method Not Allowed",
  651. "schema": {
  652. "$ref": "#/definitions/error"
  653. }
  654. },
  655. "406": {
  656. "description": "Not Acceptable",
  657. "schema": {
  658. "$ref": "#/definitions/error"
  659. }
  660. },
  661. "408": {
  662. "description": "Request timeout",
  663. "schema": {
  664. "$ref": "#/definitions/error"
  665. }
  666. },
  667. "410": {
  668. "description": "Gone - resource does not exist any longe",
  669. "schema": {
  670. "$ref": "#/definitions/error"
  671. }
  672. },
  673. "428": {
  674. "description": "Precondition Required",
  675. "schema": {
  676. "$ref": "#/definitions/error"
  677. }
  678. },
  679. "429": {
  680. "description": "Too many request",
  681. "schema": {
  682. "$ref": "#/definitions/error"
  683. }
  684. },
  685. "500": {
  686. "description": "Internal Server Error",
  687. "schema": {
  688. "$ref": "#/definitions/error"
  689. }
  690. },
  691. "501": {
  692. "description": "Not Implemented - server cannot fulfill the request",
  693. "schema": {
  694. "$ref": "#/definitions/error"
  695. }
  696. },
  697. "503": {
  698. "description": "Service Unavailable - server is (temporarily) not available",
  699. "schema": {
  700. "$ref": "#/definitions/error"
  701. }
  702. }
  703. },
  704. "security": [
  705. {
  706. "users_auth": [
  707. "write:users",
  708. "read:users"
  709. ]
  710. }
  711. ]
  712. }
  713. },
  714. "/{user-id}/details": {
  715. "get": {
  716. "tags": [
  717. "users"
  718. ],
  719. "summary": "Get User details",
  720. "description": "Show user details like infos, and groups apps and channels",
  721. "operationId": "getUserDetails",
  722. "produces": [
  723. "application/json",
  724. "application/json;version=1"
  725. ],
  726. "parameters": [
  727. {
  728. "name": "channel-id",
  729. "in": "header",
  730. "description": "Channel where the requests come from",
  731. "required": true,
  732. "type": "string"
  733. },
  734. {
  735. "name": "device-id",
  736. "in": "header",
  737. "description": "Device's ID",
  738. "required": true,
  739. "type": "string"
  740. },
  741. {
  742. "name": "Authorization",
  743. "in": "header",
  744. "description": "Authorization token",
  745. "required": true,
  746. "type": "string"
  747. },
  748. {
  749. "name": "user-id",
  750. "in": "path",
  751. "description": "User to be retreaved",
  752. "required": true,
  753. "type": "string",
  754. "format": "email"
  755. }
  756. ],
  757. "responses": {
  758. "200": {
  759. "description": "OK",
  760. "schema": {
  761. "$ref": "#/definitions/user-detail-response"
  762. }
  763. },
  764. "400": {
  765. "description": "A Bad Request Error occured",
  766. "schema": {
  767. "$ref": "#/definitions/error"
  768. }
  769. },
  770. "401": {
  771. "description": "Invalid access token.",
  772. "schema": {
  773. "$ref": "#/definitions/error"
  774. }
  775. },
  776. "403": {
  777. "description": "Forbidden - the user is not authorized to use this resource",
  778. "schema": {
  779. "$ref": "#/definitions/error"
  780. }
  781. },
  782. "404": {
  783. "description": "Resource with supplied ID not found",
  784. "schema": {
  785. "$ref": "#/definitions/error"
  786. }
  787. },
  788. "405": {
  789. "description": "Method Not Allowed",
  790. "schema": {
  791. "$ref": "#/definitions/error"
  792. }
  793. },
  794. "406": {
  795. "description": "Not Acceptable",
  796. "schema": {
  797. "$ref": "#/definitions/error"
  798. }
  799. },
  800. "408": {
  801. "description": "Request timeout",
  802. "schema": {
  803. "$ref": "#/definitions/error"
  804. }
  805. },
  806. "422": {
  807. "description": "Unprocessable Entity",
  808. "schema": {
  809. "$ref": "#/definitions/error"
  810. }
  811. },
  812. "500": {
  813. "description": "Internal Server Error",
  814. "schema": {
  815. "$ref": "#/definitions/error"
  816. }
  817. },
  818. "501": {
  819. "description": "Not Implemented - server cannot fulfill the request",
  820. "schema": {
  821. "$ref": "#/definitions/error"
  822. }
  823. },
  824. "503": {
  825. "description": "Service Unavailable - server is (temporarily) not available",
  826. "schema": {
  827. "$ref": "#/definitions/error"
  828. }
  829. }
  830. },
  831. "security": [
  832. {
  833. "users_auth": [
  834. "write:users",
  835. "read:users"
  836. ]
  837. }
  838. ]
  839. },
  840. "put": {
  841. "tags": [
  842. "users"
  843. ],
  844. "summary": "Update User details",
  845. "description": "Update user details like infos, and groups apps and channels",
  846. "operationId": "putUserDetails",
  847. "produces": [
  848. "application/json",
  849. "application/json;version=1"
  850. ],
  851. "parameters": [
  852. {
  853. "name": "channel-id",
  854. "in": "header",
  855. "description": "Channel where the requests come from",
  856. "required": true,
  857. "type": "string"
  858. },
  859. {
  860. "name": "device-id",
  861. "in": "header",
  862. "description": "Device's ID",
  863. "required": true,
  864. "type": "string"
  865. },
  866. {
  867. "name": "Authorization",
  868. "in": "header",
  869. "description": "Authorization token",
  870. "required": true,
  871. "type": "string"
  872. },
  873. {
  874. "name": "user-id",
  875. "in": "path",
  876. "description": "User to be retreaved",
  877. "required": true,
  878. "type": "string",
  879. "format": "email"
  880. }
  881. ],
  882. "responses": {
  883. "202": {
  884. "description": "OK",
  885. "schema": {
  886. "$ref": "#/definitions/user-detail"
  887. }
  888. },
  889. "303": {
  890. "description": "See other",
  891. "schema": {
  892. "$ref": "#/definitions/error"
  893. }
  894. },
  895. "400": {
  896. "description": "A Bad Request Error occured",
  897. "schema": {
  898. "$ref": "#/definitions/error"
  899. }
  900. },
  901. "401": {
  902. "description": "Invalid access token.",
  903. "schema": {
  904. "$ref": "#/definitions/error"
  905. }
  906. },
  907. "403": {
  908. "description": "Forbidden - the user is not authorized to use this resource",
  909. "schema": {
  910. "$ref": "#/definitions/error"
  911. }
  912. },
  913. "404": {
  914. "description": "Resource with supplied ID not found",
  915. "schema": {
  916. "$ref": "#/definitions/error"
  917. }
  918. },
  919. "405": {
  920. "description": "Method Not Allowed",
  921. "schema": {
  922. "$ref": "#/definitions/error"
  923. }
  924. },
  925. "406": {
  926. "description": "Not Acceptable",
  927. "schema": {
  928. "$ref": "#/definitions/error"
  929. }
  930. },
  931. "408": {
  932. "description": "Request timeout",
  933. "schema": {
  934. "$ref": "#/definitions/error"
  935. }
  936. },
  937. "422": {
  938. "description": "Unprocessable Entity",
  939. "schema": {
  940. "$ref": "#/definitions/error"
  941. }
  942. },
  943. "500": {
  944. "description": "Internal Server Error",
  945. "schema": {
  946. "$ref": "#/definitions/error"
  947. }
  948. },
  949. "501": {
  950. "description": "Not Implemented - server cannot fulfill the request",
  951. "schema": {
  952. "$ref": "#/definitions/error"
  953. }
  954. },
  955. "503": {
  956. "description": "Service Unavailable - server is (temporarily) not available",
  957. "schema": {
  958. "$ref": "#/definitions/error"
  959. }
  960. }
  961. },
  962. "security": [
  963. {
  964. "users_auth": [
  965. "write:users",
  966. "read:users"
  967. ]
  968. }
  969. ]
  970. }
  971. },
  972. "/{user-id}/clientgroup": {
  973. "get": {
  974. "tags": [
  975. "users"
  976. ],
  977. "summary": "Get the Client Group",
  978. "description": "Show client user details",
  979. "operationId": "getUserIdClientGroup",
  980. "produces": [
  981. "application/json",
  982. "application/json;version=1"
  983. ],
  984. "parameters": [
  985. {
  986. "name": "channel-id",
  987. "in": "header",
  988. "description": "Channel where the requests come from",
  989. "required": true,
  990. "type": "string"
  991. },
  992. {
  993. "name": "device-id",
  994. "in": "header",
  995. "description": "Device's ID",
  996. "required": true,
  997. "type": "string"
  998. },
  999. {
  1000. "name": "Authorization",
  1001. "in": "header",
  1002. "description": "Authorization token",
  1003. "required": true,
  1004. "type": "string"
  1005. },
  1006. {
  1007. "name": "user-id",
  1008. "in": "path",
  1009. "description": "Owners group",
  1010. "required": true,
  1011. "type": "string",
  1012. "format": "user id"
  1013. }
  1014. ],
  1015. "responses": {
  1016. "200": {
  1017. "description": "OK",
  1018. "schema": {
  1019. "$ref": "#/definitions/clientgroups-return"
  1020. }
  1021. },
  1022. "400": {
  1023. "description": "A Bad Request Error occured",
  1024. "schema": {
  1025. "$ref": "#/definitions/error"
  1026. }
  1027. },
  1028. "401": {
  1029. "description": "Invalid access token.",
  1030. "schema": {
  1031. "$ref": "#/definitions/error"
  1032. }
  1033. },
  1034. "403": {
  1035. "description": "Forbidden - the user is not authorized to use this resource",
  1036. "schema": {
  1037. "$ref": "#/definitions/error"
  1038. }
  1039. },
  1040. "404": {
  1041. "description": "Resource with supplied ID not found",
  1042. "schema": {
  1043. "$ref": "#/definitions/error"
  1044. }
  1045. },
  1046. "405": {
  1047. "description": "Method Not Allowed",
  1048. "schema": {
  1049. "$ref": "#/definitions/error"
  1050. }
  1051. },
  1052. "406": {
  1053. "description": "Not Acceptable",
  1054. "schema": {
  1055. "$ref": "#/definitions/error"
  1056. }
  1057. },
  1058. "408": {
  1059. "description": "Request timeout",
  1060. "schema": {
  1061. "$ref": "#/definitions/error"
  1062. }
  1063. },
  1064. "422": {
  1065. "description": "Unprocessable Entity",
  1066. "schema": {
  1067. "$ref": "#/definitions/error"
  1068. }
  1069. },
  1070. "500": {
  1071. "description": "Internal Server Error",
  1072. "schema": {
  1073. "$ref": "#/definitions/error"
  1074. }
  1075. },
  1076. "501": {
  1077. "description": "Not Implemented - server cannot fulfill the request",
  1078. "schema": {
  1079. "$ref": "#/definitions/error"
  1080. }
  1081. },
  1082. "503": {
  1083. "description": "Service Unavailable - server is (temporarily) not available",
  1084. "schema": {
  1085. "$ref": "#/definitions/error"
  1086. }
  1087. }
  1088. },
  1089. "security": [
  1090. {
  1091. "users_auth": [
  1092. "write:users",
  1093. "read:users"
  1094. ]
  1095. }
  1096. ]
  1097. }
  1098. },
  1099. "/profile": {
  1100. "get": {
  1101. "tags": [
  1102. "users"
  1103. ],
  1104. "summary": "Get the users's profile",
  1105. "description": "Show client user profile",
  1106. "operationId": "getUserProfile",
  1107. "produces": [
  1108. "application/json",
  1109. "application/json;version=1"
  1110. ],
  1111. "parameters": [
  1112. {
  1113. "name": "channel-id",
  1114. "in": "header",
  1115. "description": "Channel where the requests come from",
  1116. "required": true,
  1117. "type": "string"
  1118. },
  1119. {
  1120. "name": "device-id",
  1121. "in": "header",
  1122. "description": "Device's ID",
  1123. "required": true,
  1124. "type": "string"
  1125. },
  1126. {
  1127. "name": "Authorization",
  1128. "in": "header",
  1129. "description": "Authorization token",
  1130. "required": true,
  1131. "type": "string"
  1132. }
  1133. ],
  1134. "responses": {
  1135. "200": {
  1136. "description": "OK",
  1137. "schema": {
  1138. "$ref": "#/definitions/UserProfileResponse"
  1139. }
  1140. },
  1141. "400": {
  1142. "description": "A Bad Request Error occured",
  1143. "schema": {
  1144. "$ref": "#/definitions/error"
  1145. }
  1146. },
  1147. "401": {
  1148. "description": "Invalid access token.",
  1149. "schema": {
  1150. "$ref": "#/definitions/error"
  1151. }
  1152. },
  1153. "403": {
  1154. "description": "Forbidden - the user is not authorized to use this resource",
  1155. "schema": {
  1156. "$ref": "#/definitions/error"
  1157. }
  1158. },
  1159. "404": {
  1160. "description": "Resource with supplied ID not found",
  1161. "schema": {
  1162. "$ref": "#/definitions/error"
  1163. }
  1164. },
  1165. "405": {
  1166. "description": "Method Not Allowed",
  1167. "schema": {
  1168. "$ref": "#/definitions/error"
  1169. }
  1170. },
  1171. "406": {
  1172. "description": "Not Acceptable",
  1173. "schema": {
  1174. "$ref": "#/definitions/error"
  1175. }
  1176. },
  1177. "408": {
  1178. "description": "Request timeout",
  1179. "schema": {
  1180. "$ref": "#/definitions/error"
  1181. }
  1182. },
  1183. "422": {
  1184. "description": "Unprocessable Entity",
  1185. "schema": {
  1186. "$ref": "#/definitions/error"
  1187. }
  1188. },
  1189. "500": {
  1190. "description": "Internal Server Error",
  1191. "schema": {
  1192. "$ref": "#/definitions/error"
  1193. }
  1194. },
  1195. "501": {
  1196. "description": "Not Implemented - server cannot fulfill the request",
  1197. "schema": {
  1198. "$ref": "#/definitions/error"
  1199. }
  1200. },
  1201. "503": {
  1202. "description": "Service Unavailable - server is (temporarily) not available",
  1203. "schema": {
  1204. "$ref": "#/definitions/error"
  1205. }
  1206. }
  1207. },
  1208. "security": [
  1209. {
  1210. "users_auth": [
  1211. "write:users",
  1212. "read:users"
  1213. ]
  1214. }
  1215. ]
  1216. }
  1217. },
  1218. "/reinvite/{user_id}": {
  1219. "get": {
  1220. "tags": [
  1221. "users"
  1222. ],
  1223. "summary": "request a new invite to be sent to user_id",
  1224. "description": "Retrieves a new invitation",
  1225. "operationId": "callReInvite",
  1226. "produces": [
  1227. "application/json",
  1228. "application/json;version=1"
  1229. ],
  1230. "parameters": [
  1231. {
  1232. "name": "channel-id",
  1233. "in": "header",
  1234. "description": "Channel where the requests come from",
  1235. "required": true,
  1236. "type": "string"
  1237. },
  1238. {
  1239. "name": "device-id",
  1240. "in": "header",
  1241. "description": "Device's ID",
  1242. "required": true,
  1243. "type": "string"
  1244. },
  1245. {
  1246. "name": "user_id",
  1247. "in": "path",
  1248. "description": "User information",
  1249. "required": true,
  1250. "type": "string"
  1251. }
  1252. ],
  1253. "responses": {
  1254. "204": {
  1255. "description": "No Content"
  1256. },
  1257. "400": {
  1258. "description": "A Bad Request Error occured",
  1259. "schema": {
  1260. "$ref": "#/definitions/error"
  1261. }
  1262. },
  1263. "401": {
  1264. "description": "Invalid access token.",
  1265. "schema": {
  1266. "$ref": "#/definitions/error"
  1267. }
  1268. },
  1269. "403": {
  1270. "description": "Forbidden - the user is not authorized to use this resource",
  1271. "schema": {
  1272. "$ref": "#/definitions/error"
  1273. }
  1274. },
  1275. "404": {
  1276. "description": "Resource with supplied ID not found",
  1277. "schema": {
  1278. "$ref": "#/definitions/error"
  1279. }
  1280. },
  1281. "405": {
  1282. "description": "Method Not Allowed",
  1283. "schema": {
  1284. "$ref": "#/definitions/error"
  1285. }
  1286. },
  1287. "406": {
  1288. "description": "Not Acceptable",
  1289. "schema": {
  1290. "$ref": "#/definitions/error"
  1291. }
  1292. },
  1293. "408": {
  1294. "description": "Request timeout",
  1295. "schema": {
  1296. "$ref": "#/definitions/error"
  1297. }
  1298. },
  1299. "422": {
  1300. "description": "Unprocessable Entity",
  1301. "schema": {
  1302. "$ref": "#/definitions/error"
  1303. }
  1304. },
  1305. "500": {
  1306. "description": "Internal Server Error",
  1307. "schema": {
  1308. "$ref": "#/definitions/error"
  1309. }
  1310. },
  1311. "501": {
  1312. "description": "Not Implemented - server cannot fulfill the request",
  1313. "schema": {
  1314. "$ref": "#/definitions/error"
  1315. }
  1316. },
  1317. "503": {
  1318. "description": "Service Unavailable - server is (temporarily) not available",
  1319. "schema": {
  1320. "$ref": "#/definitions/error"
  1321. }
  1322. }
  1323. },
  1324. "security": [
  1325. {
  1326. "users_auth": [
  1327. "write:users",
  1328. "read:users"
  1329. ]
  1330. }
  1331. ]
  1332. }
  1333. },
  1334. "/groups/rsimembers": {
  1335. "get": {
  1336. "tags": [
  1337. "users"
  1338. ],
  1339. "summary": "List all RSI group members",
  1340. "description": "List all RSI group members",
  1341. "operationId": "getGroupRsiMembers",
  1342. "produces": [
  1343. "application/json",
  1344. "application/json;version=1"
  1345. ],
  1346. "parameters": [
  1347. {
  1348. "name": "channel-id",
  1349. "in": "header",
  1350. "description": "Channel where the requests come from",
  1351. "required": true,
  1352. "type": "string"
  1353. },
  1354. {
  1355. "name": "device-id",
  1356. "in": "header",
  1357. "description": "Device's ID",
  1358. "required": true,
  1359. "type": "string"
  1360. },
  1361. {
  1362. "name": "Authorization",
  1363. "in": "header",
  1364. "description": "Authorization token",
  1365. "required": true,
  1366. "type": "string"
  1367. }
  1368. ],
  1369. "responses": {
  1370. "200": {
  1371. "description": "OK",
  1372. "schema": {
  1373. "type": "array",
  1374. "items": {
  1375. "$ref": "#/definitions/user-return"
  1376. }
  1377. }
  1378. },
  1379. "301": {
  1380. "description": "Moved Permanently",
  1381. "schema": {
  1382. "$ref": "#/definitions/error"
  1383. }
  1384. },
  1385. "304": {
  1386. "description": "Not Modified",
  1387. "schema": {
  1388. "$ref": "#/definitions/error"
  1389. }
  1390. },
  1391. "400": {
  1392. "description": "A Bad Request Error occured",
  1393. "schema": {
  1394. "$ref": "#/definitions/error"
  1395. }
  1396. },
  1397. "401": {
  1398. "description": "Invalid access token.",
  1399. "schema": {
  1400. "$ref": "#/definitions/error"
  1401. }
  1402. },
  1403. "403": {
  1404. "description": "Forbidden - the user is not authorized to use this resource",
  1405. "schema": {
  1406. "$ref": "#/definitions/error"
  1407. }
  1408. },
  1409. "404": {
  1410. "description": "Resource with supplied ID not found",
  1411. "schema": {
  1412. "$ref": "#/definitions/error"
  1413. }
  1414. },
  1415. "405": {
  1416. "description": "Method Not Allowed",
  1417. "schema": {
  1418. "$ref": "#/definitions/error"
  1419. }
  1420. },
  1421. "406": {
  1422. "description": "Not Acceptable",
  1423. "schema": {
  1424. "$ref": "#/definitions/error"
  1425. }
  1426. },
  1427. "408": {
  1428. "description": "Request timeout",
  1429. "schema": {
  1430. "$ref": "#/definitions/error"
  1431. }
  1432. },
  1433. "410": {
  1434. "description": "Gone - resource does not exist any longe",
  1435. "schema": {
  1436. "$ref": "#/definitions/error"
  1437. }
  1438. },
  1439. "428": {
  1440. "description": "Precondition Required",
  1441. "schema": {
  1442. "$ref": "#/definitions/error"
  1443. }
  1444. },
  1445. "429": {
  1446. "description": "Too many request",
  1447. "schema": {
  1448. "$ref": "#/definitions/error"
  1449. }
  1450. },
  1451. "500": {
  1452. "description": "Internal Server Error",
  1453. "schema": {
  1454. "$ref": "#/definitions/error"
  1455. }
  1456. },
  1457. "501": {
  1458. "description": "Not Implemented - server cannot fulfill the request",
  1459. "schema": {
  1460. "$ref": "#/definitions/error"
  1461. }
  1462. },
  1463. "503": {
  1464. "description": "Service Unavailable - server is (temporarily) not available",
  1465. "schema": {
  1466. "$ref": "#/definitions/error"
  1467. }
  1468. }
  1469. },
  1470. "security": [
  1471. {
  1472. "users_auth": [
  1473. "write:users",
  1474. "read:users"
  1475. ]
  1476. }
  1477. ]
  1478. }
  1479. },
  1480. "/clientgroup": {
  1481. "post": {
  1482. "tags": [
  1483. "users"
  1484. ],
  1485. "summary": "Creates a client group",
  1486. "description": "Creates client group details",
  1487. "operationId": "postUserClientGroup",
  1488. "produces": [
  1489. "application/json",
  1490. "application/json;version=1"
  1491. ],
  1492. "parameters": [
  1493. {
  1494. "name": "channel-id",
  1495. "in": "header",
  1496. "description": "Channel where the requests come from",
  1497. "required": true,
  1498. "type": "string"
  1499. },
  1500. {
  1501. "name": "device-id",
  1502. "in": "header",
  1503. "description": "Device's ID",
  1504. "required": true,
  1505. "type": "string"
  1506. },
  1507. {
  1508. "name": "Authorization",
  1509. "in": "header",
  1510. "description": "Authorization token",
  1511. "required": true,
  1512. "type": "string"
  1513. }
  1514. ],
  1515. "responses": {
  1516. "202": {
  1517. "description": "Accepted",
  1518. "schema": {
  1519. "$ref": "#/definitions/clientgroups"
  1520. }
  1521. },
  1522. "400": {
  1523. "description": "A Bad Request Error occured",
  1524. "schema": {
  1525. "$ref": "#/definitions/error"
  1526. }
  1527. },
  1528. "401": {
  1529. "description": "Invalid access token.",
  1530. "schema": {
  1531. "$ref": "#/definitions/error"
  1532. }
  1533. },
  1534. "403": {
  1535. "description": "Forbidden - the user is not authorized to use this resource",
  1536. "schema": {
  1537. "$ref": "#/definitions/error"
  1538. }
  1539. },
  1540. "404": {
  1541. "description": "Resource with supplied ID not found",
  1542. "schema": {
  1543. "$ref": "#/definitions/error"
  1544. }
  1545. },
  1546. "405": {
  1547. "description": "Method Not Allowed",
  1548. "schema": {
  1549. "$ref": "#/definitions/error"
  1550. }
  1551. },
  1552. "406": {
  1553. "description": "Not Acceptable",
  1554. "schema": {
  1555. "$ref": "#/definitions/error"
  1556. }
  1557. },
  1558. "408": {
  1559. "description": "Request timeout",
  1560. "schema": {
  1561. "$ref": "#/definitions/error"
  1562. }
  1563. },
  1564. "422": {
  1565. "description": "Unprocessable Entity",
  1566. "schema": {
  1567. "$ref": "#/definitions/error"
  1568. }
  1569. },
  1570. "500": {
  1571. "description": "Internal Server Error",
  1572. "schema": {
  1573. "$ref": "#/definitions/error"
  1574. }
  1575. },
  1576. "501": {
  1577. "description": "Not Implemented - server cannot fulfill the request",
  1578. "schema": {
  1579. "$ref": "#/definitions/error"
  1580. }
  1581. },
  1582. "503": {
  1583. "description": "Service Unavailable - server is (temporarily) not available",
  1584. "schema": {
  1585. "$ref": "#/definitions/error"
  1586. }
  1587. }
  1588. },
  1589. "security": [
  1590. {
  1591. "users_auth": [
  1592. "write:users",
  1593. "read:users"
  1594. ]
  1595. }
  1596. ]
  1597. }
  1598. },
  1599. "/clientgroup/{group-id}": {
  1600. "get": {
  1601. "tags": [
  1602. "users"
  1603. ],
  1604. "summary": "Retrives a client group",
  1605. "description": "Retrives client group details",
  1606. "operationId": "getUserClientGroup",
  1607. "produces": [
  1608. "application/json",
  1609. "application/json;version=1"
  1610. ],
  1611. "parameters": [
  1612. {
  1613. "name": "channel-id",
  1614. "in": "header",
  1615. "description": "Channel where the requests come from",
  1616. "required": true,
  1617. "type": "string"
  1618. },
  1619. {
  1620. "name": "device-id",
  1621. "in": "header",
  1622. "description": "Device's ID",
  1623. "required": true,
  1624. "type": "string"
  1625. },
  1626. {
  1627. "name": "Authorization",
  1628. "in": "header",
  1629. "description": "Authorization token",
  1630. "required": true,
  1631. "type": "string"
  1632. },
  1633. {
  1634. "name": "group-id",
  1635. "in": "path",
  1636. "description": "Group ID",
  1637. "required": true,
  1638. "type": "string",
  1639. "format": "group id"
  1640. }
  1641. ],
  1642. "responses": {
  1643. "200": {
  1644. "description": "Accepted",
  1645. "schema": {
  1646. "$ref": "#/definitions/clientgroups-return"
  1647. }
  1648. },
  1649. "400": {
  1650. "description": "A Bad Request Error occured",
  1651. "schema": {
  1652. "$ref": "#/definitions/error"
  1653. }
  1654. },
  1655. "401": {
  1656. "description": "Invalid access token.",
  1657. "schema": {
  1658. "$ref": "#/definitions/error"
  1659. }
  1660. },
  1661. "403": {
  1662. "description": "Forbidden - the user is not authorized to use this resource",
  1663. "schema": {
  1664. "$ref": "#/definitions/error"
  1665. }
  1666. },
  1667. "404": {
  1668. "description": "Resource with supplied ID not found",
  1669. "schema": {
  1670. "$ref": "#/definitions/error"
  1671. }
  1672. },
  1673. "405": {
  1674. "description": "Method Not Allowed",
  1675. "schema": {
  1676. "$ref": "#/definitions/error"
  1677. }
  1678. },
  1679. "406": {
  1680. "description": "Not Acceptable",
  1681. "schema": {
  1682. "$ref": "#/definitions/error"
  1683. }
  1684. },
  1685. "408": {
  1686. "description": "Request timeout",
  1687. "schema": {
  1688. "$ref": "#/definitions/error"
  1689. }
  1690. },
  1691. "422": {
  1692. "description": "Unprocessable Entity",
  1693. "schema": {
  1694. "$ref": "#/definitions/error"
  1695. }
  1696. },
  1697. "500": {
  1698. "description": "Internal Server Error",
  1699. "schema": {
  1700. "$ref": "#/definitions/error"
  1701. }
  1702. },
  1703. "501": {
  1704. "description": "Not Implemented - server cannot fulfill the request",
  1705. "schema": {
  1706. "$ref": "#/definitions/error"
  1707. }
  1708. },
  1709. "503": {
  1710. "description": "Service Unavailable - server is (temporarily) not available",
  1711. "schema": {
  1712. "$ref": "#/definitions/error"
  1713. }
  1714. }
  1715. },
  1716. "security": [
  1717. {
  1718. "users_auth": [
  1719. "write:users",
  1720. "read:users"
  1721. ]
  1722. }
  1723. ]
  1724. },
  1725. "put": {
  1726. "tags": [
  1727. "users"
  1728. ],
  1729. "summary": "Update a client group",
  1730. "description": "Update client group details",
  1731. "operationId": "putUserClientGroup",
  1732. "produces": [
  1733. "application/json",
  1734. "application/json;version=1"
  1735. ],
  1736. "parameters": [
  1737. {
  1738. "name": "channel-id",
  1739. "in": "header",
  1740. "description": "Channel where the requests come from",
  1741. "required": true,
  1742. "type": "string"
  1743. },
  1744. {
  1745. "name": "device-id",
  1746. "in": "header",
  1747. "description": "Device's ID",
  1748. "required": true,
  1749. "type": "string"
  1750. },
  1751. {
  1752. "name": "Authorization",
  1753. "in": "header",
  1754. "description": "Authorization token",
  1755. "required": true,
  1756. "type": "string"
  1757. },
  1758. {
  1759. "name": "group-id",
  1760. "in": "path",
  1761. "description": "Group ID",
  1762. "required": true,
  1763. "type": "string",
  1764. "format": "group id"
  1765. }
  1766. ],
  1767. "responses": {
  1768. "202": {
  1769. "description": "Accepted",
  1770. "schema": {
  1771. "$ref": "#/definitions/clientgroups"
  1772. }
  1773. },
  1774. "400": {
  1775. "description": "A Bad Request Error occured",
  1776. "schema": {
  1777. "$ref": "#/definitions/error"
  1778. }
  1779. },
  1780. "401": {
  1781. "description": "Invalid access token.",
  1782. "schema": {
  1783. "$ref": "#/definitions/error"
  1784. }
  1785. },
  1786. "403": {
  1787. "description": "Forbidden - the user is not authorized to use this resource",
  1788. "schema": {
  1789. "$ref": "#/definitions/error"
  1790. }
  1791. },
  1792. "404": {
  1793. "description": "Resource with supplied ID not found",
  1794. "schema": {
  1795. "$ref": "#/definitions/error"
  1796. }
  1797. },
  1798. "405": {
  1799. "description": "Method Not Allowed",
  1800. "schema": {
  1801. "$ref": "#/definitions/error"
  1802. }
  1803. },
  1804. "406": {
  1805. "description": "Not Acceptable",
  1806. "schema": {
  1807. "$ref": "#/definitions/error"
  1808. }
  1809. },
  1810. "408": {
  1811. "description": "Request timeout",
  1812. "schema": {
  1813. "$ref": "#/definitions/error"
  1814. }
  1815. },
  1816. "422": {
  1817. "description": "Unprocessable Entity",
  1818. "schema": {
  1819. "$ref": "#/definitions/error"
  1820. }
  1821. },
  1822. "500": {
  1823. "description": "Internal Server Error",
  1824. "schema": {
  1825. "$ref": "#/definitions/error"
  1826. }
  1827. },
  1828. "501": {
  1829. "description": "Not Implemented - server cannot fulfill the request",
  1830. "schema": {
  1831. "$ref": "#/definitions/error"
  1832. }
  1833. },
  1834. "503": {
  1835. "description": "Service Unavailable - server is (temporarily) not available",
  1836. "schema": {
  1837. "$ref": "#/definitions/error"
  1838. }
  1839. }
  1840. },
  1841. "security": [
  1842. {
  1843. "users_auth": [
  1844. "write:users",
  1845. "read:users"
  1846. ]
  1847. }
  1848. ]
  1849. }
  1850. },
  1851. "/notifications/{user-id}": {
  1852. "get": {
  1853. "tags": [
  1854. "notifications"
  1855. ],
  1856. "summary": "Retreave user's notification preferences",
  1857. "description": "Retreave user's notification preferences",
  1858. "operationId": "getNotificationPreferences",
  1859. "produces": [
  1860. "application/json",
  1861. "application/json;version=1"
  1862. ],
  1863. "parameters": [
  1864. {
  1865. "name": "channel-id",
  1866. "in": "header",
  1867. "description": "Channel where the requests come from",
  1868. "required": true,
  1869. "type": "string"
  1870. },
  1871. {
  1872. "name": "device-id",
  1873. "in": "header",
  1874. "description": "Device's ID",
  1875. "required": true,
  1876. "type": "string"
  1877. },
  1878. {
  1879. "name": "Authorization",
  1880. "in": "header",
  1881. "description": "Authorization token",
  1882. "required": true,
  1883. "type": "string"
  1884. },
  1885. {
  1886. "name": "user-id",
  1887. "in": "path",
  1888. "description": "User whose notifications' preferences should be retrieved",
  1889. "required": true,
  1890. "type": "string",
  1891. "format": "email"
  1892. }
  1893. ],
  1894. "responses": {
  1895. "200": {
  1896. "description": "OK",
  1897. "schema": {
  1898. "$ref": "#/definitions/notification"
  1899. }
  1900. },
  1901. "301": {
  1902. "description": "Moved Permanently",
  1903. "schema": {
  1904. "$ref": "#/definitions/error"
  1905. }
  1906. },
  1907. "304": {
  1908. "description": "Not Modified",
  1909. "schema": {
  1910. "$ref": "#/definitions/error"
  1911. }
  1912. },
  1913. "400": {
  1914. "description": "A Bad Request Error occured",
  1915. "schema": {
  1916. "$ref": "#/definitions/error"
  1917. }
  1918. },
  1919. "401": {
  1920. "description": "Invalid access token.",
  1921. "schema": {
  1922. "$ref": "#/definitions/error"
  1923. }
  1924. },
  1925. "403": {
  1926. "description": "Forbidden - the user is not authorized to use this resource",
  1927. "schema": {
  1928. "$ref": "#/definitions/error"
  1929. }
  1930. },
  1931. "404": {
  1932. "description": "Resource with supplied ID not found",
  1933. "schema": {
  1934. "$ref": "#/definitions/error"
  1935. }
  1936. },
  1937. "405": {
  1938. "description": "Method Not Allowed",
  1939. "schema": {
  1940. "$ref": "#/definitions/error"
  1941. }
  1942. },
  1943. "406": {
  1944. "description": "Not Acceptable",
  1945. "schema": {
  1946. "$ref": "#/definitions/error"
  1947. }
  1948. },
  1949. "408": {
  1950. "description": "Request timeout",
  1951. "schema": {
  1952. "$ref": "#/definitions/error"
  1953. }
  1954. },
  1955. "410": {
  1956. "description": "Gone - resource does not exist any longe",
  1957. "schema": {
  1958. "$ref": "#/definitions/error"
  1959. }
  1960. },
  1961. "428": {
  1962. "description": "Precondition Required",
  1963. "schema": {
  1964. "$ref": "#/definitions/error"
  1965. }
  1966. },
  1967. "429": {
  1968. "description": "Too many request",
  1969. "schema": {
  1970. "$ref": "#/definitions/error"
  1971. }
  1972. },
  1973. "500": {
  1974. "description": "Internal Server Error",
  1975. "schema": {
  1976. "$ref": "#/definitions/error"
  1977. }
  1978. },
  1979. "501": {
  1980. "description": "Not Implemented - server cannot fulfill the request",
  1981. "schema": {
  1982. "$ref": "#/definitions/error"
  1983. }
  1984. },
  1985. "503": {
  1986. "description": "Service Unavailable - server is (temporarily) not available",
  1987. "schema": {
  1988. "$ref": "#/definitions/error"
  1989. }
  1990. }
  1991. },
  1992. "security": [
  1993. {
  1994. "users_auth": [
  1995. "write:users",
  1996. "read:users"
  1997. ]
  1998. }
  1999. ]
  2000. },
  2001. "put": {
  2002. "tags": [
  2003. "notifications"
  2004. ],
  2005. "summary": "Alter user's notification preferences",
  2006. "description": "Alter user's notification preferences",
  2007. "operationId": "putNotificationPreferences",
  2008. "produces": [
  2009. "application/json",
  2010. "application/json;version=1"
  2011. ],
  2012. "parameters": [
  2013. {
  2014. "name": "channel-id",
  2015. "in": "header",
  2016. "description": "Channel where the requests come from",
  2017. "required": true,
  2018. "type": "string"
  2019. },
  2020. {
  2021. "name": "device-id",
  2022. "in": "header",
  2023. "description": "Device's ID",
  2024. "required": true,
  2025. "type": "string"
  2026. },
  2027. {
  2028. "name": "Authorization",
  2029. "in": "header",
  2030. "description": "Authorization token",
  2031. "required": true,
  2032. "type": "string"
  2033. },
  2034. {
  2035. "name": "user-id",
  2036. "in": "path",
  2037. "description": "User whose notifications' preferences should be altered",
  2038. "required": true,
  2039. "type": "string",
  2040. "format": "email"
  2041. },
  2042. {
  2043. "in": "body",
  2044. "name": "user",
  2045. "description": "User's data",
  2046. "required": true,
  2047. "schema": {
  2048. "$ref": "#/definitions/notification"
  2049. }
  2050. }
  2051. ],
  2052. "responses": {
  2053. "202": {
  2054. "description": "OK",
  2055. "schema": {
  2056. "$ref": "#/definitions/operation"
  2057. }
  2058. },
  2059. "301": {
  2060. "description": "Moved Permanently",
  2061. "schema": {
  2062. "$ref": "#/definitions/error"
  2063. }
  2064. },
  2065. "304": {
  2066. "description": "Not Modified",
  2067. "schema": {
  2068. "$ref": "#/definitions/error"
  2069. }
  2070. },
  2071. "400": {
  2072. "description": "A Bad Request Error occured",
  2073. "schema": {
  2074. "$ref": "#/definitions/error"
  2075. }
  2076. },
  2077. "401": {
  2078. "description": "Invalid access token.",
  2079. "schema": {
  2080. "$ref": "#/definitions/error"
  2081. }
  2082. },
  2083. "403": {
  2084. "description": "Forbidden - the user is not authorized to use this resource",
  2085. "schema": {
  2086. "$ref": "#/definitions/error"
  2087. }
  2088. },
  2089. "404": {
  2090. "description": "Resource with supplied ID not found",
  2091. "schema": {
  2092. "$ref": "#/definitions/error"
  2093. }
  2094. },
  2095. "405": {
  2096. "description": "Method Not Allowed",
  2097. "schema": {
  2098. "$ref": "#/definitions/error"
  2099. }
  2100. },
  2101. "406": {
  2102. "description": "Not Acceptable",
  2103. "schema": {
  2104. "$ref": "#/definitions/error"
  2105. }
  2106. },
  2107. "408": {
  2108. "description": "Request timeout",
  2109. "schema": {
  2110. "$ref": "#/definitions/error"
  2111. }
  2112. },
  2113. "410": {
  2114. "description": "Gone - resource does not exist any longe",
  2115. "schema": {
  2116. "$ref": "#/definitions/error"
  2117. }
  2118. },
  2119. "428": {
  2120. "description": "Precondition Required",
  2121. "schema": {
  2122. "$ref": "#/definitions/error"
  2123. }
  2124. },
  2125. "429": {
  2126. "description": "Too many request",
  2127. "schema": {
  2128. "$ref": "#/definitions/error"
  2129. }
  2130. },
  2131. "500": {
  2132. "description": "Internal Server Error",
  2133. "schema": {
  2134. "$ref": "#/definitions/error"
  2135. }
  2136. },
  2137. "501": {
  2138. "description": "Not Implemented - server cannot fulfill the request",
  2139. "schema": {
  2140. "$ref": "#/definitions/error"
  2141. }
  2142. },
  2143. "503": {
  2144. "description": "Service Unavailable - server is (temporarily) not available",
  2145. "schema": {
  2146. "$ref": "#/definitions/error"
  2147. }
  2148. }
  2149. },
  2150. "security": [
  2151. {
  2152. "users_auth": [
  2153. "write:users",
  2154. "read:users"
  2155. ]
  2156. }
  2157. ]
  2158. }
  2159. },
  2160. "/device": {
  2161. "post": {
  2162. "tags": [
  2163. "device"
  2164. ],
  2165. "summary": "Registers a new device ID in a specific user",
  2166. "description": "Registers a new device ID in a specific user",
  2167. "operationId": "registerDevice",
  2168. "produces": [
  2169. "application/json",
  2170. "application/json;version=1"
  2171. ],
  2172. "parameters": [
  2173. {
  2174. "name": "channel-id",
  2175. "in": "header",
  2176. "description": "Channel where the requests come from",
  2177. "required": true,
  2178. "type": "string"
  2179. },
  2180. {
  2181. "name": "device-id",
  2182. "in": "header",
  2183. "description": "Device's ID",
  2184. "required": true,
  2185. "type": "string"
  2186. },
  2187. {
  2188. "name": "Authorization",
  2189. "in": "header",
  2190. "description": "Authorization token",
  2191. "required": true,
  2192. "type": "string"
  2193. },
  2194. {
  2195. "in": "body",
  2196. "name": "user",
  2197. "description": "User's data",
  2198. "required": true,
  2199. "schema": {
  2200. "$ref": "#/definitions/newDevice"
  2201. }
  2202. }
  2203. ],
  2204. "responses": {
  2205. "202": {
  2206. "description": "OK",
  2207. "schema": {
  2208. "$ref": "#/definitions/operation"
  2209. }
  2210. },
  2211. "301": {
  2212. "description": "Moved Permanently",
  2213. "schema": {
  2214. "$ref": "#/definitions/error"
  2215. }
  2216. },
  2217. "304": {
  2218. "description": "Not Modified",
  2219. "schema": {
  2220. "$ref": "#/definitions/error"
  2221. }
  2222. },
  2223. "400": {
  2224. "description": "A Bad Request Error occured",
  2225. "schema": {
  2226. "$ref": "#/definitions/error"
  2227. }
  2228. },
  2229. "401": {
  2230. "description": "Invalid access token.",
  2231. "schema": {
  2232. "$ref": "#/definitions/error"
  2233. }
  2234. },
  2235. "403": {
  2236. "description": "Forbidden - the user is not authorized to use this resource",
  2237. "schema": {
  2238. "$ref": "#/definitions/error"
  2239. }
  2240. },
  2241. "404": {
  2242. "description": "Resource with supplied ID not found",
  2243. "schema": {
  2244. "$ref": "#/definitions/error"
  2245. }
  2246. },
  2247. "405": {
  2248. "description": "Method Not Allowed",
  2249. "schema": {
  2250. "$ref": "#/definitions/error"
  2251. }
  2252. },
  2253. "406": {
  2254. "description": "Not Acceptable",
  2255. "schema": {
  2256. "$ref": "#/definitions/error"
  2257. }
  2258. },
  2259. "408": {
  2260. "description": "Request timeout",
  2261. "schema": {
  2262. "$ref": "#/definitions/error"
  2263. }
  2264. },
  2265. "410": {
  2266. "description": "Gone - resource does not exist any longe",
  2267. "schema": {
  2268. "$ref": "#/definitions/error"
  2269. }
  2270. },
  2271. "428": {
  2272. "description": "Precondition Required",
  2273. "schema": {
  2274. "$ref": "#/definitions/error"
  2275. }
  2276. },
  2277. "429": {
  2278. "description": "Too many request",
  2279. "schema": {
  2280. "$ref": "#/definitions/error"
  2281. }
  2282. },
  2283. "500": {
  2284. "description": "Internal Server Error",
  2285. "schema": {
  2286. "$ref": "#/definitions/error"
  2287. }
  2288. },
  2289. "501": {
  2290. "description": "Not Implemented - server cannot fulfill the request",
  2291. "schema": {
  2292. "$ref": "#/definitions/error"
  2293. }
  2294. },
  2295. "503": {
  2296. "description": "Service Unavailable - server is (temporarily) not available",
  2297. "schema": {
  2298. "$ref": "#/definitions/error"
  2299. }
  2300. }
  2301. },
  2302. "security": [
  2303. {
  2304. "users_auth": [
  2305. "write:users",
  2306. "read:users"
  2307. ]
  2308. }
  2309. ]
  2310. },
  2311. "patch": {
  2312. "tags": [
  2313. "device"
  2314. ],
  2315. "summary": "Alter a group",
  2316. "description": "Alter a group",
  2317. "operationId": "patchDevice",
  2318. "produces": [
  2319. "application/json",
  2320. "application/json;version=1"
  2321. ],
  2322. "parameters": [
  2323. {
  2324. "name": "channel-id",
  2325. "in": "header",
  2326. "description": "Channel where the requests come from",
  2327. "required": true,
  2328. "type": "string"
  2329. },
  2330. {
  2331. "name": "device-id",
  2332. "in": "header",
  2333. "description": "Device's ID",
  2334. "required": true,
  2335. "type": "string"
  2336. },
  2337. {
  2338. "name": "Authorization",
  2339. "in": "header",
  2340. "description": "Authorization token",
  2341. "required": true,
  2342. "type": "string"
  2343. },
  2344. {
  2345. "in": "body",
  2346. "name": "user",
  2347. "description": "User's data",
  2348. "required": true,
  2349. "schema": {
  2350. "$ref": "#/definitions/device"
  2351. }
  2352. }
  2353. ],
  2354. "responses": {
  2355. "202": {
  2356. "description": "OK",
  2357. "schema": {
  2358. "$ref": "#/definitions/operation"
  2359. }
  2360. },
  2361. "301": {
  2362. "description": "Moved Permanently",
  2363. "schema": {
  2364. "$ref": "#/definitions/error"
  2365. }
  2366. },
  2367. "304": {
  2368. "description": "Not Modified",
  2369. "schema": {
  2370. "$ref": "#/definitions/error"
  2371. }
  2372. },
  2373. "400": {
  2374. "description": "A Bad Request Error occured",
  2375. "schema": {
  2376. "$ref": "#/definitions/error"
  2377. }
  2378. },
  2379. "401": {
  2380. "description": "Invalid access token.",
  2381. "schema": {
  2382. "$ref": "#/definitions/error"
  2383. }
  2384. },
  2385. "403": {
  2386. "description": "Forbidden - the user is not authorized to use this resource",
  2387. "schema": {
  2388. "$ref": "#/definitions/error"
  2389. }
  2390. },
  2391. "404": {
  2392. "description": "Resource with supplied ID not found",
  2393. "schema": {
  2394. "$ref": "#/definitions/error"
  2395. }
  2396. },
  2397. "405": {
  2398. "description": "Method Not Allowed",
  2399. "schema": {
  2400. "$ref": "#/definitions/error"
  2401. }
  2402. },
  2403. "406": {
  2404. "description": "Not Acceptable",
  2405. "schema": {
  2406. "$ref": "#/definitions/error"
  2407. }
  2408. },
  2409. "408": {
  2410. "description": "Request timeout",
  2411. "schema": {
  2412. "$ref": "#/definitions/error"
  2413. }
  2414. },
  2415. "410": {
  2416. "description": "Gone - resource does not exist any longe",
  2417. "schema": {
  2418. "$ref": "#/definitions/error"
  2419. }
  2420. },
  2421. "428": {
  2422. "description": "Precondition Required",
  2423. "schema": {
  2424. "$ref": "#/definitions/error"
  2425. }
  2426. },
  2427. "429": {
  2428. "description": "Too many request",
  2429. "schema": {
  2430. "$ref": "#/definitions/error"
  2431. }
  2432. },
  2433. "500": {
  2434. "description": "Internal Server Error",
  2435. "schema": {
  2436. "$ref": "#/definitions/error"
  2437. }
  2438. },
  2439. "501": {
  2440. "description": "Not Implemented - server cannot fulfill the request",
  2441. "schema": {
  2442. "$ref": "#/definitions/error"
  2443. }
  2444. },
  2445. "503": {
  2446. "description": "Service Unavailable - server is (temporarily) not available",
  2447. "schema": {
  2448. "$ref": "#/definitions/error"
  2449. }
  2450. }
  2451. },
  2452. "security": [
  2453. {
  2454. "users_auth": [
  2455. "write:users",
  2456. "read:users"
  2457. ]
  2458. }
  2459. ]
  2460. }
  2461. },
  2462. "/acceptance-terms/{term-id}": {
  2463. "get": {
  2464. "description": "Gets a terms of use by an id",
  2465. "operationId": "getAcceptanceTerms",
  2466. "summary": "Gets a terms of use by an id",
  2467. "tags": [
  2468. "terms"
  2469. ],
  2470. "parameters": [
  2471. {
  2472. "name": "channel-id",
  2473. "in": "header",
  2474. "description": "Channel where the requests come from",
  2475. "required": true,
  2476. "type": "string"
  2477. },
  2478. {
  2479. "name": "device-id",
  2480. "in": "header",
  2481. "description": "Device's ID",
  2482. "required": true,
  2483. "type": "string"
  2484. },
  2485. {
  2486. "name": "Authorization",
  2487. "in": "header",
  2488. "description": "Authorization token",
  2489. "required": true,
  2490. "type": "string"
  2491. },
  2492. {
  2493. "name": "term-id",
  2494. "in": "path",
  2495. "description": "ID of the term of use",
  2496. "required": true,
  2497. "type": "string"
  2498. }
  2499. ],
  2500. "responses": {
  2501. "200": {
  2502. "description": "OK",
  2503. "schema": {
  2504. "$ref": "#/definitions/TermOfUse"
  2505. }
  2506. },
  2507. "301": {
  2508. "description": "Moved Permanently",
  2509. "schema": {
  2510. "$ref": "#/definitions/error"
  2511. }
  2512. },
  2513. "304": {
  2514. "description": "Not Modified",
  2515. "schema": {
  2516. "$ref": "#/definitions/error"
  2517. }
  2518. },
  2519. "400": {
  2520. "description": "A Bad Request Error occured",
  2521. "schema": {
  2522. "$ref": "#/definitions/error"
  2523. }
  2524. },
  2525. "401": {
  2526. "description": "Invalid access token.",
  2527. "schema": {
  2528. "$ref": "#/definitions/error"
  2529. }
  2530. },
  2531. "403": {
  2532. "description": "Forbidden - the user is not authorized to use this resource",
  2533. "schema": {
  2534. "$ref": "#/definitions/error"
  2535. }
  2536. },
  2537. "404": {
  2538. "description": "Resource with supplied ID not found",
  2539. "schema": {
  2540. "$ref": "#/definitions/error"
  2541. }
  2542. },
  2543. "405": {
  2544. "description": "Method Not Allowed",
  2545. "schema": {
  2546. "$ref": "#/definitions/error"
  2547. }
  2548. },
  2549. "406": {
  2550. "description": "Not Acceptable",
  2551. "schema": {
  2552. "$ref": "#/definitions/error"
  2553. }
  2554. },
  2555. "408": {
  2556. "description": "Request timeout",
  2557. "schema": {
  2558. "$ref": "#/definitions/error"
  2559. }
  2560. },
  2561. "410": {
  2562. "description": "Gone - resource does not exist any longe",
  2563. "schema": {
  2564. "$ref": "#/definitions/error"
  2565. }
  2566. },
  2567. "428": {
  2568. "description": "Precondition Required",
  2569. "schema": {
  2570. "$ref": "#/definitions/error"
  2571. }
  2572. },
  2573. "429": {
  2574. "description": "Too many request",
  2575. "schema": {
  2576. "$ref": "#/definitions/error"
  2577. }
  2578. },
  2579. "500": {
  2580. "description": "Internal Server Error",
  2581. "schema": {
  2582. "$ref": "#/definitions/error"
  2583. }
  2584. },
  2585. "501": {
  2586. "description": "Not Implemented - server cannot fulfill the request",
  2587. "schema": {
  2588. "$ref": "#/definitions/error"
  2589. }
  2590. },
  2591. "503": {
  2592. "description": "Service Unavailable - server is (temporarily) not available",
  2593. "schema": {
  2594. "$ref": "#/definitions/error"
  2595. }
  2596. }
  2597. },
  2598. "produces": [
  2599. "application/json",
  2600. "application/json;version=1"
  2601. ]
  2602. },
  2603. "post": {
  2604. "description": "Saves the user's answer about acceptance terms",
  2605. "operationId": "post-user-setup-acceptance-terms-term-id",
  2606. "summary": "Saves the user's answer about acceptance terms",
  2607. "tags": [
  2608. "terms"
  2609. ],
  2610. "parameters": [
  2611. {
  2612. "name": "channel-id",
  2613. "in": "header",
  2614. "description": "Channel where the requests come from",
  2615. "required": true,
  2616. "type": "string"
  2617. },
  2618. {
  2619. "name": "device-id",
  2620. "in": "header",
  2621. "description": "Device's ID",
  2622. "required": true,
  2623. "type": "string"
  2624. },
  2625. {
  2626. "name": "Authorization",
  2627. "in": "header",
  2628. "description": "Authorization token",
  2629. "required": true,
  2630. "type": "string"
  2631. },
  2632. {
  2633. "name": "term-id",
  2634. "in": "path",
  2635. "description": "ID of the term of use",
  2636. "required": true,
  2637. "type": "string"
  2638. },
  2639. {
  2640. "name": "body",
  2641. "in": "body",
  2642. "schema": {
  2643. "$ref": "#/definitions/TermAccepted"
  2644. },
  2645. "description": "Acceptance Terms object with user's answer"
  2646. }
  2647. ],
  2648. "consumes": [
  2649. "application/json;version=1"
  2650. ],
  2651. "responses": {
  2652. "202": {
  2653. "description": "OK",
  2654. "schema": {
  2655. "$ref": "#/definitions/operation"
  2656. }
  2657. },
  2658. "301": {
  2659. "description": "Moved Permanently",
  2660. "schema": {
  2661. "$ref": "#/definitions/error"
  2662. }
  2663. },
  2664. "304": {
  2665. "description": "Not Modified",
  2666. "schema": {
  2667. "$ref": "#/definitions/error"
  2668. }
  2669. },
  2670. "400": {
  2671. "description": "A Bad Request Error occured",
  2672. "schema": {
  2673. "$ref": "#/definitions/error"
  2674. }
  2675. },
  2676. "401": {
  2677. "description": "Invalid access token.",
  2678. "schema": {
  2679. "$ref": "#/definitions/error"
  2680. }
  2681. },
  2682. "403": {
  2683. "description": "Forbidden - the user is not authorized to use this resource",
  2684. "schema": {
  2685. "$ref": "#/definitions/error"
  2686. }
  2687. },
  2688. "404": {
  2689. "description": "Resource with supplied ID not found",
  2690. "schema": {
  2691. "$ref": "#/definitions/error"
  2692. }
  2693. },
  2694. "405": {
  2695. "description": "Method Not Allowed",
  2696. "schema": {
  2697. "$ref": "#/definitions/error"
  2698. }
  2699. },
  2700. "406": {
  2701. "description": "Not Acceptable",
  2702. "schema": {
  2703. "$ref": "#/definitions/error"
  2704. }
  2705. },
  2706. "408": {
  2707. "description": "Request timeout",
  2708. "schema": {
  2709. "$ref": "#/definitions/error"
  2710. }
  2711. },
  2712. "410": {
  2713. "description": "Gone - resource does not exist any longe",
  2714. "schema": {
  2715. "$ref": "#/definitions/error"
  2716. }
  2717. },
  2718. "428": {
  2719. "description": "Precondition Required",
  2720. "schema": {
  2721. "$ref": "#/definitions/error"
  2722. }
  2723. },
  2724. "429": {
  2725. "description": "Too many request",
  2726. "schema": {
  2727. "$ref": "#/definitions/error"
  2728. }
  2729. },
  2730. "500": {
  2731. "description": "Internal Server Error",
  2732. "schema": {
  2733. "$ref": "#/definitions/error"
  2734. }
  2735. },
  2736. "501": {
  2737. "description": "Not Implemented - server cannot fulfill the request",
  2738. "schema": {
  2739. "$ref": "#/definitions/error"
  2740. }
  2741. },
  2742. "503": {
  2743. "description": "Service Unavailable - server is (temporarily) not available",
  2744. "schema": {
  2745. "$ref": "#/definitions/error"
  2746. }
  2747. }
  2748. },
  2749. "produces": [
  2750. "application/json;version=1"
  2751. ]
  2752. }
  2753. }
  2754. },
  2755. "securityDefinitions": {
  2756. "users_auth": {
  2757. "type": "oauth2",
  2758. "authorizationUrl": "http://home-rsi.rabobankapis.com/oauth/dialog",
  2759. "flow": "implicit",
  2760. "scopes": {
  2761. "write:users": "modify users profiles",
  2762. "read:users": "read users informations"
  2763. }
  2764. }
  2765. },
  2766. "definitions": {
  2767. "user-return": {
  2768. "type": "object",
  2769. "required": [
  2770. "user_id",
  2771. "document",
  2772. "name",
  2773. "email",
  2774. "phone",
  2775. "origin"
  2776. ],
  2777. "properties": {
  2778. "user_id": {
  2779. "type": "string",
  2780. "format": "email"
  2781. },
  2782. "document": {
  2783. "type": "string",
  2784. "example": "123.456.789-01"
  2785. },
  2786. "name": {
  2787. "type": "string",
  2788. "example": "Ariano Suassuna"
  2789. },
  2790. "email": {
  2791. "type": "string",
  2792. "example": "ariano.suassuna@rbb.com.br"
  2793. },
  2794. "phone": {
  2795. "type": "string",
  2796. "example": "11912345678"
  2797. },
  2798. "origin": {
  2799. "type": "string",
  2800. "enum": [
  2801. "digital",
  2802. "rbb"
  2803. ]
  2804. },
  2805. "role": {
  2806. "type": "string",
  2807. "enum": [
  2808. "Normal",
  2809. "Master"
  2810. ]
  2811. },
  2812. "group_id": {
  2813. "type": "string",
  2814. "example": "UUID"
  2815. },
  2816. "status": {
  2817. "type": "string",
  2818. "enum": [
  2819. "Active",
  2820. "Inactive"
  2821. ]
  2822. }
  2823. }
  2824. },
  2825. "user-detail": {
  2826. "type": "object",
  2827. "required": [
  2828. "users"
  2829. ],
  2830. "properties": {
  2831. "users": {
  2832. "type": "array",
  2833. "items": {
  2834. "$ref": "#/definitions/user-return"
  2835. }
  2836. },
  2837. "portal_permissions": {
  2838. "type": "array",
  2839. "items": {
  2840. "$ref": "#/definitions/portal-permissions"
  2841. }
  2842. }
  2843. }
  2844. },
  2845. "user-detail-response": {
  2846. "type": "object",
  2847. "required": [
  2848. "users"
  2849. ],
  2850. "properties": {
  2851. "users": {
  2852. "type": "array",
  2853. "items": {
  2854. "$ref": "#/definitions/user-return"
  2855. }
  2856. },
  2857. "portal_permissions": {
  2858. "type": "array",
  2859. "items": {
  2860. "$ref": "#/definitions/portal-permissions"
  2861. }
  2862. },
  2863. "channels": {
  2864. "type": "array",
  2865. "items": {
  2866. "$ref": "#/definitions/group"
  2867. }
  2868. },
  2869. "apps": {
  2870. "type": "array",
  2871. "items": {
  2872. "$ref": "#/definitions/group"
  2873. }
  2874. }
  2875. }
  2876. },
  2877. "portal-permissions": {
  2878. "type": "object",
  2879. "properties": {
  2880. "channel_id": {
  2881. "type": "string",
  2882. "format": "UUID"
  2883. },
  2884. "app_id": {
  2885. "type": "string",
  2886. "format": "UUID"
  2887. },
  2888. "status": {
  2889. "type": "boolean"
  2890. }
  2891. }
  2892. },
  2893. "clientgroups-return": {
  2894. "type": "object",
  2895. "required": [
  2896. "group"
  2897. ],
  2898. "properties": {
  2899. "group": {
  2900. "type": "object",
  2901. "$ref": "#/definitions/group-return"
  2902. },
  2903. "users": {
  2904. "type": "array",
  2905. "items": {
  2906. "$ref": "#/definitions/user-return"
  2907. }
  2908. },
  2909. "preferences": {
  2910. "type": "array",
  2911. "items": {
  2912. "$ref": "#/definitions/preferences-return"
  2913. }
  2914. }
  2915. }
  2916. },
  2917. "clientgroups": {
  2918. "type": "object",
  2919. "required": [
  2920. "users",
  2921. "preferences"
  2922. ],
  2923. "properties": {
  2924. "users": {
  2925. "type": "array",
  2926. "items": {
  2927. "$ref": "#/definitions/user-role"
  2928. }
  2929. },
  2930. "preferences": {
  2931. "type": "array",
  2932. "items": {
  2933. "$ref": "#/definitions/preferences"
  2934. }
  2935. }
  2936. }
  2937. },
  2938. "group-return": {
  2939. "type": "object",
  2940. "required": [
  2941. "id",
  2942. "description"
  2943. ],
  2944. "properties": {
  2945. "id": {
  2946. "type": "string",
  2947. "format": "uuid"
  2948. },
  2949. "description": {
  2950. "type": "string",
  2951. "example": "Digital"
  2952. },
  2953. "display_name": {
  2954. "type": "string",
  2955. "example": "digital-app-rsi"
  2956. }
  2957. }
  2958. },
  2959. "group": {
  2960. "type": "object",
  2961. "required": [
  2962. "id",
  2963. "description"
  2964. ],
  2965. "properties": {
  2966. "id": {
  2967. "type": "string",
  2968. "format": "uuid"
  2969. },
  2970. "description": {
  2971. "type": "string",
  2972. "example": "Digital"
  2973. },
  2974. "display_name": {
  2975. "type": "string",
  2976. "example": "digital-app-rsi"
  2977. },
  2978. "status": {
  2979. "type": "boolean"
  2980. }
  2981. }
  2982. },
  2983. "user-role": {
  2984. "type": "object",
  2985. "required": [
  2986. "user_id",
  2987. "role"
  2988. ],
  2989. "properties": {
  2990. "user_id": {
  2991. "type": "string",
  2992. "example": "jose@teste.com.br"
  2993. },
  2994. "role": {
  2995. "type": "string",
  2996. "enum": [
  2997. "Master",
  2998. "Normal"
  2999. ]
  3000. }
  3001. }
  3002. },
  3003. "preferences": {
  3004. "type": "object",
  3005. "properties": {
  3006. "exchange_code": {
  3007. "type": "string",
  3008. "example": "CBOT"
  3009. },
  3010. "commodity_code": {
  3011. "type": "string",
  3012. "example": "S"
  3013. },
  3014. "enable": {
  3015. "type": "boolean"
  3016. }
  3017. }
  3018. },
  3019. "preferences-return": {
  3020. "type": "object",
  3021. "properties": {
  3022. "exchange_code": {
  3023. "type": "string",
  3024. "example": "CBOT"
  3025. },
  3026. "exchange_name": {
  3027. "type": "string",
  3028. "example": "Chigado"
  3029. },
  3030. "commodity_code": {
  3031. "type": "string",
  3032. "example": "S"
  3033. },
  3034. "commodity_name": {
  3035. "type": "string",
  3036. "example": "Soja"
  3037. },
  3038. "enable": {
  3039. "type": "boolean"
  3040. }
  3041. }
  3042. },
  3043. "notification": {
  3044. "type": "object",
  3045. "required": [
  3046. "push",
  3047. "sms",
  3048. "email"
  3049. ],
  3050. "properties": {
  3051. "push": {
  3052. "type": "boolean"
  3053. },
  3054. "sms": {
  3055. "type": "boolean"
  3056. },
  3057. "email": {
  3058. "type": "boolean"
  3059. }
  3060. }
  3061. },
  3062. "device": {
  3063. "type": "object",
  3064. "properties": {
  3065. "user_id": {
  3066. "type": "string",
  3067. "format": "email"
  3068. },
  3069. "device_id": {
  3070. "type": "string"
  3071. },
  3072. "channel_id": {
  3073. "type": "string"
  3074. },
  3075. "device_type": {
  3076. "type": "string",
  3077. "enum": [
  3078. "android",
  3079. "ios"
  3080. ]
  3081. },
  3082. "device_model": {
  3083. "type": "string"
  3084. },
  3085. "device_token": {
  3086. "type": "string"
  3087. }
  3088. }
  3089. },
  3090. "newDevice": {
  3091. "type": "object",
  3092. "properties": {
  3093. "user_id": {
  3094. "type": "string",
  3095. "format": "email"
  3096. },
  3097. "device_id": {
  3098. "type": "string"
  3099. }
  3100. }
  3101. },
  3102. "TermOfUse": {
  3103. "type": "object",
  3104. "required": [
  3105. "term_id",
  3106. "text",
  3107. "version"
  3108. ],
  3109. "properties": {
  3110. "term_id": {
  3111. "type": "string",
  3112. "format": "UUID"
  3113. },
  3114. "text": {
  3115. "type": "string"
  3116. },
  3117. "version": {
  3118. "type": "string"
  3119. }
  3120. },
  3121. "example": {
  3122. "term_id": "1b8e04c0-c2b1-4fe7-aeae-82fe9eef61c4",
  3123. "text": "Lorem ipsum dolor sit amet, has id diam mazim legere, sit ea dico abhorreant. Apeirian maluisset ut eum. Te ipsum ridens iisque sed. Suavitate splendide ea qui, nam no sint vidit virtute, an dictas fierent liberavisse nec.\n\nCum ridens tibique at. Vis te velit homero accumsan. Sale eruditi senserit usu eu, per imperdiet scripserit dissentiet ex, pri dicit altera aeterno ea. Est ex putant blandit epicurei, tale reque assum mel et. Electram instructior no sit, legimus fastidii ne pri.\n",
  3124. "version": "1"
  3125. }
  3126. },
  3127. "TermAccepted": {
  3128. "type": "object",
  3129. "required": [
  3130. "device_id",
  3131. "accepted_terms"
  3132. ],
  3133. "properties": {
  3134. "device_id": {
  3135. "type": "string"
  3136. },
  3137. "accepted_terms": {
  3138. "type": "boolean"
  3139. }
  3140. }
  3141. },
  3142. "UserProfileResponse": {
  3143. "type": "object",
  3144. "required": [
  3145. "user_id",
  3146. "document",
  3147. "name",
  3148. "email",
  3149. "role",
  3150. "group_id",
  3151. "terms"
  3152. ],
  3153. "properties": {
  3154. "user_id": {
  3155. "type": "string",
  3156. "example": "user3@gftbrasiloutlook.onmicrosoft.com"
  3157. },
  3158. "document": {
  3159. "type": "string",
  3160. "example": "67968883326"
  3161. },
  3162. "name": {
  3163. "type": "string",
  3164. "example": "Alberto Mendes"
  3165. },
  3166. "email": {
  3167. "type": "string",
  3168. "example": "user3@gftbrasiloutlook.onmicrosoft.com"
  3169. },
  3170. "role": {
  3171. "type": "string",
  3172. "example": "master"
  3173. },
  3174. "group_id": {
  3175. "type": "string",
  3176. "example": "dd6a40e9-2ada-476f-bd29-01168ff9c712"
  3177. },
  3178. "terms": {
  3179. "$ref": "#/definitions/Terms"
  3180. },
  3181. "contacts": {
  3182. "type": "array",
  3183. "items": {
  3184. "$ref": "#/definitions/Contact"
  3185. }
  3186. },
  3187. "permissions": {
  3188. "type": "array",
  3189. "items": {
  3190. "$ref": "#/definitions/Permission"
  3191. }
  3192. }
  3193. }
  3194. },
  3195. "Contact": {
  3196. "type": "object",
  3197. "required": [
  3198. "name",
  3199. "agency",
  3200. "email",
  3201. "function",
  3202. "phone"
  3203. ],
  3204. "properties": {
  3205. "name": {
  3206. "type": "string",
  3207. "example": "Alberto Rodrigues"
  3208. },
  3209. "agency": {
  3210. "type": "string",
  3211. "example": "Agência Rondonópolis"
  3212. },
  3213. "email": {
  3214. "type": "string",
  3215. "example": "user3@gftbrasiloutlook.onmicrosoft.com"
  3216. },
  3217. "function": {
  3218. "type": "string",
  3219. "example": "Gerente de Relacionamento"
  3220. },
  3221. "phone": {
  3222. "type": "string",
  3223. "example": "(011) 5503-7000"
  3224. }
  3225. }
  3226. },
  3227. "Terms": {
  3228. "type": "object",
  3229. "required": [
  3230. "term_id",
  3231. "version",
  3232. "accepted"
  3233. ],
  3234. "properties": {
  3235. "term_id": {
  3236. "type": "string",
  3237. "example": "71564ded-a50d-4e2a-9144-8dad75a5f5c9"
  3238. },
  3239. "version": {
  3240. "type": "string",
  3241. "example": "1"
  3242. },
  3243. "accepted": {
  3244. "type": "boolean"
  3245. }
  3246. }
  3247. },
  3248. "Permission": {
  3249. "type": "object",
  3250. "required": [
  3251. "code",
  3252. "checked",
  3253. "label"
  3254. ],
  3255. "properties": {
  3256. "code": {
  3257. "type": "string",
  3258. "example": "simulation"
  3259. },
  3260. "label": {
  3261. "type": "string",
  3262. "example": "Simulação"
  3263. },
  3264. "checked": {
  3265. "type": "boolean"
  3266. }
  3267. }
  3268. },
  3269. "operation_status": {
  3270. "type": "object",
  3271. "properties": {
  3272. "id": {
  3273. "type": "string"
  3274. },
  3275. "name": {
  3276. "type": "string"
  3277. }
  3278. }
  3279. },
  3280. "message": {
  3281. "type": "object",
  3282. "properties": {
  3283. "code": {
  3284. "type": "string"
  3285. },
  3286. "message": {
  3287. "type": "string"
  3288. },
  3289. "message_type": {
  3290. "type": "string"
  3291. }
  3292. }
  3293. },
  3294. "operation": {
  3295. "type": "object",
  3296. "properties": {
  3297. "taskId": {
  3298. "type": "string",
  3299. "format": "uuid"
  3300. },
  3301. "status": {
  3302. "$ref": "#/definitions/operation_status"
  3303. },
  3304. "messages": {
  3305. "type": "array",
  3306. "items": {
  3307. "$ref": "#/definitions/message"
  3308. }
  3309. }
  3310. }
  3311. },
  3312. "error": {
  3313. "type": "object",
  3314. "properties": {
  3315. "code": {
  3316. "type": "string"
  3317. },
  3318. "message": {
  3319. "type": "string"
  3320. }
  3321. }
  3322. }
  3323. },
  3324. "responses": {
  3325. "standard_200": {
  3326. "description": "Successful Response"
  3327. },
  3328. "standard_201": {
  3329. "description": "Resource created"
  3330. },
  3331. "standard_202": {
  3332. "description": "Accepted - The request was successful and will be processed asynchronously"
  3333. },
  3334. "standard_204": {
  3335. "description": "No content - There is no response body"
  3336. },
  3337. "standard_301": {
  3338. "description": "Moved Permanently",
  3339. "schema": {
  3340. "$ref": "#/definitions/error"
  3341. }
  3342. },
  3343. "standard_303": {
  3344. "description": "See Other",
  3345. "schema": {
  3346. "$ref": "#/definitions/error"
  3347. }
  3348. },
  3349. "standard_304": {
  3350. "description": "Not Modified",
  3351. "schema": {
  3352. "$ref": "#/definitions/error"
  3353. }
  3354. },
  3355. "standard_400": {
  3356. "description": "A Bad Request Error occured",
  3357. "schema": {
  3358. "$ref": "#/definitions/error"
  3359. }
  3360. },
  3361. "standard_401": {
  3362. "description": "Invalid access token.",
  3363. "schema": {
  3364. "$ref": "#/definitions/error"
  3365. }
  3366. },
  3367. "standard_403": {
  3368. "description": "Forbidden - the user is not authorized to use this resource",
  3369. "schema": {
  3370. "$ref": "#/definitions/error"
  3371. }
  3372. },
  3373. "standard_404": {
  3374. "description": "Resource with supplied ID not found",
  3375. "schema": {
  3376. "$ref": "#/definitions/error"
  3377. }
  3378. },
  3379. "standard_405": {
  3380. "description": "Method Not Allowed",
  3381. "schema": {
  3382. "$ref": "#/definitions/error"
  3383. }
  3384. },
  3385. "standard_406": {
  3386. "description": "Not Acceptable",
  3387. "schema": {
  3388. "$ref": "#/definitions/error"
  3389. }
  3390. },
  3391. "standard_408": {
  3392. "description": "Request timeout",
  3393. "schema": {
  3394. "$ref": "#/definitions/error"
  3395. }
  3396. },
  3397. "standard_409": {
  3398. "description": "Conflict - Request cannot be completed due to conflict",
  3399. "schema": {
  3400. "$ref": "#/definitions/error"
  3401. }
  3402. },
  3403. "standard_410": {
  3404. "description": "Gone - resource does not exist any longe",
  3405. "schema": {
  3406. "$ref": "#/definitions/error"
  3407. }
  3408. },
  3409. "standard_412": {
  3410. "description": "Precondition Failed",
  3411. "schema": {
  3412. "$ref": "#/definitions/error"
  3413. }
  3414. },
  3415. "standard_415": {
  3416. "description": "Unsupported Media Type",
  3417. "schema": {
  3418. "$ref": "#/definitions/error"
  3419. }
  3420. },
  3421. "standard_423": {
  3422. "description": "Locked - Pessimistic locking",
  3423. "schema": {
  3424. "$ref": "#/definitions/error"
  3425. }
  3426. },
  3427. "standard_428": {
  3428. "description": "Precondition Required",
  3429. "schema": {
  3430. "$ref": "#/definitions/error"
  3431. }
  3432. },
  3433. "standard_429": {
  3434. "description": "Too many request",
  3435. "schema": {
  3436. "$ref": "#/definitions/error"
  3437. }
  3438. },
  3439. "standard_500": {
  3440. "description": "Internal Server Error",
  3441. "schema": {
  3442. "$ref": "#/definitions/error"
  3443. }
  3444. },
  3445. "standard_501": {
  3446. "description": "Not Implemented - server cannot fulfill the request",
  3447. "schema": {
  3448. "$ref": "#/definitions/error"
  3449. }
  3450. },
  3451. "standard_503": {
  3452. "description": "Service Unavailable - server is (temporarily) not available",
  3453. "schema": {
  3454. "$ref": "#/definitions/error"
  3455. }
  3456. }
  3457. }
  3458. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement