Commit 9dc319af authored by ale's avatar ale

Add example of JSON user representation

parent 49c57d00
Pipeline #1063 passed with stages
in 1 minute and 31 seconds
......@@ -213,6 +213,92 @@ Databases have a database name and a database user.
* `db_user` - name of the user associated with the database
### Example
This is an example of a simple user, as returned by `/api/user/get`:
```
{
"name": "uno@example.com",
"lang": "it",
"uid": 19475,
"has_2fa": false,
"has_encryption_keys": false,
"password_recovery_hint": "bla bla bla",
"u2f_registrations": null,
"resources": [
{
"id": "web/uno@example.com/uno",
"name": "autistici.org/uno",
"status": "active",
"shard": "host2",
"original_shard": "host2",
"group": "uno",
"website": {
"url": "https://www.autistici.org/uno/",
"uid": 19475,
"parent_domain": "autistici.org",
"accept_mail": false,
"quota_usage": 0,
"document_root": "/home/users/example.com/uno/html-uno"
}
},
{
"id": "db/uno@example.com/alias=uno/unodb",
"name": "unodb",
"parent_id": "web/uno@example.com/uno",
"status": "active",
"shard": "host2",
"original_shard": "host2",
"group": "uno",
"database": {
"db_user": "unodb",
"cleartext_password": "password"
}
},
{
"id": "domain/uno@example.com/example.com",
"name": "example.com",
"status": "active",
"shard": "host2",
"original_shard": "host2",
"group": "uno",
"website": {
"url": "https://example.com/",
"uid": 19475,
"accept_mail": true,
"quota_usage": 0,
"document_root": "/home/users/example.com/uno/html-example.com"
}
},
{
"id": "dav/uno@example.com/uno",
"name": "uno",
"status": "active",
"shard": "host2",
"original_shard": "host2",
"group": "uno",
"dav": {
"uid": 19475,
"homedir": "/home/users/example.com/uno"
}
},
{
"id": "email/uno@example.com/uno@example.com",
"name": "uno@example.com",
"status": "active",
"shard": "host2",
"original_shard": "host2",
"email": {
"maildir": "example.com/uno/",
"quota_limit": 0,
"quota_usage": 0
}
}
]
}
```
# API Reference
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment