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 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  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. "application/json": {
  139. "schema": {
  140. "type": "object",
  141. "required": [
  142. "ocs"
  143. ],
  144. "properties": {
  145. "ocs": {
  146. "type": "object",
  147. "required": [
  148. "meta",
  149. "data"
  150. ],
  151. "properties": {
  152. "meta": {
  153. "$ref": "#/components/schemas/OCSMeta"
  154. },
  155. "data": {}
  156. }
  157. }
  158. }
  159. }
  160. }
  161. }
  162. }
  163. }
  164. }
  165. },
  166. "/ocs/v2.php/apps/federation/api/v1/request-shared-secret": {
  167. "post": {
  168. "operationId": "ocs_authapi-request-shared-secret-legacy",
  169. "summary": "Request received to ask remote server for a shared secret, for legacy end-points",
  170. "tags": [
  171. "ocs_authapi"
  172. ],
  173. "security": [
  174. {},
  175. {
  176. "bearer_auth": []
  177. },
  178. {
  179. "basic_auth": []
  180. }
  181. ],
  182. "parameters": [
  183. {
  184. "name": "url",
  185. "in": "query",
  186. "description": "URL of the server",
  187. "required": true,
  188. "schema": {
  189. "type": "string"
  190. }
  191. },
  192. {
  193. "name": "token",
  194. "in": "query",
  195. "description": "Token of the server",
  196. "required": true,
  197. "schema": {
  198. "type": "string"
  199. }
  200. },
  201. {
  202. "name": "OCS-APIRequest",
  203. "in": "header",
  204. "description": "Required to be true for the API request to pass",
  205. "required": true,
  206. "schema": {
  207. "type": "boolean",
  208. "default": true
  209. }
  210. }
  211. ],
  212. "responses": {
  213. "200": {
  214. "description": "Shared secret requested successfully",
  215. "content": {
  216. "application/json": {
  217. "schema": {
  218. "type": "object",
  219. "required": [
  220. "ocs"
  221. ],
  222. "properties": {
  223. "ocs": {
  224. "type": "object",
  225. "required": [
  226. "meta",
  227. "data"
  228. ],
  229. "properties": {
  230. "meta": {
  231. "$ref": "#/components/schemas/OCSMeta"
  232. },
  233. "data": {}
  234. }
  235. }
  236. }
  237. }
  238. }
  239. }
  240. },
  241. "403": {
  242. "description": "Requesting shared secret is not allowed",
  243. "content": {
  244. "application/json": {
  245. "schema": {
  246. "type": "object",
  247. "required": [
  248. "ocs"
  249. ],
  250. "properties": {
  251. "ocs": {
  252. "type": "object",
  253. "required": [
  254. "meta",
  255. "data"
  256. ],
  257. "properties": {
  258. "meta": {
  259. "$ref": "#/components/schemas/OCSMeta"
  260. },
  261. "data": {}
  262. }
  263. }
  264. }
  265. }
  266. }
  267. }
  268. }
  269. }
  270. }
  271. },
  272. "/ocs/v2.php/cloud/shared-secret": {
  273. "get": {
  274. "operationId": "ocs_authapi-get-shared-secret",
  275. "summary": "Create shared secret and return it",
  276. "tags": [
  277. "ocs_authapi"
  278. ],
  279. "security": [
  280. {},
  281. {
  282. "bearer_auth": []
  283. },
  284. {
  285. "basic_auth": []
  286. }
  287. ],
  288. "parameters": [
  289. {
  290. "name": "url",
  291. "in": "query",
  292. "description": "URL of the server",
  293. "required": true,
  294. "schema": {
  295. "type": "string"
  296. }
  297. },
  298. {
  299. "name": "token",
  300. "in": "query",
  301. "description": "Token of the server",
  302. "required": true,
  303. "schema": {
  304. "type": "string"
  305. }
  306. },
  307. {
  308. "name": "OCS-APIRequest",
  309. "in": "header",
  310. "description": "Required to be true for the API request to pass",
  311. "required": true,
  312. "schema": {
  313. "type": "boolean",
  314. "default": true
  315. }
  316. }
  317. ],
  318. "responses": {
  319. "200": {
  320. "description": "Shared secret returned",
  321. "content": {
  322. "application/json": {
  323. "schema": {
  324. "type": "object",
  325. "required": [
  326. "ocs"
  327. ],
  328. "properties": {
  329. "ocs": {
  330. "type": "object",
  331. "required": [
  332. "meta",
  333. "data"
  334. ],
  335. "properties": {
  336. "meta": {
  337. "$ref": "#/components/schemas/OCSMeta"
  338. },
  339. "data": {
  340. "type": "object",
  341. "required": [
  342. "sharedSecret"
  343. ],
  344. "properties": {
  345. "sharedSecret": {
  346. "type": "string"
  347. }
  348. }
  349. }
  350. }
  351. }
  352. }
  353. }
  354. }
  355. }
  356. },
  357. "403": {
  358. "description": "Getting shared secret is not allowed",
  359. "content": {
  360. "application/json": {
  361. "schema": {
  362. "type": "object",
  363. "required": [
  364. "ocs"
  365. ],
  366. "properties": {
  367. "ocs": {
  368. "type": "object",
  369. "required": [
  370. "meta",
  371. "data"
  372. ],
  373. "properties": {
  374. "meta": {
  375. "$ref": "#/components/schemas/OCSMeta"
  376. },
  377. "data": {}
  378. }
  379. }
  380. }
  381. }
  382. }
  383. }
  384. }
  385. }
  386. },
  387. "post": {
  388. "operationId": "ocs_authapi-request-shared-secret",
  389. "summary": "Request received to ask remote server for a shared secret",
  390. "tags": [
  391. "ocs_authapi"
  392. ],
  393. "security": [
  394. {},
  395. {
  396. "bearer_auth": []
  397. },
  398. {
  399. "basic_auth": []
  400. }
  401. ],
  402. "parameters": [
  403. {
  404. "name": "url",
  405. "in": "query",
  406. "description": "URL of the server",
  407. "required": true,
  408. "schema": {
  409. "type": "string"
  410. }
  411. },
  412. {
  413. "name": "token",
  414. "in": "query",
  415. "description": "Token of the server",
  416. "required": true,
  417. "schema": {
  418. "type": "string"
  419. }
  420. },
  421. {
  422. "name": "OCS-APIRequest",
  423. "in": "header",
  424. "description": "Required to be true for the API request to pass",
  425. "required": true,
  426. "schema": {
  427. "type": "boolean",
  428. "default": true
  429. }
  430. }
  431. ],
  432. "responses": {
  433. "200": {
  434. "description": "Shared secret requested successfully",
  435. "content": {
  436. "application/json": {
  437. "schema": {
  438. "type": "object",
  439. "required": [
  440. "ocs"
  441. ],
  442. "properties": {
  443. "ocs": {
  444. "type": "object",
  445. "required": [
  446. "meta",
  447. "data"
  448. ],
  449. "properties": {
  450. "meta": {
  451. "$ref": "#/components/schemas/OCSMeta"
  452. },
  453. "data": {}
  454. }
  455. }
  456. }
  457. }
  458. }
  459. }
  460. },
  461. "403": {
  462. "description": "Requesting shared secret is not allowed",
  463. "content": {
  464. "application/json": {
  465. "schema": {
  466. "type": "object",
  467. "required": [
  468. "ocs"
  469. ],
  470. "properties": {
  471. "ocs": {
  472. "type": "object",
  473. "required": [
  474. "meta",
  475. "data"
  476. ],
  477. "properties": {
  478. "meta": {
  479. "$ref": "#/components/schemas/OCSMeta"
  480. },
  481. "data": {}
  482. }
  483. }
  484. }
  485. }
  486. }
  487. }
  488. }
  489. }
  490. }
  491. }
  492. },
  493. "tags": [
  494. {
  495. "name": "ocs_authapi",
  496. "description": "Class OCSAuthAPI\nOCS API end-points to exchange shared secret between two connected Nextclouds"
  497. }
  498. ]
  499. }