Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

openapi.json 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "user_ldap",
  5. "version": "0.0.1",
  6. "description": "This application enables administrators to connect Nextcloud to an LDAP-based user 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/user_ldap/api/v1/config": {
  51. "post": {
  52. "operationId": "configapi-create",
  53. "summary": "Create a new (empty) configuration and return the resulting prefix",
  54. "description": "This endpoint requires admin access",
  55. "tags": [
  56. "configapi"
  57. ],
  58. "security": [
  59. {
  60. "bearer_auth": []
  61. },
  62. {
  63. "basic_auth": []
  64. }
  65. ],
  66. "parameters": [
  67. {
  68. "name": "OCS-APIRequest",
  69. "in": "header",
  70. "description": "Required to be true for the API request to pass",
  71. "required": true,
  72. "schema": {
  73. "type": "boolean",
  74. "default": true
  75. }
  76. }
  77. ],
  78. "responses": {
  79. "200": {
  80. "description": "Config created successfully",
  81. "content": {
  82. "application/json": {
  83. "schema": {
  84. "type": "object",
  85. "required": [
  86. "ocs"
  87. ],
  88. "properties": {
  89. "ocs": {
  90. "type": "object",
  91. "required": [
  92. "meta",
  93. "data"
  94. ],
  95. "properties": {
  96. "meta": {
  97. "$ref": "#/components/schemas/OCSMeta"
  98. },
  99. "data": {
  100. "type": "object",
  101. "required": [
  102. "configID"
  103. ],
  104. "properties": {
  105. "configID": {
  106. "type": "string"
  107. }
  108. }
  109. }
  110. }
  111. }
  112. }
  113. }
  114. }
  115. }
  116. }
  117. }
  118. }
  119. },
  120. "/ocs/v2.php/apps/user_ldap/api/v1/config/{configID}": {
  121. "get": {
  122. "operationId": "configapi-show",
  123. "summary": "Get a configuration",
  124. "description": "Output can look like this: <?xml version=\"1.0\"?> <ocs> <meta> <status>ok</status> <statuscode>200</statuscode> <message>OK</message> </meta> <data> <ldapHost>ldaps://my.ldap.server</ldapHost> <ldapPort>7770</ldapPort> <ldapBackupHost></ldapBackupHost> <ldapBackupPort></ldapBackupPort> <ldapBase>ou=small,dc=my,dc=ldap,dc=server</ldapBase> <ldapBaseUsers>ou=users,ou=small,dc=my,dc=ldap,dc=server</ldapBaseUsers> <ldapBaseGroups>ou=small,dc=my,dc=ldap,dc=server</ldapBaseGroups> <ldapAgentName>cn=root,dc=my,dc=ldap,dc=server</ldapAgentName> <ldapAgentPassword>clearTextWithShowPassword=1</ldapAgentPassword> <ldapTLS>1</ldapTLS> <turnOffCertCheck>0</turnOffCertCheck> <ldapIgnoreNamingRules/> <ldapUserDisplayName>displayname</ldapUserDisplayName> <ldapUserDisplayName2>uid</ldapUserDisplayName2> <ldapUserFilterObjectclass>inetOrgPerson</ldapUserFilterObjectclass> <ldapUserFilterGroups></ldapUserFilterGroups> <ldapUserFilter>(&amp;(objectclass=nextcloudUser)(nextcloudEnabled=TRUE))</ldapUserFilter> <ldapUserFilterMode>1</ldapUserFilterMode> <ldapGroupFilter>(&amp;(|(objectclass=nextcloudGroup)))</ldapGroupFilter> <ldapGroupFilterMode>0</ldapGroupFilterMode> <ldapGroupFilterObjectclass>nextcloudGroup</ldapGroupFilterObjectclass> <ldapGroupFilterGroups></ldapGroupFilterGroups> <ldapGroupDisplayName>cn</ldapGroupDisplayName> <ldapGroupMemberAssocAttr>memberUid</ldapGroupMemberAssocAttr> <ldapLoginFilter>(&amp;(|(objectclass=inetOrgPerson))(uid=%uid))</ldapLoginFilter> <ldapLoginFilterMode>0</ldapLoginFilterMode> <ldapLoginFilterEmail>0</ldapLoginFilterEmail> <ldapLoginFilterUsername>1</ldapLoginFilterUsername> <ldapLoginFilterAttributes></ldapLoginFilterAttributes> <ldapQuotaAttribute></ldapQuotaAttribute> <ldapQuotaDefault></ldapQuotaDefault> <ldapEmailAttribute>mail</ldapEmailAttribute> <ldapCacheTTL>20</ldapCacheTTL> <ldapUuidUserAttribute>auto</ldapUuidUserAttribute> <ldapUuidGroupAttribute>auto</ldapUuidGroupAttribute> <ldapOverrideMainServer></ldapOverrideMainServer> <ldapConfigurationActive>1</ldapConfigurationActive> <ldapAttributesForUserSearch>uid;sn;givenname</ldapAttributesForUserSearch> <ldapAttributesForGroupSearch></ldapAttributesForGroupSearch> <ldapExperiencedAdmin>0</ldapExperiencedAdmin> <homeFolderNamingRule></homeFolderNamingRule> <hasMemberOfFilterSupport></hasMemberOfFilterSupport> <useMemberOfToDetectMembership>1</useMemberOfToDetectMembership> <ldapExpertUsernameAttr>uid</ldapExpertUsernameAttr> <ldapExpertUUIDUserAttr>uid</ldapExpertUUIDUserAttr> <ldapExpertUUIDGroupAttr></ldapExpertUUIDGroupAttr> <lastJpegPhotoLookup>0</lastJpegPhotoLookup> <ldapNestedGroups>0</ldapNestedGroups> <ldapPagingSize>500</ldapPagingSize> <turnOnPasswordChange>1</turnOnPasswordChange> <ldapDynamicGroupMemberURL></ldapDynamicGroupMemberURL> </data> </ocs>\nThis endpoint requires admin access",
  125. "tags": [
  126. "configapi"
  127. ],
  128. "security": [
  129. {
  130. "bearer_auth": []
  131. },
  132. {
  133. "basic_auth": []
  134. }
  135. ],
  136. "parameters": [
  137. {
  138. "name": "showPassword",
  139. "in": "query",
  140. "description": "Whether to show the password",
  141. "schema": {
  142. "type": "integer",
  143. "default": 0
  144. }
  145. },
  146. {
  147. "name": "configID",
  148. "in": "path",
  149. "description": "ID of the config",
  150. "required": true,
  151. "schema": {
  152. "type": "string"
  153. }
  154. },
  155. {
  156. "name": "OCS-APIRequest",
  157. "in": "header",
  158. "description": "Required to be true for the API request to pass",
  159. "required": true,
  160. "schema": {
  161. "type": "boolean",
  162. "default": true
  163. }
  164. }
  165. ],
  166. "responses": {
  167. "200": {
  168. "description": "Config returned",
  169. "content": {
  170. "application/json": {
  171. "schema": {
  172. "type": "object",
  173. "required": [
  174. "ocs"
  175. ],
  176. "properties": {
  177. "ocs": {
  178. "type": "object",
  179. "required": [
  180. "meta",
  181. "data"
  182. ],
  183. "properties": {
  184. "meta": {
  185. "$ref": "#/components/schemas/OCSMeta"
  186. },
  187. "data": {
  188. "type": "object",
  189. "additionalProperties": {
  190. "type": "object"
  191. }
  192. }
  193. }
  194. }
  195. }
  196. }
  197. }
  198. }
  199. },
  200. "404": {
  201. "description": "Config not found",
  202. "content": {
  203. "text/plain": {
  204. "schema": {
  205. "type": "string"
  206. }
  207. }
  208. }
  209. }
  210. }
  211. },
  212. "put": {
  213. "operationId": "configapi-modify",
  214. "summary": "Modify a configuration",
  215. "description": "This endpoint requires admin access",
  216. "tags": [
  217. "configapi"
  218. ],
  219. "security": [
  220. {
  221. "bearer_auth": []
  222. },
  223. {
  224. "basic_auth": []
  225. }
  226. ],
  227. "parameters": [
  228. {
  229. "name": "configData",
  230. "in": "query",
  231. "description": "New config",
  232. "required": true,
  233. "schema": {
  234. "type": "string"
  235. }
  236. },
  237. {
  238. "name": "configID",
  239. "in": "path",
  240. "description": "ID of the config",
  241. "required": true,
  242. "schema": {
  243. "type": "string"
  244. }
  245. },
  246. {
  247. "name": "OCS-APIRequest",
  248. "in": "header",
  249. "description": "Required to be true for the API request to pass",
  250. "required": true,
  251. "schema": {
  252. "type": "boolean",
  253. "default": true
  254. }
  255. }
  256. ],
  257. "responses": {
  258. "200": {
  259. "description": "Config returned",
  260. "content": {
  261. "application/json": {
  262. "schema": {
  263. "type": "object",
  264. "required": [
  265. "ocs"
  266. ],
  267. "properties": {
  268. "ocs": {
  269. "type": "object",
  270. "required": [
  271. "meta",
  272. "data"
  273. ],
  274. "properties": {
  275. "meta": {
  276. "$ref": "#/components/schemas/OCSMeta"
  277. },
  278. "data": {}
  279. }
  280. }
  281. }
  282. }
  283. }
  284. }
  285. },
  286. "400": {
  287. "description": "Modifying config is not possible",
  288. "content": {
  289. "text/plain": {
  290. "schema": {
  291. "type": "string"
  292. }
  293. }
  294. }
  295. },
  296. "404": {
  297. "description": "Config not found",
  298. "content": {
  299. "text/plain": {
  300. "schema": {
  301. "type": "string"
  302. }
  303. }
  304. }
  305. }
  306. }
  307. },
  308. "delete": {
  309. "operationId": "configapi-delete",
  310. "summary": "Delete a LDAP configuration",
  311. "description": "This endpoint requires admin access",
  312. "tags": [
  313. "configapi"
  314. ],
  315. "security": [
  316. {
  317. "bearer_auth": []
  318. },
  319. {
  320. "basic_auth": []
  321. }
  322. ],
  323. "parameters": [
  324. {
  325. "name": "configID",
  326. "in": "path",
  327. "description": "ID of the config",
  328. "required": true,
  329. "schema": {
  330. "type": "string"
  331. }
  332. },
  333. {
  334. "name": "OCS-APIRequest",
  335. "in": "header",
  336. "description": "Required to be true for the API request to pass",
  337. "required": true,
  338. "schema": {
  339. "type": "boolean",
  340. "default": true
  341. }
  342. }
  343. ],
  344. "responses": {
  345. "200": {
  346. "description": "Config deleted successfully",
  347. "content": {
  348. "application/json": {
  349. "schema": {
  350. "type": "object",
  351. "required": [
  352. "ocs"
  353. ],
  354. "properties": {
  355. "ocs": {
  356. "type": "object",
  357. "required": [
  358. "meta",
  359. "data"
  360. ],
  361. "properties": {
  362. "meta": {
  363. "$ref": "#/components/schemas/OCSMeta"
  364. },
  365. "data": {}
  366. }
  367. }
  368. }
  369. }
  370. }
  371. }
  372. },
  373. "404": {
  374. "description": "Config not found",
  375. "content": {
  376. "text/plain": {
  377. "schema": {
  378. "type": "string"
  379. }
  380. }
  381. }
  382. }
  383. }
  384. }
  385. }
  386. },
  387. "tags": []
  388. }