You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

openapi.json 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "federation",
  5. "version": "0.0.1",
  6. "description": "Federation allows you to connect with other trusted servers to exchange the account directory.",
  7. "license": {
  8. "name": "agpl"
  9. }
  10. },
  11. "components": {
  12. "securitySchemes": {
  13. "basic_auth": {
  14. "type": "http",
  15. "scheme": "basic"
  16. },
  17. "bearer_auth": {
  18. "type": "http",
  19. "scheme": "bearer"
  20. }
  21. },
  22. "schemas": {
  23. "OCSMeta": {
  24. "type": "object",
  25. "required": [
  26. "status",
  27. "statuscode"
  28. ],
  29. "properties": {
  30. "status": {
  31. "type": "string"
  32. },
  33. "statuscode": {
  34. "type": "integer"
  35. },
  36. "message": {
  37. "type": "string"
  38. },
  39. "totalitems": {
  40. "type": "string"
  41. },
  42. "itemsperpage": {
  43. "type": "string"
  44. }
  45. }
  46. }
  47. }
  48. },
  49. "paths": {
  50. "/ocs/v2.php/apps/federation/api/v1/shared-secret": {
  51. "get": {
  52. "operationId": "ocs_authapi-get-shared-secret-legacy",
  53. "summary": "Create shared secret and return it, for legacy end-points",
  54. "tags": [
  55. "ocs_authapi"
  56. ],
  57. "security": [
  58. {},
  59. {
  60. "bearer_auth": []
  61. },
  62. {
  63. "basic_auth": []
  64. }
  65. ],
  66. "parameters": [
  67. {
  68. "name": "url",
  69. "in": "query",
  70. "description": "URL of the server",
  71. "required": true,
  72. "schema": {
  73. "type": "string"
  74. }
  75. },
  76. {
  77. "name": "token",
  78. "in": "query",
  79. "description": "Token of the server",
  80. "required": true,
  81. "schema": {
  82. "type": "string"
  83. }
  84. },
  85. {
  86. "name": "OCS-APIRequest",
  87. "in": "header",
  88. "description": "Required to be true for the API request to pass",
  89. "required": true,
  90. "schema": {
  91. "type": "boolean",
  92. "default": true
  93. }
  94. }
  95. ],
  96. "responses": {
  97. "200": {
  98. "description": "Shared secret returned",
  99. "content": {
  100. "application/json": {
  101. "schema": {
  102. "type": "object",
  103. "required": [
  104. "ocs"
  105. ],
  106. "properties": {
  107. "ocs": {
  108. "type": "object",
  109. "required": [
  110. "meta",
  111. "data"
  112. ],
  113. "properties": {
  114. "meta": {
  115. "$ref": "#/components/schemas/OCSMeta"
  116. },
  117. "data": {
  118. "type": "object",
  119. "required": [
  120. "sharedSecret"
  121. ],
  122. "properties": {
  123. "sharedSecret": {
  124. "type": "string"
  125. }
  126. }
  127. }
  128. }
  129. }
  130. }
  131. }
  132. }
  133. }
  134. },
  135. "403": {
  136. "description": "Getting shared secret is not allowed",
  137. "content": {
  138. "text/plain": {
  139. "schema": {
  140. "type": "string"
  141. }
  142. }
  143. }
  144. }
  145. }
  146. }
  147. },
  148. "/ocs/v2.php/apps/federation/api/v1/request-shared-secret": {
  149. "post": {
  150. "operationId": "ocs_authapi-request-shared-secret-legacy",
  151. "summary": "Request received to ask remote server for a shared secret, for legacy end-points",
  152. "tags": [
  153. "ocs_authapi"
  154. ],
  155. "security": [
  156. {},
  157. {
  158. "bearer_auth": []
  159. },
  160. {
  161. "basic_auth": []
  162. }
  163. ],
  164. "parameters": [
  165. {
  166. "name": "url",
  167. "in": "query",
  168. "description": "URL of the server",
  169. "required": true,
  170. "schema": {
  171. "type": "string"
  172. }
  173. },
  174. {
  175. "name": "token",
  176. "in": "query",
  177. "description": "Token of the server",
  178. "required": true,
  179. "schema": {
  180. "type": "string"
  181. }
  182. },
  183. {
  184. "name": "OCS-APIRequest",
  185. "in": "header",
  186. "description": "Required to be true for the API request to pass",
  187. "required": true,
  188. "schema": {
  189. "type": "boolean",
  190. "default": true
  191. }
  192. }
  193. ],
  194. "responses": {
  195. "200": {
  196. "description": "Shared secret requested successfully",
  197. "content": {
  198. "application/json": {
  199. "schema": {
  200. "type": "object",
  201. "required": [
  202. "ocs"
  203. ],
  204. "properties": {
  205. "ocs": {
  206. "type": "object",
  207. "required": [
  208. "meta",
  209. "data"
  210. ],
  211. "properties": {
  212. "meta": {
  213. "$ref": "#/components/schemas/OCSMeta"
  214. },
  215. "data": {}
  216. }
  217. }
  218. }
  219. }
  220. }
  221. }
  222. },
  223. "403": {
  224. "description": "Requesting shared secret is not allowed",
  225. "content": {
  226. "text/plain": {
  227. "schema": {
  228. "type": "string"
  229. }
  230. }
  231. }
  232. }
  233. }
  234. }
  235. },
  236. "/ocs/v2.php/cloud/shared-secret": {
  237. "get": {
  238. "operationId": "ocs_authapi-get-shared-secret",
  239. "summary": "Create shared secret and return it",
  240. "tags": [
  241. "ocs_authapi"
  242. ],
  243. "security": [
  244. {},
  245. {
  246. "bearer_auth": []
  247. },
  248. {
  249. "basic_auth": []
  250. }
  251. ],
  252. "parameters": [
  253. {
  254. "name": "url",
  255. "in": "query",
  256. "description": "URL of the server",
  257. "required": true,
  258. "schema": {
  259. "type": "string"
  260. }
  261. },
  262. {
  263. "name": "token",
  264. "in": "query",
  265. "description": "Token of the server",
  266. "required": true,
  267. "schema": {
  268. "type": "string"
  269. }
  270. },
  271. {
  272. "name": "OCS-APIRequest",
  273. "in": "header",
  274. "description": "Required to be true for the API request to pass",
  275. "required": true,
  276. "schema": {
  277. "type": "boolean",
  278. "default": true
  279. }
  280. }
  281. ],
  282. "responses": {
  283. "200": {
  284. "description": "Shared secret returned",
  285. "content": {
  286. "application/json": {
  287. "schema": {
  288. "type": "object",
  289. "required": [
  290. "ocs"
  291. ],
  292. "properties": {
  293. "ocs": {
  294. "type": "object",
  295. "required": [
  296. "meta",
  297. "data"
  298. ],
  299. "properties": {
  300. "meta": {
  301. "$ref": "#/components/schemas/OCSMeta"
  302. },
  303. "data": {
  304. "type": "object",
  305. "required": [
  306. "sharedSecret"
  307. ],
  308. "properties": {
  309. "sharedSecret": {
  310. "type": "string"
  311. }
  312. }
  313. }
  314. }
  315. }
  316. }
  317. }
  318. }
  319. }
  320. },
  321. "403": {
  322. "description": "Getting shared secret is not allowed",
  323. "content": {
  324. "text/plain": {
  325. "schema": {
  326. "type": "string"
  327. }
  328. }
  329. }
  330. }
  331. }
  332. },
  333. "post": {
  334. "operationId": "ocs_authapi-request-shared-secret",
  335. "summary": "Request received to ask remote server for a shared secret",
  336. "tags": [
  337. "ocs_authapi"
  338. ],
  339. "security": [
  340. {},
  341. {
  342. "bearer_auth": []
  343. },
  344. {
  345. "basic_auth": []
  346. }
  347. ],
  348. "parameters": [
  349. {
  350. "name": "url",
  351. "in": "query",
  352. "description": "URL of the server",
  353. "required": true,
  354. "schema": {
  355. "type": "string"
  356. }
  357. },
  358. {
  359. "name": "token",
  360. "in": "query",
  361. "description": "Token of the server",
  362. "required": true,
  363. "schema": {
  364. "type": "string"
  365. }
  366. },
  367. {
  368. "name": "OCS-APIRequest",
  369. "in": "header",
  370. "description": "Required to be true for the API request to pass",
  371. "required": true,
  372. "schema": {
  373. "type": "boolean",
  374. "default": true
  375. }
  376. }
  377. ],
  378. "responses": {
  379. "200": {
  380. "description": "Shared secret requested successfully",
  381. "content": {
  382. "application/json": {
  383. "schema": {
  384. "type": "object",
  385. "required": [
  386. "ocs"
  387. ],
  388. "properties": {
  389. "ocs": {
  390. "type": "object",
  391. "required": [
  392. "meta",
  393. "data"
  394. ],
  395. "properties": {
  396. "meta": {
  397. "$ref": "#/components/schemas/OCSMeta"
  398. },
  399. "data": {}
  400. }
  401. }
  402. }
  403. }
  404. }
  405. }
  406. },
  407. "403": {
  408. "description": "Requesting shared secret is not allowed",
  409. "content": {
  410. "text/plain": {
  411. "schema": {
  412. "type": "string"
  413. }
  414. }
  415. }
  416. }
  417. }
  418. }
  419. }
  420. },
  421. "tags": [
  422. {
  423. "name": "ocs_authapi",
  424. "description": "Class OCSAuthAPI\nOCS API end-points to exchange shared secret between two connected Nextclouds"
  425. }
  426. ]
  427. }