access-lists.json 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "$id": "endpoints/access-lists",
  4. "title": "Access Lists",
  5. "description": "Endpoints relating to Access Lists",
  6. "stability": "stable",
  7. "type": "object",
  8. "definitions": {
  9. "id": {
  10. "$ref": "../definitions.json#/definitions/id"
  11. },
  12. "created_on": {
  13. "$ref": "../definitions.json#/definitions/created_on"
  14. },
  15. "modified_on": {
  16. "$ref": "../definitions.json#/definitions/modified_on"
  17. },
  18. "name": {
  19. "type": "string",
  20. "description": "Name of the Access List"
  21. },
  22. "directive": {
  23. "type": "string",
  24. "enum": ["allow", "deny"]
  25. },
  26. "address": {
  27. "type": "string",
  28. "format": "ipv4"
  29. },
  30. "satify_any": {
  31. "type": "boolean"
  32. },
  33. "meta": {
  34. "type": "object"
  35. }
  36. },
  37. "properties": {
  38. "id": {
  39. "$ref": "#/definitions/id"
  40. },
  41. "created_on": {
  42. "$ref": "#/definitions/created_on"
  43. },
  44. "modified_on": {
  45. "$ref": "#/definitions/modified_on"
  46. },
  47. "name": {
  48. "$ref": "#/definitions/name"
  49. },
  50. "meta": {
  51. "$ref": "#/definitions/meta"
  52. }
  53. },
  54. "links": [
  55. {
  56. "title": "List",
  57. "description": "Returns a list of Access Lists",
  58. "href": "/nginx/access-lists",
  59. "access": "private",
  60. "method": "GET",
  61. "rel": "self",
  62. "http_header": {
  63. "$ref": "../examples.json#/definitions/auth_header"
  64. },
  65. "targetSchema": {
  66. "type": "array",
  67. "items": {
  68. "$ref": "#/properties"
  69. }
  70. }
  71. },
  72. {
  73. "title": "Create",
  74. "description": "Creates a new Access List",
  75. "href": "/nginx/access-list",
  76. "access": "private",
  77. "method": "POST",
  78. "rel": "create",
  79. "http_header": {
  80. "$ref": "../examples.json#/definitions/auth_header"
  81. },
  82. "schema": {
  83. "type": "object",
  84. "additionalProperties": false,
  85. "required": [
  86. "name"
  87. ],
  88. "properties": {
  89. "name": {
  90. "$ref": "#/definitions/name"
  91. },
  92. "satify_any": {
  93. "$ref": "#/definitions/satify_any"
  94. },
  95. "items": {
  96. "type": "array",
  97. "minItems": 0,
  98. "items": {
  99. "type": "object",
  100. "additionalProperties": false,
  101. "properties": {
  102. "username": {
  103. "type": "string",
  104. "minLength": 1
  105. },
  106. "password": {
  107. "type": "string",
  108. "minLength": 1
  109. }
  110. }
  111. }
  112. },
  113. "clients": {
  114. "type": "array",
  115. "minItems": 0,
  116. "items": {
  117. "type": "object",
  118. "additionalProperties": false,
  119. "properties": {
  120. "address": {
  121. "$ref": "#/definitions/address"
  122. },
  123. "directive": {
  124. "$ref": "#/definitions/directive"
  125. }
  126. }
  127. }
  128. },
  129. "meta": {
  130. "$ref": "#/definitions/meta"
  131. }
  132. }
  133. },
  134. "targetSchema": {
  135. "properties": {
  136. "$ref": "#/properties"
  137. }
  138. }
  139. },
  140. {
  141. "title": "Update",
  142. "description": "Updates a existing Access List",
  143. "href": "/nginx/access-list/{definitions.identity.example}",
  144. "access": "private",
  145. "method": "PUT",
  146. "rel": "update",
  147. "http_header": {
  148. "$ref": "../examples.json#/definitions/auth_header"
  149. },
  150. "schema": {
  151. "type": "object",
  152. "additionalProperties": false,
  153. "properties": {
  154. "name": {
  155. "$ref": "#/definitions/name"
  156. },
  157. "satify_any": {
  158. "$ref": "#/definitions/satify_any"
  159. },
  160. "items": {
  161. "type": "array",
  162. "minItems": 0,
  163. "items": {
  164. "type": "object",
  165. "additionalProperties": false,
  166. "properties": {
  167. "username": {
  168. "type": "string",
  169. "minLength": 1
  170. },
  171. "password": {
  172. "type": "string",
  173. "minLength": 0
  174. }
  175. }
  176. }
  177. },
  178. "clients": {
  179. "type": "array",
  180. "minItems": 0,
  181. "items": {
  182. "type": "object",
  183. "additionalProperties": false,
  184. "properties": {
  185. "address": {
  186. "$ref": "#/definitions/address"
  187. },
  188. "directive": {
  189. "$ref": "#/definitions/directive"
  190. }
  191. }
  192. }
  193. }
  194. }
  195. },
  196. "targetSchema": {
  197. "properties": {
  198. "$ref": "#/properties"
  199. }
  200. }
  201. },
  202. {
  203. "title": "Delete",
  204. "description": "Deletes a existing Access List",
  205. "href": "/nginx/access-list/{definitions.identity.example}",
  206. "access": "private",
  207. "method": "DELETE",
  208. "rel": "delete",
  209. "http_header": {
  210. "$ref": "../examples.json#/definitions/auth_header"
  211. },
  212. "targetSchema": {
  213. "type": "boolean"
  214. }
  215. }
  216. ]
  217. }