Advertisement
Guest User

5.0

a guest
Apr 23rd, 2018
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.55 KB | None | 0 0
  1. swagger: "2.0"
  2. info:
  3. description: "This is a sample server about DataUAI. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters."
  4. version: "1.0.0"
  5. title: "Swagger DATAUAI"
  6. termsOfService: "http://swagger.io/terms/"
  7. contact:
  8. email: "apiteam@swagger.io"
  9. license:
  10. name: "Apache 2.0"
  11. url: "http://www.apache.org/licenses/LICENSE-2.0.html"
  12. host: "dados.ifpb.edu.br"
  13. basePath: "/api/3/action/"
  14. tags:
  15. - name: "DataSet"
  16. description: "Everything about your DataSet"
  17. externalDocs:
  18. description: "Find out more"
  19. url: "http://swagger.io"
  20. schemes:
  21. - "http"
  22. paths:
  23. /package_list:
  24. get:
  25. tags:
  26. - "DataSet"
  27. summary: "Retorna uma lista dos nomes dos conjuntos de dados do site"
  28. description: "Retorna uma lista dos nomes dos conjuntos de dados do site (pacotes)."
  29. operationId: ""
  30. consumes:
  31. - "application/json"
  32. - "application/xml"
  33. produces:
  34. - "application/json"
  35. parameters:
  36. - in: "body"
  37. name: "limit"
  38. description: "se fornecido, a lista de conjuntos de dados será dividida em páginas de no máximo conjuntos de dados por página e somente uma página será retornada por vez."
  39. required: false
  40. schema:
  41. $ref: "#/definitions/DataSet"
  42. responses:
  43. 200:
  44. description: "successful operation"
  45. schema:
  46. type: "array"
  47. items:
  48. $ref: "#/definitions/DataSet"
  49. 400:
  50. description: "Invalid status value"
  51. 404:
  52. description: "Invalid resource_id"
  53. security:
  54. - petstore_auth:
  55. - "write:pets"
  56. - "read:pets"
  57.  
  58. /datastore_search/{resource_id}:
  59. get:
  60. tags:
  61. - "DataSet"
  62. summary: "Finds datasets by UFRN"
  63. description: "Multiple status values can be provided with comma separated strings"
  64. operationId: "findPetsByStatus"
  65. produces:
  66. - "application/xml"
  67. - "application/json"
  68. parameters:
  69. - name: "resource_id"
  70. in: "path"
  71. description: "ID of dateSet"
  72. required: true
  73. type: "string"
  74. format: "int64"
  75. responses:
  76. 200:
  77. description: "successful operation"
  78. schema:
  79. type: "array"
  80. items:
  81. $ref: "#/definitions/DataSet"
  82. 400:
  83. description: "Invalid status value"
  84. 404:
  85. description: "Invalid resource_id"
  86. security:
  87. - petstore_auth:
  88. - "write:pets"
  89. - "read:pets"
  90. /resource_view_show/{id}:
  91. get:
  92. tags:
  93. - "DataSet"
  94. summary: ""
  95. description: "Retorna os metadados de uma 'resource_view'"
  96. operationId: "findResourceById"
  97. produces:
  98. - "application/xml"
  99. - "application/json"
  100. parameters:
  101. - name: "id"
  102. in: "path"
  103. description: "ID of resource_view"
  104. required: true
  105. type: "string"
  106. format: "int64"
  107. responses:
  108. 200:
  109. description: "successful operation"
  110. schema:
  111. type: "array"
  112. items:
  113. $ref: "#/definitions/DataSet"
  114. 400:
  115. description: "Invalid status value"
  116. 404:
  117. description: "Invalid id"
  118. security:
  119. - petstore_auth:
  120. - "write:pets"
  121. - "read:pets"
  122. /resource_view_list/{id}:
  123. get:
  124. tags:
  125. - "DataSet"
  126. summary: ""
  127. description: "Retorna os metadados de uma 'resource_view'"
  128.  
  129. produces:
  130. - "application/xml"
  131. - "application/json"
  132. parameters:
  133. - name: "id"
  134. in: "path"
  135. description: "ID of resource_view"
  136. required: true
  137. type: "string"
  138. format: "int64"
  139. responses:
  140. 200:
  141. description: "successful operation"
  142. schema:
  143. type: "array"
  144. items:
  145. $ref: "#/definitions/DataSet"
  146. 400:
  147. description: "Invalid status value"
  148. 404:
  149. description: "Invalid id"
  150. security:
  151. - petstore_auth:
  152. - "write:pets"
  153. - "read:pets"
  154. /revision_show/{id}:
  155. get:
  156. tags:
  157. - "DataSet"
  158. summary: ""
  159. description: "Retorna os detalhes de uma revisão"
  160.  
  161. produces:
  162. - "application/xml"
  163. - "application/json"
  164. parameters:
  165. - name: "id"
  166. in: "path"
  167. description: "ID of review"
  168. required: true
  169. type: "string"
  170. format: "int64"
  171. responses:
  172. 200:
  173. description: "successful operation"
  174. schema:
  175. type: "array"
  176. items:
  177. $ref: "#/definitions/DataSet"
  178. 400:
  179. description: "Invalid status value"
  180. 404:
  181. description: "Invalid id"
  182. security:
  183. - petstore_auth:
  184. - "write:pets"
  185. - "read:pets"
  186. /group_show/:
  187. get:
  188. tags:
  189. - "DataSet"
  190. summary: ""
  191. description: "Retorna os detalhes de uma revisão"
  192.  
  193. produces:
  194. - "application/xml"
  195. - "application/json"
  196. parameters:
  197. - name: "id"
  198. in: "query"
  199. description: "ID of review"
  200. required: false
  201. type: "string"
  202. format: "int64"
  203. responses:
  204. 200:
  205. description: "successful operation"
  206. schema:
  207. type: "array"
  208. items:
  209. $ref: "#/definitions/DataSet"
  210. 400:
  211. description: "Invalid status value"
  212. 404:
  213. description: "Invalid id"
  214. security:
  215. - petstore_auth:
  216. - "write:pets"
  217. - "read:pets"
  218. /organization_show/:
  219. get:
  220. tags:
  221. - "DataSet"
  222. summary: ""
  223. description: "Retorna os detalhes de uma organização"
  224.  
  225. produces:
  226. - "application/xml"
  227. - "application/json"
  228. parameters:
  229. - name: "id"
  230. in: "path"
  231. description: "ID ou nome da organização"
  232. required: true
  233. type: "string"
  234. format: "int64"
  235. responses:
  236. 200:
  237. description: "successful operation"
  238. schema:
  239. type: "array"
  240. items:
  241. $ref: "#/definitions/DataSet"
  242. 400:
  243. description: "Invalid status value"
  244. 404:
  245. description: "Invalid id"
  246. security:
  247. - petstore_auth:
  248. - "write:pets"
  249. - "read:pets"
  250. /group_package_show/:
  251. get:
  252. tags:
  253. - "DataSet"
  254. summary: ""
  255. description: "Retorna os dataSets de um grupo"
  256.  
  257. produces:
  258. - "application/xml"
  259. - "application/json"
  260. parameters:
  261. - name: "id"
  262. in: "path"
  263. description: "ID ou nome do grupo"
  264. required: true
  265. type: "string"
  266. format: "int64"
  267. responses:
  268. 200:
  269. description: "successful operation"
  270. schema:
  271. type: "array"
  272. items:
  273. $ref: "#/definitions/DataSet"
  274. 400:
  275. description: "Invalid status value"
  276. 404:
  277. description: "Invalid id"
  278. security:
  279. - petstore_auth:
  280. - "write:pets"
  281. - "read:pets"
  282. /tag_show/:
  283. get:
  284. tags:
  285. - "DataSet"
  286. summary: ""
  287. description: "Retorna detalhes de uma tag e todos os datasets assossiados a ela"
  288.  
  289. produces:
  290. - "application/json"
  291. parameters:
  292. - name: "id"
  293. in: "path"
  294. description: "ID ou nome da tag"
  295. required: true
  296. type: "string"
  297. format: "int64"
  298. responses:
  299. 200:
  300. description: "successful operation"
  301. schema:
  302. type: "array"
  303. items:
  304. $ref: "#/definitions/DataSet"
  305. 400:
  306. description: "Invalid status value"
  307. 404:
  308. description: "Invalid id"
  309. security:
  310. - petstore_auth:
  311. - "write:pets"
  312. - "read:pets"
  313. /package_search/:
  314. get:
  315. tags:
  316. - "DataSet"
  317. summary: "Procura pacotes que satisfaçam um determinado critério de pesquisa"
  318. description: "Essa ação aceita parâmetros de consulta de pesquisa de solr (detalhes abaixo) e retorna um dicionário de resultados, incluindo conjuntos de dados ditados que correspondem aos critérios de pesquisa, uma contagem de pesquisa e também informações de faceta."
  319.  
  320. produces:
  321. - "application/xml"
  322. - "application/json"
  323. parameters:
  324. - name: "id"
  325. in: "path"
  326. description: "Esta ação aceita um subconjunto de parâmetros de consulta de pesquisa do solr"
  327. required: true
  328. type: "string"
  329. format: "int64"
  330. responses:
  331. 200:
  332. description: "successful operation"
  333. schema:
  334. type: "array"
  335. items:
  336. $ref: "#/definitions/DataSet"
  337. 400:
  338. description: "Invalid status value"
  339. 404:
  340. description: "Invalid id"
  341. security:
  342. - petstore_auth:
  343. - "write:pets"
  344. - "read:pets"
  345. /resource_search/:
  346. get:
  347. tags:
  348. - "DataSet"
  349. summary: "Procura por recursos que satisfaçam um determinado critério de pesquisa"
  350. description: "Retorna um dicionário com 2 campos: count e results. O campo de contagem contém o número total de recursos encontrados sem que o limite ou os parâmetros de consulta tenham um efeito. O campo de resultados é uma lista de objetos de recursos ditados."
  351.  
  352. produces:
  353. - "application/xml"
  354. - "application/json"
  355. parameters:
  356. - name: "id"
  357. in: "path"
  358. description: "Esta ação aceita um subconjunto de parâmetros de consulta de pesquisa do solr"
  359. required: true
  360. type: "string"
  361. format: "int64"
  362. responses:
  363. 200:
  364. description: "successful operation"
  365. schema:
  366. type: "array"
  367. items:
  368. $ref: "#/definitions/DataSet"
  369. 400:
  370. description: "Invalid status value"
  371. 404:
  372. description: "Invalid id"
  373. security:
  374. - petstore_auth:
  375. - "write:pets"
  376. - "read:pets"
  377. securityDefinitions:
  378. petstore_auth:
  379. type: "oauth2"
  380. authorizationUrl: "http://petstore.swagger.io/oauth/dialog"
  381. flow: "implicit"
  382. scopes:
  383. write:pets: "modify pets in your account"
  384. read:pets: "read your pets"
  385. api_key:
  386. type: "apiKey"
  387. name: "api_key"
  388. in: "header"
  389. definitions:
  390. User:
  391. type: "object"
  392. properties:
  393. id:
  394. type: "integer"
  395. format: "int64"
  396. username:
  397. type: "string"
  398. firstName:
  399. type: "string"
  400. lastName:
  401. type: "string"
  402. email:
  403. type: "string"
  404. password:
  405. type: "string"
  406. phone:
  407. type: "string"
  408. userStatus:
  409. type: "integer"
  410. format: "int32"
  411. description: "User Status"
  412. xml:
  413. name: "User"
  414. Tag:
  415. type: "object"
  416. properties:
  417. id:
  418. type: "integer"
  419. format: "int64"
  420. name:
  421. type: "string"
  422. xml:
  423. name: "Tag"
  424. DataSet:
  425. type: "object"
  426. required:
  427. - "name"
  428. - "photoUrls"
  429. properties:
  430. help:
  431. type: "string"
  432. example: "http://dados.ufrn.br/api/3/action/help_show?name=datastore_search"
  433. sucess:
  434. type: "boolean"
  435. fields:
  436. type: "array"
  437. items:
  438. $ref: "#/definitions/Tag"
  439. name:
  440. type: "string"
  441. example: "DataSet"
  442. photoUrls:
  443. type: "array"
  444. xml:
  445. name: "photoUrl"
  446. wrapped: true
  447. items:
  448. type: "string"
  449. tags:
  450. type: "array"
  451. xml:
  452. name: "tag"
  453. wrapped: true
  454. items:
  455. $ref: "#/definitions/Tag"
  456. status:
  457. type: "string"
  458. description: "pet status in the store"
  459. enum:
  460. - "available"
  461. - "pending"
  462. - "sold"
  463. xml:
  464. name: "Pet"
  465. ApiResponse:
  466. type: "object"
  467. properties:
  468. code:
  469. type: "integer"
  470. format: "int32"
  471. type:
  472. type: "string"
  473. message:
  474. type: "string"
  475. externalDocs:
  476. description: "Find out more about Swagger"
  477. url: "http://swagger.io"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement