wildduck/docs/api_data.js
2017-11-27 15:56:49 +02:00

1 line
66 KiB
JavaScript

define({ "api": [
{
"type": "delete",
"url": "/users/:user/filters/:filter",
"title": "Delete a Filter",
"name": "DeleteFilter",
"group": "Filters",
"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": "String",
"optional": false,
"field": "user",
"description": "<p>Users unique ID</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "filter",
"description": "<p>Filters unique ID</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\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 filter does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XDELETE http://localhost:8080/users/59fc66a03e54454869460e45/filters/5a1c0ee490a34c67e266931c",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/filters.js",
"groupTitle": "Filters"
},
{
"type": "get",
"url": "/users/:user/filters/:filter",
"title": "Request Filter information",
"name": "GetFilter",
"group": "Filters",
"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": "String",
"optional": false,
"field": "user",
"description": "<p>Users unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "filter",
"description": "<p>Filters 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>ID for the Filter</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "name",
"description": "<p>Name of the Filter</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "query_from",
"description": "<p>Partial match for the From: header (case insensitive)</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "query_to",
"description": "<p>Partial match for the To:/Cc: headers (case insensitive)</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "query_subject",
"description": "<p>Partial match for the Subject: header (case insensitive)</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "query_text",
"description": "<p>Fulltext search against message text</p>"
},
{
"group": "Success 200",
"type": "Bolean",
"optional": false,
"field": "query_ha",
"description": "<p>Does a message have to have an attachment or not</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "query_size",
"description": "<p>Message size in bytes. If the value is a positive number then message needs to be larger, if negative then message needs to be smaller than abs(size) value</p>"
},
{
"group": "Success 200",
"type": "Bolean",
"optional": false,
"field": "action_seen",
"description": "<p>If true then mark matching messages as Seen</p>"
},
{
"group": "Success 200",
"type": "Bolean",
"optional": false,
"field": "action_flag",
"description": "<p>If true then mark matching messages as Flagged</p>"
},
{
"group": "Success 200",
"type": "Bolean",
"optional": false,
"field": "action_delete",
"description": "<p>If true then do not store matching messages</p>"
},
{
"group": "Success 200",
"type": "Bolean",
"optional": false,
"field": "action_spam",
"description": "<p>If true then store matching messags to Junk Mail folder</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "action_mailbox",
"description": "<p>Mailbox ID to store matching messages to</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "action_forward",
"description": "<p>An email address where matching messages should be forwarded to</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "action_targetUrl",
"description": "<p>An URL where matching messages should be POSTed to</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"id\": \"5a1c0ee490a34c67e266931c\",\n \"created\": \"2017-11-27T13:11:00.835Z\",\n \"query_from\": \"Mäger\",\n \"action_seen\": true\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 filter does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i http://localhost:8080/users/59fc66a03e54454869460e45/filters/5a1c0ee490a34c67e266931c",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/filters.js",
"groupTitle": "Filters"
},
{
"type": "get",
"url": "/users/:user/filters",
"title": "List Filters for an User",
"name": "GetFilters",
"group": "Filters",
"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": "String",
"optional": false,
"field": "user",
"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": "Object[]",
"optional": false,
"field": "results",
"description": "<p>Filter description</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.id",
"description": "<p>Filter ID</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.name",
"description": "<p>Name for the filter</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.created",
"description": "<p>Datestring of the time the filter was created</p>"
},
{
"group": "Success 200",
"type": "Array[]",
"optional": false,
"field": "results.query",
"description": "<p>A list of query descriptions</p>"
},
{
"group": "Success 200",
"type": "Array[]",
"optional": false,
"field": "results.action",
"description": "<p>A list of action descriptions</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"results\": [\n {\n \"id\": \"5a1c0ee490a34c67e266931c\",\n \"query\": [\n [\n \"from\",\n \"(Mäger)\"\n ]\n ],\n \"action\": [\n [\n \"mark as read\"\n ]\n ],\n \"created\": \"2017-11-27T13:11:00.835Z\"\n }\n ]\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/5a1bda70bfbd1442cd96c6f0/filters",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/filters.js",
"groupTitle": "Filters"
},
{
"type": "post",
"url": "/users/:user/filters",
"title": "Create new Filter",
"name": "PostFilter",
"group": "Filters",
"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": "String",
"optional": false,
"field": "user",
"description": "<p>Users unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "name",
"description": "<p>Name of the Filter</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query_from",
"description": "<p>Partial match for the From: header (case insensitive)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query_to",
"description": "<p>Partial match for the To:/Cc: headers (case insensitive)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query_subject",
"description": "<p>Partial match for the Subject: header (case insensitive)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query_text",
"description": "<p>Fulltext search against message text</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "query_ha",
"description": "<p>Does a message have to have an attachment or not</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "query_size",
"description": "<p>Message size in bytes. If the value is a positive number then message needs to be larger, if negative then message needs to be smaller than abs(size) value</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "action_seen",
"description": "<p>If true then mark matching messages as Seen</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "action_flag",
"description": "<p>If true then mark matching messages as Flagged</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "action_delete",
"description": "<p>If true then do not store matching messages</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "action_spam",
"description": "<p>If true then store matching messags to Junk Mail folder</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "action_mailbox",
"description": "<p>Mailbox ID to store matching messages to</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "action_forward",
"description": "<p>An email address where matching messages should be forwarded to</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "action_targetUrl",
"description": "<p>An URL where matching messages should be POSTed to</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>ID for the created Filter</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"id\": \"5a1c0ee490a34c67e266931c\"\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\": \"Empty filter query\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XPOST http://localhost:8080/users/5a1bda70bfbd1442cd96c6f0/filters \\\n-H 'Content-type: application/json' \\\n-d '{\n \"query_from\": \"Mäger\",\n \"action_seen\": true\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/filters.js",
"groupTitle": "Filters"
},
{
"type": "put",
"url": "/users/:user/filters/:filter",
"title": "Update Filter information",
"name": "PutFilter",
"group": "Filters",
"description": "<p>This method updates Filter data. To unset a value, use empty strings</p>",
"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": "String",
"optional": false,
"field": "user",
"description": "<p>Users unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "filter",
"description": "<p>Filters unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "name",
"description": "<p>Name of the Filter</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query_from",
"description": "<p>Partial match for the From: header (case insensitive)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query_to",
"description": "<p>Partial match for the To:/Cc: headers (case insensitive)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query_subject",
"description": "<p>Partial match for the Subject: header (case insensitive)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query_text",
"description": "<p>Fulltext search against message text</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "query_ha",
"description": "<p>Does a message have to have an attachment or not</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "query_size",
"description": "<p>Message size in bytes. If the value is a positive number then message needs to be larger, if negative then message needs to be smaller than abs(size) value</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "action_seen",
"description": "<p>If true then mark matching messages as Seen</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "action_flag",
"description": "<p>If true then mark matching messages as Flagged</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "action_delete",
"description": "<p>If true then do not store matching messages</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "action_spam",
"description": "<p>If true then store matching messags to Junk Mail folder</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "action_mailbox",
"description": "<p>Mailbox ID to store matching messages to</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "action_forward",
"description": "<p>An email address where matching messages should be forwarded to</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "action_targetUrl",
"description": "<p>An URL where matching messages should be POSTed to</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>ID for the created Filter</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\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\": \"Empty filter query\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XPUT http://localhost:8080/users/59fc66a03e54454869460e45/filters/5a1c0ee490a34c67e266931c \\\n-H 'Content-type: application/json' \\\n-d '{\n \"action_seen\": \"\",\n \"action_flag\": true\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/filters.js",
"groupTitle": "Filters"
},
{
"type": "delete",
"url": "/users/:id",
"title": "Delete an User",
"name": "DeleteUser",
"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": "String",
"optional": false,
"field": "id",
"description": "<p>Users unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "sess",
"description": "<p>Session identifier for the logs</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "ip",
"description": "<p>IP address for the logs</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\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 -XDELETE http://localhost:8080/users/5a1bda70bfbd1442cd96c6f0?ip=127.0.0.1",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/users.js",
"groupTitle": "Users"
},
{
"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": "String",
"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"
},
{
"type": "get",
"url": "/users",
"title": "List registered Users",
"name": "GetUsers",
"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": "String",
"optional": true,
"field": "query",
"description": "<p>Partial match of username or default email address</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "tags",
"description": "<p>Comma separated list of tags. The User must have at least one to be set</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "requiredTags",
"description": "<p>Comma separated list of tags. The User must have all listed tags to be set</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "limit",
"defaultValue": "20",
"description": "<p>How many records to return</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "page",
"defaultValue": "1",
"description": "<p>Current page number. Informational only, page numbers start from 1</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "next",
"description": "<p>Cursor value for next page, retrieved from <code>nextCursor</code> response value</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "previous",
"description": "<p>Cursor value for previous page, retrieved from <code>previousCursor</code> response value</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "total",
"description": "<p>How many results were found</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "page",
"description": "<p>Current page number. Derived from <code>page</code> query argument</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "previousCursor",
"description": "<p>Either a cursor string or false if there are not any previous results</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "nextCursor",
"description": "<p>Either a cursor string or false if there are not any next results</p>"
},
{
"group": "Success 200",
"type": "Object[]",
"optional": false,
"field": "results",
"description": "<p>User listing</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.id",
"description": "<p>Users unique ID (24 byte hex)</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.username",
"description": "<p>Username of the User</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.name",
"description": "<p>Name of the User</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.address",
"description": "<p>Main email address of the User</p>"
},
{
"group": "Success 200",
"type": "String[]",
"optional": false,
"field": "results.tags",
"description": "<p>List of tags associated with the User'</p>"
},
{
"group": "Success 200",
"type": "String[]",
"optional": false,
"field": "results.forward",
"description": "<p>A list of email addresses to forward all incoming emails</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "results.encryptMessages",
"description": "<p>If <code>true</code> then received messages are encrypted</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "results.encryptForwarded",
"description": "<p>If <code>true</code> then forwarded messages are encrypted</p>"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "results.quota",
"description": "<p>Quota usage limits</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "results.quota.allowed",
"description": "<p>Allowed quota of the user in bytes</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "results.quota.used",
"description": "<p>Space used in bytes</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "results.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": "results.activated",
"description": "<p>Is the account activated</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "results.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 \"total\": 1,\n \"page\": 1,\n \"previousCursor\": false,\n \"nextCursor\": false,\n \"results\": [\n {\n \"id\": \"59cb948ad80a820b68f05230\",\n \"username\": \"myuser\",\n \"name\": \"John Doe\",\n \"address\": \"john@example.com\",\n \"tags\": [],\n \"forward\": [],\n \"encryptMessages\": false,\n \"encryptForwarded\": false,\n \"quota\": {\n \"allowed\": 1073741824,\n \"used\": 17799833\n },\n \"hasPasswordSet\": true,\n \"activated\": true,\n \"disabled\": false\n }\n ]\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\": \"Database error\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i http://localhost:8080/users",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/users.js",
"groupTitle": "Users"
},
{
"type": "post",
"url": "/users",
"title": "Create new user",
"name": "PostUser",
"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": "String",
"optional": false,
"field": "name",
"description": "<p>Username of the User</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "password",
"description": "<p>New password for the account</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "address",
"description": "<p>Default email address for the User (autogenerated if not set)</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "emptyAddress",
"description": "<p>If true then do not autogenerate missing email address for the User. Only needed if you want to create an user account that does not have any email address associated</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "retention",
"description": "<p>Default retention time in ms. Set to <code>0</code> to disable</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "encryptMessages",
"description": "<p>If <code>true</code> then received messages are encrypted</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "encryptForwarded",
"description": "<p>If <code>true</code> then forwarded messages are encrypted</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "pubKey",
"description": "<p>Public PGP key for the User that is used for encryption. Use empty string to remove the key</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "language",
"description": "<p>Language code for the User</p>"
},
{
"group": "Parameter",
"type": "String[]",
"optional": true,
"field": "forward",
"description": "<p>A list of email addresses to forward all incoming emails</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "targetUrl",
"description": "<p>An URL to post all incoming emails</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "quota",
"description": "<p>Allowed quota of the user in bytes</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "recipients",
"description": "<p>How many messages per 24 hour can be sent</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "forwards",
"description": "<p>How many messages per 24 hour can be forwarded</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "disabled",
"description": "<p>If true then disables user account (can not login, can not receive messages)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "sess",
"description": "<p>Session identifier for the logs</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "ip",
"description": "<p>IP address for the logs</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>ID for the created User</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"id\": \"5a1bda70bfbd1442cd96c6f0\"\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 username already exists\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XPOST http://localhost:8080/users \\\n-H 'Content-type: application/json' \\\n-d '{\n \"username\": \"myuser\",\n \"password\": \"verysecret\",\n \"name\": \"John Doe\"\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/users.js",
"groupTitle": "Users"
},
{
"type": "post",
"url": "/users/:id/quota/reset",
"title": "Recalculate User quota",
"name": "PostUserQuota",
"group": "Users",
"description": "<p>This method recalculates quota usage for an User. Normally not needed, only use it if quota numbers are way off. This method is not transactional, so if the user is currently receiving new messages then the resulting value is not exact.</p>",
"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": "String",
"optional": false,
"field": "id",
"description": "<p>Users unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "reason",
"description": "<p>Message to be shown to connected IMAP client</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "storageUsed",
"description": "<p>Calculated quota usage for the user</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"storageUsed\": 1234567\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 -XPOST http://localhost:8080/users/59fc66a03e54454869460e45/quota/reset \\\n-H 'Content-type: application/json' \\\n-d '{}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/users.js",
"groupTitle": "Users"
},
{
"type": "put",
"url": "/users/:id",
"title": "Update User information",
"name": "PutUser",
"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": "String",
"optional": false,
"field": "id",
"description": "<p>Users unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "name",
"description": "<p>Name of the User</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "existingPassword",
"description": "<p>If provided then validates against account password before applying any changes</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "password",
"description": "<p>New password for the account</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "retention",
"description": "<p>Default retention time in ms. Set to <code>0</code> to disable</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "encryptMessages",
"description": "<p>If <code>true</code> then received messages are encrypted</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "encryptForwarded",
"description": "<p>If <code>true</code> then forwarded messages are encrypted</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "pubKey",
"description": "<p>Public PGP key for the User that is used for encryption. Use empty string to remove the key</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "language",
"description": "<p>Language code for the User</p>"
},
{
"group": "Parameter",
"type": "String[]",
"optional": true,
"field": "forward",
"description": "<p>A list of email addresses to forward all incoming emails</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "targetUrl",
"description": "<p>An URL to post all incoming emails</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "quota",
"description": "<p>Allowed quota of the user in bytes</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "recipients",
"description": "<p>How many messages per 24 hour can be sent</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "forwards",
"description": "<p>How many messages per 24 hour can be forwarded</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "disabled",
"description": "<p>If true then disables user account (can not login, can not receive messages)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "sess",
"description": "<p>Session identifier for the logs</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "ip",
"description": "<p>IP address for the logs</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\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 -XPUT http://localhost:8080/users/59fc66a03e54454869460e45 \\\n-H 'Content-type: application/json' \\\n-d '{\n \"name\": \"Updated user name\"\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/users.js",
"groupTitle": "Users"
},
{
"type": "put",
"url": "/users/:id/logout",
"title": "Log out User",
"name": "PutUserLogout",
"group": "Users",
"description": "<p>This method logs out all user sessions in IMAP</p>",
"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": "String",
"optional": false,
"field": "id",
"description": "<p>Users unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "reason",
"description": "<p>Message to be shown to connected IMAP client</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\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 -XPUT http://localhost:8080/users/59fc66a03e54454869460e45/logout \\\n-H 'Content-type: application/json' \\\n-d '{\n \"reason\": \"Logout requested from API\"\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/users.js",
"groupTitle": "Users"
},
{
"type": "post",
"url": "/users/:id/password/reset",
"title": "Reset password for an User",
"name": "ResetUserPassword",
"group": "Users",
"description": "<p>This method generates a new temporary password for an User. Additionally it removes all two-factor authentication settings</p>",
"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": "String",
"optional": false,
"field": "id",
"description": "<p>Users unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "sess",
"description": "<p>Session identifier for the logs</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "ip",
"description": "<p>IP address for the logs</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": "password",
"description": "<p>Temporary password</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"password\": \"temporarypass\"\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 -XPOST http://localhost:8080/users/5a1bda70bfbd1442cd96/password/reset \\\n-H 'Content-type: application/json' \\\n-d '{\n \"ip\": \"127.0.0.1\"\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/users.js",
"groupTitle": "Users"
}
] });