# Nodeum API

## Get current LDAP config

> Get current LDAP config

```json
{"openapi":"3.0.1","info":{"title":"Nodeum API","version":"2.1.0"},"servers":[{"url":"{url}/api/v2","variables":{"url":{"default":"http://localhost","description":"URL of server"}}}],"security":[{"BasicAuth":[]},{"BearerAuth":[]},{"JWT":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Pass the username and password of a user in the authorization header.\nThis currently gives full access."},"BearerAuth":{"type":"apiKey","description":"Create an API Key associated to user.\nAccess can be restricted with the scope.\nEach API call described below has a scoped mentionned in its description.\n\nFor example :\n\n**API Key Scope**: files / index\n\nThis means that the API key should have a scope with controller as *files*\nand the action as *index*.","name":"Authorization","in":"header"},"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ldap_config":{"type":"object","properties":{"id":{"type":"integer"},"host":{"type":"string"},"port":{"type":"integer"},"admin_path":{"type":"string"},"admin_password":{"type":"string"},"user_base_path":{"type":"string"},"user_filter_template":{"type":"string"}}}}},"paths":{"/ldap_config":{"get":{"summary":"Get current LDAP config","operationId":"get_ldap_config","description":"Get current LDAP config","responses":{"200":{"description":"Current config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ldap_config"}}}}}}}}}
```

## Set LDAP config

> Set LDAP config

```json
{"openapi":"3.0.1","info":{"title":"Nodeum API","version":"2.1.0"},"servers":[{"url":"{url}/api/v2","variables":{"url":{"default":"http://localhost","description":"URL of server"}}}],"security":[{"BasicAuth":[]},{"BearerAuth":[]},{"JWT":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Pass the username and password of a user in the authorization header.\nThis currently gives full access."},"BearerAuth":{"type":"apiKey","description":"Create an API Key associated to user.\nAccess can be restricted with the scope.\nEach API call described below has a scoped mentionned in its description.\n\nFor example :\n\n**API Key Scope**: files / index\n\nThis means that the API key should have a scope with controller as *files*\nand the action as *index*.","name":"Authorization","in":"header"},"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ldap_config":{"type":"object","properties":{"id":{"type":"integer"},"host":{"type":"string"},"port":{"type":"integer"},"admin_path":{"type":"string"},"admin_password":{"type":"string"},"user_base_path":{"type":"string"},"user_filter_template":{"type":"string"}}}}},"paths":{"/ldap_config":{"post":{"summary":"Set LDAP config","operationId":"set_ldap_config","description":"Set LDAP config","responses":{"200":{"description":"Success or errorr","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"ok":{"type":"bool"}}},{"type":"object","properties":{"error":{"type":"string"}}}]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ldap_config"}}},"required":true}}}}}
```
