mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-03-04 03:45:19 +08:00
1 line
10 KiB
JSON
1 line
10 KiB
JSON
[
|
|
{
|
|
"type": "get",
|
|
"url": "/users/:id",
|
|
"title": "Request User information",
|
|
"name": "GetUser",
|
|
"group": "Users",
|
|
"header": {
|
|
"fields": {
|
|
"Header": [
|
|
{
|
|
"group": "Header",
|
|
"type": "String",
|
|
"optional": false,
|
|
"field": "X-Access-Token",
|
|
"description": "<p>Optional access token if authentication is enabled</p>"
|
|
}
|
|
]
|
|
},
|
|
"examples": [
|
|
{
|
|
"title": "Header-Example:",
|
|
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
|
|
"type": "json"
|
|
}
|
|
]
|
|
},
|
|
"parameter": {
|
|
"fields": {
|
|
"Parameter": [
|
|
{
|
|
"group": "Parameter",
|
|
"type": "Number",
|
|
"optional": false,
|
|
"field": "id",
|
|
"description": "<p>Users unique ID.</p>"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"success": {
|
|
"fields": {
|
|
"Success 200": [
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Boolean",
|
|
"optional": false,
|
|
"field": "success",
|
|
"description": "<p>Indicates successful response</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "String",
|
|
"optional": false,
|
|
"field": "id",
|
|
"description": "<p>Users unique ID (24 byte hex)</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "String",
|
|
"optional": false,
|
|
"field": "username",
|
|
"description": "<p>Username of the User</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "String",
|
|
"optional": false,
|
|
"field": "name",
|
|
"description": "<p>Name of the User</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "String",
|
|
"optional": false,
|
|
"field": "address",
|
|
"description": "<p>Main email address of the User</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Number",
|
|
"optional": false,
|
|
"field": "retention",
|
|
"description": "<p>Default retention time in ms. <code>false</code> if not enabled</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "String[]",
|
|
"optional": false,
|
|
"field": "enabled2fa",
|
|
"description": "<p>List of enabled 2FA methods</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Boolean",
|
|
"optional": false,
|
|
"field": "encryptMessages",
|
|
"description": "<p>If <code>true</code> then received messages are encrypted</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Boolean",
|
|
"optional": false,
|
|
"field": "encryptForwarded",
|
|
"description": "<p>If <code>true</code> then forwarded messages are encrypted</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "String",
|
|
"optional": false,
|
|
"field": "pubKey",
|
|
"description": "<p>Public PGP key for the User that is used for encryption</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Object[]",
|
|
"optional": false,
|
|
"field": "keyInfo",
|
|
"description": "<p>Information about public key or <code>false</code> if key is not available</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "String",
|
|
"optional": false,
|
|
"field": "keyInfo.name",
|
|
"description": "<p>Name listed in public key</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "String",
|
|
"optional": false,
|
|
"field": "keyInfo.address",
|
|
"description": "<p>E-mail address listed in public key</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "String",
|
|
"optional": false,
|
|
"field": "keyInfo.fingerprint",
|
|
"description": "<p>Fingerprint of the public key</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "String[]",
|
|
"optional": false,
|
|
"field": "forward",
|
|
"description": "<p>A list of email addresses to forward all incoming emails</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "String[]",
|
|
"optional": false,
|
|
"field": "targetUrl",
|
|
"description": "<p>An URL to post all incoming emails</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Object[]",
|
|
"optional": false,
|
|
"field": "limits",
|
|
"description": "<p>Account limits and usage</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Object[]",
|
|
"optional": false,
|
|
"field": "limits.quota",
|
|
"description": "<p>Quota usage limits</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Number",
|
|
"optional": false,
|
|
"field": "limits.quota.allowed",
|
|
"description": "<p>Allowed quota of the user in bytes</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Number",
|
|
"optional": false,
|
|
"field": "limits.quota.used",
|
|
"description": "<p>Space used in bytes</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Object[]",
|
|
"optional": false,
|
|
"field": "limits.recipients",
|
|
"description": "<p>Sending quota</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Number",
|
|
"optional": false,
|
|
"field": "limits.recipients.allowed",
|
|
"description": "<p>How many messages per 24 hour can be sent</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Number",
|
|
"optional": false,
|
|
"field": "limits.recipients.used",
|
|
"description": "<p>How many messages are sent during current 24 hour period</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Number",
|
|
"optional": false,
|
|
"field": "limits.recipients.ttl",
|
|
"description": "<p>Time until the end of current 24 hour period</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Object[]",
|
|
"optional": false,
|
|
"field": "limits.forwards",
|
|
"description": "<p>Forwarding quota</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Number",
|
|
"optional": false,
|
|
"field": "limits.forwards.allowed",
|
|
"description": "<p>How many messages per 24 hour can be forwarded</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Number",
|
|
"optional": false,
|
|
"field": "limits.forwards.used",
|
|
"description": "<p>How many messages are forwarded during current 24 hour period</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Number",
|
|
"optional": false,
|
|
"field": "limits.forwards.ttl",
|
|
"description": "<p>Time until the end of current 24 hour period</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "String[]",
|
|
"optional": false,
|
|
"field": "tags",
|
|
"description": "<p>List of tags associated with the User</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Boolean",
|
|
"optional": false,
|
|
"field": "hasPasswordSet",
|
|
"description": "<p>If <code>true</code> then the User has a password set and can authenticate</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Boolean",
|
|
"optional": false,
|
|
"field": "activated",
|
|
"description": "<p>Is the account activated</p>"
|
|
},
|
|
{
|
|
"group": "Success 200",
|
|
"type": "Boolean",
|
|
"optional": false,
|
|
"field": "disabled",
|
|
"description": "<p>If <code>true</code> then the user can not authenticate or receive any new mail</p>"
|
|
}
|
|
]
|
|
},
|
|
"examples": [
|
|
{
|
|
"title": "Success-Response:",
|
|
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"id\": \"59fc66a03e54454869460e45\",\n \"username\": \"testuser01\",\n \"name\": null,\n \"address\": \"testuser01@example.com\",\n \"retention\": false,\n \"enabled2fa\": [],\n \"encryptMessages\": false,\n \"encryptForwarded\": false,\n \"pubKey\": \"\",\n \"keyInfo\": false,\n \"forward\": [],\n \"targetUrl\": \"\",\n \"limits\": {\n \"quota\": {\n \"allowed\": 107374182400,\n \"used\": 289838\n },\n \"recipients\": {\n \"allowed\": 2000,\n \"used\": 0,\n \"ttl\": false\n },\n \"forwards\": {\n \"allowed\": 2000,\n \"used\": 0,\n \"ttl\": false\n }\n },\n \"tags\": [\"green\", \"blue\"],\n \"hasPasswordSet\": true,\n \"activated\": true,\n \"disabled\": false\n}",
|
|
"type": "json"
|
|
}
|
|
]
|
|
},
|
|
"error": {
|
|
"fields": {
|
|
"Error 4xx": [
|
|
{
|
|
"group": "Error 4xx",
|
|
"optional": false,
|
|
"field": "error",
|
|
"description": "<p>Description of the error</p>"
|
|
}
|
|
]
|
|
},
|
|
"examples": [
|
|
{
|
|
"title": "Error-Response:",
|
|
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This user does not exist\"\n}",
|
|
"type": "json"
|
|
}
|
|
]
|
|
},
|
|
"examples": [
|
|
{
|
|
"title": "Example usage:",
|
|
"content": "curl -i http://localhost:8080/users/59fc66a03e54454869460e45",
|
|
"type": "curl"
|
|
}
|
|
],
|
|
"version": "0.0.0",
|
|
"filename": "lib/api/users.js",
|
|
"groupTitle": "Users"
|
|
}
|
|
]
|