function create_body_slot(ctx) {
let div0;
let div3;
let div1;
let t0;
let div2;
- let show_if_4;
+ let show_if_1;
let current_block_type_index;
let if_block1;
let t1;
@@ -15575,74 +18698,64 @@
let current_block_type_index_1;
let if_block2;
let t8;
- let show_if_3 = isAuth(/*environment*/ ctx[10], "basic");
- let t9;
- let show_if_2 = isAuth(/*environment*/ ctx[10], "apikey");
- let t10;
- let show_if_1 = isAuth(/*environment*/ ctx[10], "oauth2");
- let t11;
let div6;
let current_block_type_index_2;
- let if_block6;
- let t12;
+ let if_block3;
+ let t9;
let div7;
let show_if;
- let t13;
+ let t10;
let promise;
- let t14;
let current;
let dispose;
function select_block_type(ctx, dirty) {
- if (/*copying*/ ctx[9]) return create_if_block_11;
+ if (/*copying*/ ctx[10]) return create_if_block_7;
return create_else_block_4;
}
- let current_block_type = select_block_type(ctx, -1);
+ let current_block_type = select_block_type(ctx, [-1]);
let if_block0 = current_block_type(ctx);
- const if_block_creators = [create_if_block_10, create_else_block_3];
+ const if_block_creators = [create_if_block_6, create_else_block_3];
const if_blocks = [];
function select_block_type_1(ctx, dirty) {
- if (dirty[0] & /*environment, $auth, $env*/ 11264) show_if_4 = !!(isAuth(/*environment*/ ctx[10], "oauth2") && !/*$auth*/ ctx[13].includes(/*$env*/ ctx[11]));
- if (show_if_4) return 0;
+ if (dirty[0] & /*environment, $auth, $env*/ 22528) show_if_1 = !!(isAuth(/*environment*/ ctx[11], "oauth2") && !/*$auth*/ ctx[14].split(";").includes(/*$env*/ ctx[12]));
+ if (show_if_1) return 0;
return 1;
}
- current_block_type_index = select_block_type_1(ctx, -1);
+ current_block_type_index = select_block_type_1(ctx, [-1]);
if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
- const if_block_creators_1 = [create_if_block_9, create_else_block_2];
+ const if_block_creators_1 = [create_if_block_4, create_else_block_2];
const if_blocks_1 = [];
function select_block_type_2(ctx, dirty) {
- if (/*requestHeaders*/ ctx[0].length === 0 && !/*environment*/ ctx[10].auth) return 0;
+ if (/*requestHeaders*/ ctx[0].length === 0 && !/*environment*/ ctx[11].auth) return 0;
return 1;
}
- current_block_type_index_1 = select_block_type_2(ctx, -1);
+ current_block_type_index_1 = select_block_type_2(ctx, [-1]);
if_block2 = if_blocks_1[current_block_type_index_1] = if_block_creators_1[current_block_type_index_1](ctx);
- let if_block3 = show_if_3 && create_if_block_8(ctx);
- let if_block4 = show_if_2 && create_if_block_7(ctx);
- let if_block5 = show_if_1 && create_if_block_5(ctx);
- const if_block_creators_2 = [create_if_block_4, create_else_block_1$1];
+ const if_block_creators_2 = [create_if_block_3, create_else_block_1];
const if_blocks_2 = [];
function select_block_type_3(ctx, dirty) {
- if (/*requestParameters*/ ctx[1].length === 0) return 0;
+ if (/*requestParameters*/ ctx[2].length === 0) return 0;
return 1;
}
- current_block_type_index_2 = select_block_type_3(ctx, -1);
- if_block6 = if_blocks_2[current_block_type_index_2] = if_block_creators_2[current_block_type_index_2](ctx);
+ current_block_type_index_2 = select_block_type_3(ctx, [-1]);
+ if_block3 = if_blocks_2[current_block_type_index_2] = if_block_creators_2[current_block_type_index_2](ctx);
function select_block_type_4(ctx, dirty) {
- if (show_if == null || dirty[0] & /*currentAction*/ 32) show_if = !!allowBody(/*currentAction*/ ctx[5]);
- if (show_if) return create_if_block_3$2;
+ if (show_if == null || dirty[0] & /*currentAction*/ 64) show_if = !!allowBody(/*currentAction*/ ctx[6]);
+ if (show_if) return create_if_block_2$2;
return create_else_block$3;
}
- let current_block_type_1 = select_block_type_4(ctx, -1);
- let if_block7 = current_block_type_1(ctx);
+ let current_block_type_1 = select_block_type_4(ctx, [-1]);
+ let if_block4 = current_block_type_1(ctx);
let info = {
ctx,
@@ -15651,12 +18764,12 @@
pending: create_pending_block,
then: create_then_block,
catch: create_catch_block,
- value: 28,
+ value: 29,
+ error: 30,
blocks: [,,,]
};
- handle_promise(promise = /*response*/ ctx[6], info);
- let if_block8 = /*error*/ ctx[8] && create_if_block$a(ctx);
+ handle_promise(promise = /*response*/ ctx[8], info);
return {
c() {
@@ -15685,44 +18798,30 @@
div5 = element("div");
if_block2.c();
t8 = space();
- if (if_block3) if_block3.c();
- t9 = space();
- if (if_block4) if_block4.c();
- t10 = space();
- if (if_block5) if_block5.c();
- t11 = space();
div6 = element("div");
- if_block6.c();
- t12 = space();
+ if_block3.c();
+ t9 = space();
div7 = element("div");
- if_block7.c();
- t13 = space();
+ if_block4.c();
+ t10 = space();
info.block.c();
- t14 = space();
- if (if_block8) if_block8.c();
attr(div1, "class", "column");
attr(div2, "class", "column is-one-fifth");
attr(div3, "class", "columns");
attr(a0, "href", "javascript:void(0)");
- toggle_class(li0, "is-active", /*requestTab*/ ctx[7] === 0);
+ toggle_class(li0, "is-active", /*requestTab*/ ctx[9] === 0);
attr(a1, "href", "javascript:void(0)");
- toggle_class(li1, "is-active", /*requestTab*/ ctx[7] === 1);
+ toggle_class(li1, "is-active", /*requestTab*/ ctx[9] === 1);
attr(a2, "href", "javascript:void(0)");
- toggle_class(li2, "is-active", /*requestTab*/ ctx[7] === 2);
+ toggle_class(li2, "is-active", /*requestTab*/ ctx[9] === 2);
attr(div4, "class", "tabs is-boxed");
attr(div5, "class", "section-headers");
- toggle_class(div5, "is-hidden", /*requestTab*/ ctx[7] != 0);
+ toggle_class(div5, "is-hidden", /*requestTab*/ ctx[9] != 0);
attr(div6, "class", "section-parameters");
- toggle_class(div6, "is-hidden", /*requestTab*/ ctx[7] != 1);
+ toggle_class(div6, "is-hidden", /*requestTab*/ ctx[9] != 1);
attr(div7, "class", "section-body");
- toggle_class(div7, "is-hidden", /*requestTab*/ ctx[7] != 2);
+ toggle_class(div7, "is-hidden", /*requestTab*/ ctx[9] != 2);
attr(div0, "slot", "body");
-
- dispose = [
- listen(a0, "click", /*click_handler*/ ctx[20]),
- listen(a1, "click", /*click_handler_1*/ ctx[21]),
- listen(a2, "click", /*click_handler_2*/ ctx[22])
- ];
},
m(target, anchor) {
insert(target, div0, anchor);
@@ -15746,25 +18845,23 @@
append(div0, t7);
append(div0, div5);
if_blocks_1[current_block_type_index_1].m(div5, null);
- append(div5, t8);
- if (if_block3) if_block3.m(div5, null);
- append(div5, t9);
- if (if_block4) if_block4.m(div5, null);
- append(div5, t10);
- if (if_block5) if_block5.m(div5, null);
- append(div0, t11);
+ append(div0, t8);
append(div0, div6);
if_blocks_2[current_block_type_index_2].m(div6, null);
- append(div0, t12);
+ append(div0, t9);
append(div0, div7);
- if_block7.m(div7, null);
- append(div0, t13);
+ if_block4.m(div7, null);
+ append(div0, t10);
info.block.m(div0, info.anchor = null);
info.mount = () => div0;
- info.anchor = t14;
- append(div0, t14);
- if (if_block8) if_block8.m(div0, null);
+ info.anchor = null;
current = true;
+
+ dispose = [
+ listen(a0, "click", /*click_handler*/ ctx[20]),
+ listen(a1, "click", /*click_handler_1*/ ctx[21]),
+ listen(a2, "click", /*click_handler_2*/ ctx[22])
+ ];
},
p(new_ctx, dirty) {
ctx = new_ctx;
@@ -15805,16 +18902,16 @@
if_block1.m(div2, null);
}
- if (dirty[0] & /*requestTab*/ 128) {
- toggle_class(li0, "is-active", /*requestTab*/ ctx[7] === 0);
+ if (dirty[0] & /*requestTab*/ 512) {
+ toggle_class(li0, "is-active", /*requestTab*/ ctx[9] === 0);
}
- if (dirty[0] & /*requestTab*/ 128) {
- toggle_class(li1, "is-active", /*requestTab*/ ctx[7] === 1);
+ if (dirty[0] & /*requestTab*/ 512) {
+ toggle_class(li1, "is-active", /*requestTab*/ ctx[9] === 1);
}
- if (dirty[0] & /*requestTab*/ 128) {
- toggle_class(li2, "is-active", /*requestTab*/ ctx[7] === 2);
+ if (dirty[0] & /*requestTab*/ 512) {
+ toggle_class(li2, "is-active", /*requestTab*/ ctx[9] === 2);
}
let previous_block_index_1 = current_block_type_index_1;
@@ -15838,77 +18935,11 @@
}
transition_in(if_block2, 1);
- if_block2.m(div5, t8);
+ if_block2.m(div5, null);
}
- if (dirty[0] & /*environment*/ 1024) show_if_3 = isAuth(/*environment*/ ctx[10], "basic");
-
- if (show_if_3) {
- if (if_block3) {
- if_block3.p(ctx, dirty);
- transition_in(if_block3, 1);
- } else {
- if_block3 = create_if_block_8(ctx);
- if_block3.c();
- transition_in(if_block3, 1);
- if_block3.m(div5, t9);
- }
- } else if (if_block3) {
- group_outros();
-
- transition_out(if_block3, 1, 1, () => {
- if_block3 = null;
- });
-
- check_outros();
- }
-
- if (dirty[0] & /*environment*/ 1024) show_if_2 = isAuth(/*environment*/ ctx[10], "apikey");
-
- if (show_if_2) {
- if (if_block4) {
- if_block4.p(ctx, dirty);
- transition_in(if_block4, 1);
- } else {
- if_block4 = create_if_block_7(ctx);
- if_block4.c();
- transition_in(if_block4, 1);
- if_block4.m(div5, t10);
- }
- } else if (if_block4) {
- group_outros();
-
- transition_out(if_block4, 1, 1, () => {
- if_block4 = null;
- });
-
- check_outros();
- }
-
- if (dirty[0] & /*environment*/ 1024) show_if_1 = isAuth(/*environment*/ ctx[10], "oauth2");
-
- if (show_if_1) {
- if (if_block5) {
- if_block5.p(ctx, dirty);
- transition_in(if_block5, 1);
- } else {
- if_block5 = create_if_block_5(ctx);
- if_block5.c();
- transition_in(if_block5, 1);
- if_block5.m(div5, null);
- }
- } else if (if_block5) {
- group_outros();
-
- transition_out(if_block5, 1, 1, () => {
- if_block5 = null;
- });
-
- check_outros();
- }
-
- if (dirty[0] & /*requestTab*/ 128) {
- toggle_class(div5, "is-hidden", /*requestTab*/ ctx[7] != 0);
+ if (dirty[0] & /*requestTab*/ 512) {
+ toggle_class(div5, "is-hidden", /*requestTab*/ ctx[9] != 0);
}
let previous_block_index_2 = current_block_type_index_2;
@@ -15924,68 +18955,52 @@
});
check_outros();
- if_block6 = if_blocks_2[current_block_type_index_2];
+ if_block3 = if_blocks_2[current_block_type_index_2];
- if (!if_block6) {
- if_block6 = if_blocks_2[current_block_type_index_2] = if_block_creators_2[current_block_type_index_2](ctx);
- if_block6.c();
+ if (!if_block3) {
+ if_block3 = if_blocks_2[current_block_type_index_2] = if_block_creators_2[current_block_type_index_2](ctx);
+ if_block3.c();
}
- transition_in(if_block6, 1);
- if_block6.m(div6, null);
+ transition_in(if_block3, 1);
+ if_block3.m(div6, null);
}
- if (dirty[0] & /*requestTab*/ 128) {
- toggle_class(div6, "is-hidden", /*requestTab*/ ctx[7] != 1);
+ if (dirty[0] & /*requestTab*/ 512) {
+ toggle_class(div6, "is-hidden", /*requestTab*/ ctx[9] != 1);
}
- if (current_block_type_1 === (current_block_type_1 = select_block_type_4(ctx, dirty)) && if_block7) {
- if_block7.p(ctx, dirty);
+ if (current_block_type_1 === (current_block_type_1 = select_block_type_4(ctx, dirty)) && if_block4) {
+ if_block4.p(ctx, dirty);
} else {
- if_block7.d(1);
- if_block7 = current_block_type_1(ctx);
+ if_block4.d(1);
+ if_block4 = current_block_type_1(ctx);
- if (if_block7) {
- if_block7.c();
- if_block7.m(div7, null);
+ if (if_block4) {
+ if_block4.c();
+ if_block4.m(div7, null);
}
}
- if (dirty[0] & /*requestTab*/ 128) {
- toggle_class(div7, "is-hidden", /*requestTab*/ ctx[7] != 2);
+ if (dirty[0] & /*requestTab*/ 512) {
+ toggle_class(div7, "is-hidden", /*requestTab*/ ctx[9] != 2);
}
info.ctx = ctx;
- if (dirty[0] & /*response*/ 64 && promise !== (promise = /*response*/ ctx[6]) && handle_promise(promise, info)) {
+ if (dirty[0] & /*response*/ 256 && promise !== (promise = /*response*/ ctx[8]) && handle_promise(promise, info)) {
} else {
const child_ctx = ctx.slice();
- child_ctx[28] = info.resolved;
+ child_ctx[29] = info.resolved;
info.block.p(child_ctx, dirty);
}
-
- if (/*error*/ ctx[8]) {
- if (if_block8) {
- if_block8.p(ctx, dirty);
- } else {
- if_block8 = create_if_block$a(ctx);
- if_block8.c();
- if_block8.m(div0, null);
- }
- } else if (if_block8) {
- if_block8.d(1);
- if_block8 = null;
- }
},
i(local) {
if (current) return;
transition_in(if_block1);
transition_in(if_block2);
transition_in(if_block3);
- transition_in(if_block4);
- transition_in(if_block5);
- transition_in(if_block6);
transition_in(info.block);
current = true;
},
@@ -15993,9 +19008,6 @@
transition_out(if_block1);
transition_out(if_block2);
transition_out(if_block3);
- transition_out(if_block4);
- transition_out(if_block5);
- transition_out(if_block6);
for (let i = 0; i < 3; i += 1) {
const block = info.blocks[i];
@@ -16009,21 +19021,17 @@
if_block0.d();
if_blocks[current_block_type_index].d();
if_blocks_1[current_block_type_index_1].d();
- if (if_block3) if_block3.d();
- if (if_block4) if_block4.d();
- if (if_block5) if_block5.d();
if_blocks_2[current_block_type_index_2].d();
- if_block7.d();
+ if_block4.d();
info.block.d();
info.token = null;
info = null;
- if (if_block8) if_block8.d();
run_all(dispose);
}
};
}
- // (125:0)
+ // (118:0)
function create_default_slot(ctx) {
let t;
let current;
@@ -16044,14 +19052,14 @@
};
}
- function create_fragment$g(ctx) {
+ function create_fragment$c(ctx) {
let current;
const collapsiblepanel = new CollapsiblePanel({
props: {
dark: true,
- isDarkmode: /*isDarkmode*/ ctx[4],
- show: /*show*/ ctx[3],
+ isDarkmode: /*isDarkmode*/ ctx[5],
+ show: /*show*/ ctx[4],
$$slots: {
default: [create_default_slot],
body: [create_body_slot],
@@ -16071,10 +19079,10 @@
},
p(ctx, dirty) {
const collapsiblepanel_changes = {};
- if (dirty[0] & /*isDarkmode*/ 16) collapsiblepanel_changes.isDarkmode = /*isDarkmode*/ ctx[4];
- if (dirty[0] & /*show*/ 8) collapsiblepanel_changes.show = /*show*/ ctx[3];
+ if (dirty[0] & /*isDarkmode*/ 32) collapsiblepanel_changes.isDarkmode = /*isDarkmode*/ ctx[5];
+ if (dirty[0] & /*show*/ 16) collapsiblepanel_changes.show = /*show*/ ctx[4];
- if (dirty[0] & /*error, response, requestTab, currentAction, requestBody, requestParameters, environment, $auth, $env, $token, requestHeaders, copying, currentUrl*/ 32743 | dirty[1] & /*$$scope*/ 256) {
+ if (dirty[0] & /*response, requestTab, requestBody, currentAction, requestParameters, requestHeaders, environment, requestAuthHeader, pkceChallenge, $auth, $env, copying, currentUrl*/ 32719 | dirty[1] & /*$$scope*/ 1024) {
collapsiblepanel_changes.$$scope = { dirty, ctx };
}
@@ -16099,58 +19107,48 @@
return headers && headers["content-type"];
}
- function basicAuth(username, password) {
+ function basicAuth$1(username, password) {
return btoa(`${username}:${password}`);
}
- function instance$g($$self, $$props, $$invalidate) {
+ function instance$c($$self, $$props, $$invalidate) {
let $env;
+ let $router;
let $auth;
- let $token;
- component_subscribe($$self, env, $$value => $$invalidate(11, $env = $$value));
- component_subscribe($$self, auth, $$value => $$invalidate(13, $auth = $$value));
- component_subscribe($$self, token, $$value => $$invalidate(14, $token = $$value));
+ component_subscribe($$self, env, $$value => $$invalidate(12, $env = $$value));
+ component_subscribe($$self, router, $$value => $$invalidate(19, $router = $$value));
+ component_subscribe($$self, auth, $$value => $$invalidate(14, $auth = $$value));
let { show = true } = $$props;
let { isDarkmode } = $$props;
let { environments } = $$props;
let { currentAction } = $$props;
- let { currentSample } = $$props;
let { requestHeaders } = $$props;
+ let { requestAuthHeader } = $$props;
let { requestParameters } = $$props;
let { requestBody } = $$props;
- let response = {};
+ let { pkceChallenge } = $$props;
+ let response;
let requestTab = 0;
- let error;
let copying = false;
- afterUpdate(() => {
- $$invalidate(6, response = {});
- });
-
function handleClick() {
- $$invalidate(8, error = undefined);
-
- $$invalidate(6, response = sendRequest($env, environment, currentAction, {
- headers: requestHeaders,
+ $$invalidate(8, response = sendRequest($env, environment, currentAction, {
+ headers: requestHeaders.concat(requestAuthHeader),
parameters: requestParameters,
body: requestBody
- }).catch(function (err) {
- $$invalidate(8, error = err);
- return Promise.reject(err);
}));
}
function handleTab(index) {
- $$invalidate(8, error = undefined);
- $$invalidate(7, requestTab = index);
+ $$invalidate(9, requestTab = index);
}
function handleCopy() {
- $$invalidate(9, copying = true);
+ $$invalidate(10, copying = true);
setTimeout(
() => {
- $$invalidate(9, copying = false);
+ $$invalidate(10, copying = false);
},
2000
);
@@ -16167,84 +19165,89 @@
$$invalidate(0, requestHeaders);
}
- function fieldswitch_value_binding(value_1, header) {
- header.value = value_1;
+ function fieldswitch_value_binding(value, header) {
+ header.value = value;
$$invalidate(0, requestHeaders);
}
+ function fieldswitch_value_binding_1(value) {
+ requestAuthHeader.value = value;
+ $$invalidate(1, requestAuthHeader);
+ }
+
function fieldswitch_used_binding_1(value, param) {
param.used = value;
- $$invalidate(1, requestParameters);
+ $$invalidate(2, requestParameters);
}
- function fieldswitch_value_binding_1(value_1, param) {
- param.value = value_1;
- $$invalidate(1, requestParameters);
+ function fieldswitch_value_binding_2(value, param) {
+ param.value = value;
+ $$invalidate(2, requestParameters);
}
function textarea_input_handler() {
requestBody = this.value;
- $$invalidate(2, requestBody);
+ $$invalidate(3, requestBody);
}
$$self.$set = $$props => {
- if ("show" in $$props) $$invalidate(3, show = $$props.show);
- if ("isDarkmode" in $$props) $$invalidate(4, isDarkmode = $$props.isDarkmode);
+ if ("show" in $$props) $$invalidate(4, show = $$props.show);
+ if ("isDarkmode" in $$props) $$invalidate(5, isDarkmode = $$props.isDarkmode);
if ("environments" in $$props) $$invalidate(18, environments = $$props.environments);
- if ("currentAction" in $$props) $$invalidate(5, currentAction = $$props.currentAction);
- if ("currentSample" in $$props) $$invalidate(19, currentSample = $$props.currentSample);
+ if ("currentAction" in $$props) $$invalidate(6, currentAction = $$props.currentAction);
if ("requestHeaders" in $$props) $$invalidate(0, requestHeaders = $$props.requestHeaders);
- if ("requestParameters" in $$props) $$invalidate(1, requestParameters = $$props.requestParameters);
- if ("requestBody" in $$props) $$invalidate(2, requestBody = $$props.requestBody);
+ if ("requestAuthHeader" in $$props) $$invalidate(1, requestAuthHeader = $$props.requestAuthHeader);
+ if ("requestParameters" in $$props) $$invalidate(2, requestParameters = $$props.requestParameters);
+ if ("requestBody" in $$props) $$invalidate(3, requestBody = $$props.requestBody);
+ if ("pkceChallenge" in $$props) $$invalidate(7, pkceChallenge = $$props.pkceChallenge);
};
let environment;
let currentUrl;
$$self.$$.update = () => {
- if ($$self.$$.dirty[0] & /*environments, $env*/ 264192) {
- $$invalidate(10, environment = environments[$env]);
+ if ($$self.$$.dirty[0] & /*environments, $env*/ 266240) {
+ $$invalidate(11, environment = environments[$env]);
}
- if ($$self.$$.dirty[0] & /*environment, currentAction*/ 1056) {
- $$invalidate(12, currentUrl = urlParse(urlJoin(environment.url, currentAction.path)));
+ if ($$self.$$.dirty[0] & /*environment, currentAction*/ 2112) {
+ $$invalidate(13, currentUrl = urlParse(urlJoin(environment.url, currentAction.path)));
}
- if ($$self.$$.dirty[0] & /*currentUrl*/ 4096) {
- {
- $$invalidate(8, error = currentUrl && undefined);
- }
+ if ($$self.$$.dirty[0] & /*$router*/ 524288) {
+ $$invalidate(8, response = $router && undefined);
}
};
return [
requestHeaders,
+ requestAuthHeader,
requestParameters,
requestBody,
show,
isDarkmode,
currentAction,
+ pkceChallenge,
response,
requestTab,
- error,
copying,
environment,
$env,
currentUrl,
$auth,
- $token,
handleClick,
handleTab,
handleCopy,
environments,
- currentSample,
+ $router,
click_handler,
click_handler_1,
click_handler_2,
fieldswitch_used_binding,
fieldswitch_value_binding,
- fieldswitch_used_binding_1,
fieldswitch_value_binding_1,
+ fieldswitch_used_binding_1,
+ fieldswitch_value_binding_2,
textarea_input_handler
];
}
@@ -16252,37 +19255,1043 @@
class PlaygroundPanel extends SvelteComponent {
constructor(options) {
super();
- if (!document.getElementById("svelte-c3oocm-style")) add_css$8();
+ if (!document.getElementById("svelte-c3oocm-style")) add_css$6();
init(
this,
options,
- instance$g,
- create_fragment$g,
+ instance$c,
+ create_fragment$c,
safe_not_equal,
{
- show: 3,
- isDarkmode: 4,
+ show: 4,
+ isDarkmode: 5,
environments: 18,
- currentAction: 5,
- currentSample: 19,
+ currentAction: 6,
requestHeaders: 0,
- requestParameters: 1,
- requestBody: 2
+ requestAuthHeader: 1,
+ requestParameters: 2,
+ requestBody: 3,
+ pkceChallenge: 7
},
[-1, -1]
);
}
}
- /* usr/local/lib/node_modules/snowboard/templates/winter/panels/ScenarioPanel.svelte generated by Svelte v3.16.5 */
+ /* usr/local/lib/node_modules/snowboard/templates/winter/tables/HeaderTable.svelte generated by Svelte v3.19.2 */
+
+ function get_each_context$2(ctx, list, i) {
+ const child_ctx = ctx.slice();
+ child_ctx[1] = list[i].name;
+ child_ctx[2] = list[i].example;
+ return child_ctx;
+ }
+
+ // (5:0) {#if headers.length > 0}
+ function create_if_block$7(ctx) {
+ let table;
+ let thead;
+ let t1;
+ let tbody;
+ let each_value = /*headers*/ ctx[0];
+ let each_blocks = [];
+
+ for (let i = 0; i < each_value.length; i += 1) {
+ each_blocks[i] = create_each_block$2(get_each_context$2(ctx, each_value, i));
+ }
+
+ return {
+ c() {
+ table = element("table");
+ thead = element("thead");
+ thead.innerHTML = `Headers |
`;
+ t1 = space();
+ tbody = element("tbody");
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].c();
+ }
+
+ attr(table, "class", "table is-stripped is-fullwidth");
+ },
+ m(target, anchor) {
+ insert(target, table, anchor);
+ append(table, thead);
+ append(table, t1);
+ append(table, tbody);
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].m(tbody, null);
+ }
+ },
+ p(ctx, dirty) {
+ if (dirty & /*headers*/ 1) {
+ each_value = /*headers*/ ctx[0];
+ let i;
+
+ for (i = 0; i < each_value.length; i += 1) {
+ const child_ctx = get_each_context$2(ctx, each_value, i);
+
+ if (each_blocks[i]) {
+ each_blocks[i].p(child_ctx, dirty);
+ } else {
+ each_blocks[i] = create_each_block$2(child_ctx);
+ each_blocks[i].c();
+ each_blocks[i].m(tbody, null);
+ }
+ }
+
+ for (; i < each_blocks.length; i += 1) {
+ each_blocks[i].d(1);
+ }
+
+ each_blocks.length = each_value.length;
+ }
+ },
+ d(detaching) {
+ if (detaching) detach(table);
+ destroy_each(each_blocks, detaching);
+ }
+ };
+ }
+
+ // (13:6) {#each headers as { name, example }}
+ function create_each_block$2(ctx) {
+ let tr;
+ let td0;
+ let t0_value = /*name*/ ctx[1] + "";
+ let t0;
+ let t1;
+ let td1;
+ let code;
+ let t2_value = /*example*/ ctx[2] + "";
+ let t2;
+ let t3;
+
+ return {
+ c() {
+ tr = element("tr");
+ td0 = element("td");
+ t0 = text(t0_value);
+ t1 = space();
+ td1 = element("td");
+ code = element("code");
+ t2 = text(t2_value);
+ t3 = space();
+ },
+ m(target, anchor) {
+ insert(target, tr, anchor);
+ append(tr, td0);
+ append(td0, t0);
+ append(tr, t1);
+ append(tr, td1);
+ append(td1, code);
+ append(code, t2);
+ append(tr, t3);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*headers*/ 1 && t0_value !== (t0_value = /*name*/ ctx[1] + "")) set_data(t0, t0_value);
+ if (dirty & /*headers*/ 1 && t2_value !== (t2_value = /*example*/ ctx[2] + "")) set_data(t2, t2_value);
+ },
+ d(detaching) {
+ if (detaching) detach(tr);
+ }
+ };
+ }
+
+ function create_fragment$d(ctx) {
+ let if_block_anchor;
+ let if_block = /*headers*/ ctx[0].length > 0 && create_if_block$7(ctx);
+
+ return {
+ c() {
+ if (if_block) if_block.c();
+ if_block_anchor = empty();
+ },
+ m(target, anchor) {
+ if (if_block) if_block.m(target, anchor);
+ insert(target, if_block_anchor, anchor);
+ },
+ p(ctx, [dirty]) {
+ if (/*headers*/ ctx[0].length > 0) {
+ if (if_block) {
+ if_block.p(ctx, dirty);
+ } else {
+ if_block = create_if_block$7(ctx);
+ if_block.c();
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
+ }
+ } else if (if_block) {
+ if_block.d(1);
+ if_block = null;
+ }
+ },
+ i: noop,
+ o: noop,
+ d(detaching) {
+ if (if_block) if_block.d(detaching);
+ if (detaching) detach(if_block_anchor);
+ }
+ };
+ }
+
+ function instance$d($$self, $$props, $$invalidate) {
+ let { headers = [] } = $$props;
+
+ $$self.$set = $$props => {
+ if ("headers" in $$props) $$invalidate(0, headers = $$props.headers);
+ };
+
+ return [headers];
+ }
+
+ class HeaderTable extends SvelteComponent {
+ constructor(options) {
+ super();
+ init(this, options, instance$d, create_fragment$d, safe_not_equal, { headers: 0 });
+ }
+ }
+
+ /* usr/local/lib/node_modules/snowboard/templates/winter/panels/CodePanel.svelte generated by Svelte v3.19.2 */
+
+ function add_css$7() {
+ var style = element("style");
+ style.id = "svelte-15v28ah-style";
+ style.textContent = ".tab-content.svelte-15v28ah{display:none}.tab-content.is-active.svelte-15v28ah{display:block}";
+ append(document.head, style);
+ }
+
+ // (32:0) {#if example || schema}
+ function create_if_block$8(ctx) {
+ let div2;
+ let div0;
+ let ul;
+ let li;
+ let a;
+ let t1;
+ let t2;
+ let div1;
+ let section;
+ let section_class_value;
+ let t3;
+ let current;
+ let dispose;
+ let if_block0 = /*schema*/ ctx[2] && create_if_block_2$3(ctx);
+
+ const codeblock = new CodeBlock({
+ props: {
+ type: /*contentType*/ ctx[0],
+ body: /*example*/ ctx[1]
+ }
+ });
+
+ let if_block1 = /*schema*/ ctx[2] && create_if_block_1$5(ctx);
+
+ return {
+ c() {
+ div2 = element("div");
+ div0 = element("div");
+ ul = element("ul");
+ li = element("li");
+ a = element("a");
+ a.textContent = "Body";
+ t1 = space();
+ if (if_block0) if_block0.c();
+ t2 = space();
+ div1 = element("div");
+ section = element("section");
+ create_component(codeblock.$$.fragment);
+ t3 = space();
+ if (if_block1) if_block1.c();
+ attr(a, "data-index", "0");
+ attr(a, "href", "javascript:void(0)");
+ toggle_class(li, "is-active", /*tabIndex*/ ctx[7] === 0);
+ attr(div0, "class", "tabs is-fullwidth");
+ toggle_class(div0, "is-toggle", /*asToggle*/ ctx[3]);
+ attr(section, "class", section_class_value = "tab-content " + /*activeBody*/ ctx[5] + " svelte-15v28ah");
+ attr(div2, "class", "tabs-with-content");
+ },
+ m(target, anchor) {
+ insert(target, div2, anchor);
+ append(div2, div0);
+ append(div0, ul);
+ append(ul, li);
+ append(li, a);
+ append(ul, t1);
+ if (if_block0) if_block0.m(ul, null);
+ append(div2, t2);
+ append(div2, div1);
+ append(div1, section);
+ mount_component(codeblock, section, null);
+ append(div1, t3);
+ if (if_block1) if_block1.m(div1, null);
+ current = true;
+ dispose = listen(a, "click", /*tabSelect*/ ctx[4]);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*tabIndex*/ 128) {
+ toggle_class(li, "is-active", /*tabIndex*/ ctx[7] === 0);
+ }
+
+ if (/*schema*/ ctx[2]) {
+ if (if_block0) {
+ if_block0.p(ctx, dirty);
+ } else {
+ if_block0 = create_if_block_2$3(ctx);
+ if_block0.c();
+ if_block0.m(ul, null);
+ }
+ } else if (if_block0) {
+ if_block0.d(1);
+ if_block0 = null;
+ }
+
+ if (dirty & /*asToggle*/ 8) {
+ toggle_class(div0, "is-toggle", /*asToggle*/ ctx[3]);
+ }
+
+ const codeblock_changes = {};
+ if (dirty & /*contentType*/ 1) codeblock_changes.type = /*contentType*/ ctx[0];
+ if (dirty & /*example*/ 2) codeblock_changes.body = /*example*/ ctx[1];
+ codeblock.$set(codeblock_changes);
+
+ if (!current || dirty & /*activeBody*/ 32 && section_class_value !== (section_class_value = "tab-content " + /*activeBody*/ ctx[5] + " svelte-15v28ah")) {
+ attr(section, "class", section_class_value);
+ }
+
+ if (/*schema*/ ctx[2]) {
+ if (if_block1) {
+ if_block1.p(ctx, dirty);
+ transition_in(if_block1, 1);
+ } else {
+ if_block1 = create_if_block_1$5(ctx);
+ if_block1.c();
+ transition_in(if_block1, 1);
+ if_block1.m(div1, null);
+ }
+ } else if (if_block1) {
+ group_outros();
+
+ transition_out(if_block1, 1, 1, () => {
+ if_block1 = null;
+ });
+
+ check_outros();
+ }
+ },
+ i(local) {
+ if (current) return;
+ transition_in(codeblock.$$.fragment, local);
+ transition_in(if_block1);
+ current = true;
+ },
+ o(local) {
+ transition_out(codeblock.$$.fragment, local);
+ transition_out(if_block1);
+ current = false;
+ },
+ d(detaching) {
+ if (detaching) detach(div2);
+ if (if_block0) if_block0.d();
+ destroy_component(codeblock);
+ if (if_block1) if_block1.d();
+ dispose();
+ }
+ };
+ }
+
+ // (42:8) {#if schema}
+ function create_if_block_2$3(ctx) {
+ let li;
+ let a;
+ let dispose;
+
+ return {
+ c() {
+ li = element("li");
+ a = element("a");
+ a.textContent = "Schema";
+ attr(a, "data-index", "1");
+ attr(a, "href", "javascript:void(0)");
+ toggle_class(li, "is-active", /*tabIndex*/ ctx[7] === 1);
+ },
+ m(target, anchor) {
+ insert(target, li, anchor);
+ append(li, a);
+ dispose = listen(a, "click", /*tabSelect*/ ctx[4]);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*tabIndex*/ 128) {
+ toggle_class(li, "is-active", /*tabIndex*/ ctx[7] === 1);
+ }
+ },
+ d(detaching) {
+ if (detaching) detach(li);
+ dispose();
+ }
+ };
+ }
+
+ // (55:6) {#if schema}
+ function create_if_block_1$5(ctx) {
+ let section;
+ let section_class_value;
+ let current;
+
+ const codeblock = new CodeBlock({
+ props: {
+ type: "application/json",
+ body: /*schema*/ ctx[2]
+ }
+ });
+
+ return {
+ c() {
+ section = element("section");
+ create_component(codeblock.$$.fragment);
+ attr(section, "class", section_class_value = "tab-content " + /*activeSchema*/ ctx[6] + " svelte-15v28ah");
+ },
+ m(target, anchor) {
+ insert(target, section, anchor);
+ mount_component(codeblock, section, null);
+ current = true;
+ },
+ p(ctx, dirty) {
+ const codeblock_changes = {};
+ if (dirty & /*schema*/ 4) codeblock_changes.body = /*schema*/ ctx[2];
+ codeblock.$set(codeblock_changes);
+
+ if (!current || dirty & /*activeSchema*/ 64 && section_class_value !== (section_class_value = "tab-content " + /*activeSchema*/ ctx[6] + " svelte-15v28ah")) {
+ attr(section, "class", section_class_value);
+ }
+ },
+ i(local) {
+ if (current) return;
+ transition_in(codeblock.$$.fragment, local);
+ current = true;
+ },
+ o(local) {
+ transition_out(codeblock.$$.fragment, local);
+ current = false;
+ },
+ d(detaching) {
+ if (detaching) detach(section);
+ destroy_component(codeblock);
+ }
+ };
+ }
+
+ function create_fragment$e(ctx) {
+ let if_block_anchor;
+ let current;
+ let if_block = (/*example*/ ctx[1] || /*schema*/ ctx[2]) && create_if_block$8(ctx);
+
+ return {
+ c() {
+ if (if_block) if_block.c();
+ if_block_anchor = empty();
+ },
+ m(target, anchor) {
+ if (if_block) if_block.m(target, anchor);
+ insert(target, if_block_anchor, anchor);
+ current = true;
+ },
+ p(ctx, [dirty]) {
+ if (/*example*/ ctx[1] || /*schema*/ ctx[2]) {
+ if (if_block) {
+ if_block.p(ctx, dirty);
+ transition_in(if_block, 1);
+ } else {
+ if_block = create_if_block$8(ctx);
+ if_block.c();
+ transition_in(if_block, 1);
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
+ }
+ } else if (if_block) {
+ group_outros();
+
+ transition_out(if_block, 1, 1, () => {
+ if_block = null;
+ });
+
+ check_outros();
+ }
+ },
+ i(local) {
+ if (current) return;
+ transition_in(if_block);
+ current = true;
+ },
+ o(local) {
+ transition_out(if_block);
+ current = false;
+ },
+ d(detaching) {
+ if (if_block) if_block.d(detaching);
+ if (detaching) detach(if_block_anchor);
+ }
+ };
+ }
+
+ function instance$e($$self, $$props, $$invalidate) {
+ let { contentType } = $$props;
+ let { example } = $$props;
+ let { schema } = $$props;
+ let { asToggle } = $$props;
+ let activeBody = "is-active";
+ let activeSchema = "";
+ let tabIndex = 0;
+
+ const tabSelect = event => {
+ const index = event.target.dataset["index"];
+ $$invalidate(7, tabIndex = parseInt(index, 10));
+ };
+
+ $$self.$set = $$props => {
+ if ("contentType" in $$props) $$invalidate(0, contentType = $$props.contentType);
+ if ("example" in $$props) $$invalidate(1, example = $$props.example);
+ if ("schema" in $$props) $$invalidate(2, schema = $$props.schema);
+ if ("asToggle" in $$props) $$invalidate(3, asToggle = $$props.asToggle);
+ };
+
+ $$self.$$.update = () => {
+ if ($$self.$$.dirty & /*tabIndex*/ 128) {
+ $$invalidate(5, activeBody = tabIndex === 0 ? "is-active" : "");
+ }
+
+ if ($$self.$$.dirty & /*tabIndex*/ 128) {
+ $$invalidate(6, activeSchema = tabIndex === 1 ? "is-active" : "");
+ }
+ };
+
+ return [
+ contentType,
+ example,
+ schema,
+ asToggle,
+ tabSelect,
+ activeBody,
+ activeSchema,
+ tabIndex
+ ];
+ }
+
+ class CodePanel extends SvelteComponent {
+ constructor(options) {
+ super();
+ if (!document.getElementById("svelte-15v28ah-style")) add_css$7();
+
+ init(this, options, instance$e, create_fragment$e, safe_not_equal, {
+ contentType: 0,
+ example: 1,
+ schema: 2,
+ asToggle: 3,
+ tabSelect: 4
+ });
+ }
+
+ get tabSelect() {
+ return this.$$.ctx[4];
+ }
+ }
+
+ /* usr/local/lib/node_modules/snowboard/templates/winter/panels/RequestPanel.svelte generated by Svelte v3.19.2 */
+
+ function create_if_block_1$6(ctx) {
+ let div;
+ let raw_value = markdown(/*description*/ ctx[0]) + "";
+
+ return {
+ c() {
+ div = element("div");
+ attr(div, "class", "content");
+ },
+ m(target, anchor) {
+ insert(target, div, anchor);
+ div.innerHTML = raw_value;
+ },
+ p(ctx, dirty) {
+ if (dirty & /*description*/ 1 && raw_value !== (raw_value = markdown(/*description*/ ctx[0]) + "")) div.innerHTML = raw_value;;
+ },
+ d(detaching) {
+ if (detaching) detach(div);
+ }
+ };
+ }
+
+ // (26:0) {#if showRequest}
+ function create_if_block$9(ctx) {
+ let hr;
+
+ return {
+ c() {
+ hr = element("hr");
+ },
+ m(target, anchor) {
+ insert(target, hr, anchor);
+ },
+ d(detaching) {
+ if (detaching) detach(hr);
+ }
+ };
+ }
+
+ function create_fragment$f(ctx) {
+ let t0;
+ let t1;
+ let t2;
+ let if_block1_anchor;
+ let current;
+ let if_block0 = /*description*/ ctx[0] && create_if_block_1$6(ctx);
+ const headertable = new HeaderTable({ props: { headers: /*headers*/ ctx[1] } });
+
+ const codepanel = new CodePanel({
+ props: {
+ contentType: /*contentType*/ ctx[2],
+ example: /*example*/ ctx[3],
+ schema: /*schema*/ ctx[4],
+ asToggle: true
+ }
+ });
+
+ let if_block1 = /*showRequest*/ ctx[5] && create_if_block$9(ctx);
+
+ return {
+ c() {
+ if (if_block0) if_block0.c();
+ t0 = space();
+ create_component(headertable.$$.fragment);
+ t1 = space();
+ create_component(codepanel.$$.fragment);
+ t2 = space();
+ if (if_block1) if_block1.c();
+ if_block1_anchor = empty();
+ },
+ m(target, anchor) {
+ if (if_block0) if_block0.m(target, anchor);
+ insert(target, t0, anchor);
+ mount_component(headertable, target, anchor);
+ insert(target, t1, anchor);
+ mount_component(codepanel, target, anchor);
+ insert(target, t2, anchor);
+ if (if_block1) if_block1.m(target, anchor);
+ insert(target, if_block1_anchor, anchor);
+ current = true;
+ },
+ p(ctx, [dirty]) {
+ if (/*description*/ ctx[0]) {
+ if (if_block0) {
+ if_block0.p(ctx, dirty);
+ } else {
+ if_block0 = create_if_block_1$6(ctx);
+ if_block0.c();
+ if_block0.m(t0.parentNode, t0);
+ }
+ } else if (if_block0) {
+ if_block0.d(1);
+ if_block0 = null;
+ }
+
+ const headertable_changes = {};
+ if (dirty & /*headers*/ 2) headertable_changes.headers = /*headers*/ ctx[1];
+ headertable.$set(headertable_changes);
+ const codepanel_changes = {};
+ if (dirty & /*contentType*/ 4) codepanel_changes.contentType = /*contentType*/ ctx[2];
+ if (dirty & /*example*/ 8) codepanel_changes.example = /*example*/ ctx[3];
+ if (dirty & /*schema*/ 16) codepanel_changes.schema = /*schema*/ ctx[4];
+ codepanel.$set(codepanel_changes);
+
+ if (/*showRequest*/ ctx[5]) {
+ if (!if_block1) {
+ if_block1 = create_if_block$9(ctx);
+ if_block1.c();
+ if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
+ } else {
+
+ }
+ } else if (if_block1) {
+ if_block1.d(1);
+ if_block1 = null;
+ }
+ },
+ i(local) {
+ if (current) return;
+ transition_in(headertable.$$.fragment, local);
+ transition_in(codepanel.$$.fragment, local);
+ current = true;
+ },
+ o(local) {
+ transition_out(headertable.$$.fragment, local);
+ transition_out(codepanel.$$.fragment, local);
+ current = false;
+ },
+ d(detaching) {
+ if (if_block0) if_block0.d(detaching);
+ if (detaching) detach(t0);
+ destroy_component(headertable, detaching);
+ if (detaching) detach(t1);
+ destroy_component(codepanel, detaching);
+ if (detaching) detach(t2);
+ if (if_block1) if_block1.d(detaching);
+ if (detaching) detach(if_block1_anchor);
+ }
+ };
+ }
+
+ function instance$f($$self, $$props, $$invalidate) {
+ let { description } = $$props;
+ let { headers } = $$props;
+ let { contentType } = $$props;
+ let { example } = $$props;
+ let { schema } = $$props;
+
+ $$self.$set = $$props => {
+ if ("description" in $$props) $$invalidate(0, description = $$props.description);
+ if ("headers" in $$props) $$invalidate(1, headers = $$props.headers);
+ if ("contentType" in $$props) $$invalidate(2, contentType = $$props.contentType);
+ if ("example" in $$props) $$invalidate(3, example = $$props.example);
+ if ("schema" in $$props) $$invalidate(4, schema = $$props.schema);
+ };
+
+ let showRequest;
+
+ $$self.$$.update = () => {
+ if ($$self.$$.dirty & /*description, headers, example*/ 11) {
+ $$invalidate(5, showRequest = !!(description || headers.length !== 0 || example));
+ }
+ };
+
+ return [description, headers, contentType, example, schema, showRequest];
+ }
+
+ class RequestPanel extends SvelteComponent {
+ constructor(options) {
+ super();
+
+ init(this, options, instance$f, create_fragment$f, safe_not_equal, {
+ description: 0,
+ headers: 1,
+ contentType: 2,
+ example: 3,
+ schema: 4
+ });
+ }
+ }
+
+ /* usr/local/lib/node_modules/snowboard/templates/winter/panels/ResponsePanel.svelte generated by Svelte v3.19.2 */
function create_else_block$4(ctx) {
+ let t_value = (/*contentType*/ ctx[4] || "Response") + "";
+ let t;
+
+ return {
+ c() {
+ t = text(t_value);
+ },
+ m(target, anchor) {
+ insert(target, t, anchor);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*contentType*/ 16 && t_value !== (t_value = (/*contentType*/ ctx[4] || "Response") + "")) set_data(t, t_value);
+ },
+ d(detaching) {
+ if (detaching) detach(t);
+ }
+ };
+ }
+
+ // (19:6) {#if title}
+ function create_if_block_2$4(ctx) {
+ let t0;
+ let t1;
+
+ return {
+ c() {
+ t0 = text("Response ");
+ t1 = text(/*title*/ ctx[0]);
+ },
+ m(target, anchor) {
+ insert(target, t0, anchor);
+ insert(target, t1, anchor);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*title*/ 1) set_data(t1, /*title*/ ctx[0]);
+ },
+ d(detaching) {
+ if (detaching) detach(t0);
+ if (detaching) detach(t1);
+ }
+ };
+ }
+
+ // (23:6) {#if title !== ''}
+ function create_if_block_1$7(ctx) {
+ let span;
+ let t_value = (/*contentType*/ ctx[4] || "") + "";
+ let t;
+
+ return {
+ c() {
+ span = element("span");
+ t = text(t_value);
+ attr(span, "class", "tag is-medium is-white");
+ },
+ m(target, anchor) {
+ insert(target, span, anchor);
+ append(span, t);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*contentType*/ 16 && t_value !== (t_value = (/*contentType*/ ctx[4] || "") + "")) set_data(t, t_value);
+ },
+ d(detaching) {
+ if (detaching) detach(span);
+ }
+ };
+ }
+
+ // (30:4) {#if description}
+ function create_if_block$a(ctx) {
+ let div;
+ let raw_value = markdown(/*description*/ ctx[1]) + "";
+
+ return {
+ c() {
+ div = element("div");
+ attr(div, "class", "content");
+ },
+ m(target, anchor) {
+ insert(target, div, anchor);
+ div.innerHTML = raw_value;
+ },
+ p(ctx, dirty) {
+ if (dirty & /*description*/ 2 && raw_value !== (raw_value = markdown(/*description*/ ctx[1]) + "")) div.innerHTML = raw_value;;
+ },
+ d(detaching) {
+ if (detaching) detach(div);
+ }
+ };
+ }
+
+ function create_fragment$g(ctx) {
+ let div1;
+ let header;
+ let p;
+ let t0;
+ let a;
+ let t1;
+ let code;
+ let t2;
+ let code_class_value;
+ let t3;
+ let div0;
+ let t4;
+ let t5;
+ let current;
+
+ function select_block_type(ctx, dirty) {
+ if (/*title*/ ctx[0]) return create_if_block_2$4;
+ return create_else_block$4;
+ }
+
+ let current_block_type = select_block_type(ctx, -1);
+ let if_block0 = current_block_type(ctx);
+ let if_block1 = /*title*/ ctx[0] !== "" && create_if_block_1$7(ctx);
+ let if_block2 = /*description*/ ctx[1] && create_if_block$a(ctx);
+ const headertable = new HeaderTable({ props: { headers: /*headers*/ ctx[2] } });
+
+ const codepanel = new CodePanel({
+ props: {
+ contentType: /*contentType*/ ctx[4],
+ example: /*example*/ ctx[5],
+ schema: /*schema*/ ctx[6]
+ }
+ });
+
+ return {
+ c() {
+ div1 = element("div");
+ header = element("header");
+ p = element("p");
+ if_block0.c();
+ t0 = space();
+ a = element("a");
+ if (if_block1) if_block1.c();
+ t1 = space();
+ code = element("code");
+ t2 = text(/*statusCode*/ ctx[3]);
+ t3 = space();
+ div0 = element("div");
+ if (if_block2) if_block2.c();
+ t4 = space();
+ create_component(headertable.$$.fragment);
+ t5 = space();
+ create_component(codepanel.$$.fragment);
+ attr(p, "class", "card-header-title");
+ attr(code, "class", code_class_value = "tag is-medium " + colorize(/*statusCode*/ ctx[3]));
+ attr(a, "href", "javascript:void(0)");
+ attr(a, "class", "card-header-icon is-family-code");
+ attr(header, "class", "card-header");
+ attr(div0, "class", "card-content");
+ attr(div1, "class", "card");
+ },
+ m(target, anchor) {
+ insert(target, div1, anchor);
+ append(div1, header);
+ append(header, p);
+ if_block0.m(p, null);
+ append(header, t0);
+ append(header, a);
+ if (if_block1) if_block1.m(a, null);
+ append(a, t1);
+ append(a, code);
+ append(code, t2);
+ append(div1, t3);
+ append(div1, div0);
+ if (if_block2) if_block2.m(div0, null);
+ append(div0, t4);
+ mount_component(headertable, div0, null);
+ append(div0, t5);
+ mount_component(codepanel, div0, null);
+ current = true;
+ },
+ p(ctx, [dirty]) {
+ if (current_block_type === (current_block_type = select_block_type(ctx, dirty)) && if_block0) {
+ if_block0.p(ctx, dirty);
+ } else {
+ if_block0.d(1);
+ if_block0 = current_block_type(ctx);
+
+ if (if_block0) {
+ if_block0.c();
+ if_block0.m(p, null);
+ }
+ }
+
+ if (/*title*/ ctx[0] !== "") {
+ if (if_block1) {
+ if_block1.p(ctx, dirty);
+ } else {
+ if_block1 = create_if_block_1$7(ctx);
+ if_block1.c();
+ if_block1.m(a, t1);
+ }
+ } else if (if_block1) {
+ if_block1.d(1);
+ if_block1 = null;
+ }
+
+ if (!current || dirty & /*statusCode*/ 8) set_data(t2, /*statusCode*/ ctx[3]);
+
+ if (!current || dirty & /*statusCode*/ 8 && code_class_value !== (code_class_value = "tag is-medium " + colorize(/*statusCode*/ ctx[3]))) {
+ attr(code, "class", code_class_value);
+ }
+
+ if (/*description*/ ctx[1]) {
+ if (if_block2) {
+ if_block2.p(ctx, dirty);
+ } else {
+ if_block2 = create_if_block$a(ctx);
+ if_block2.c();
+ if_block2.m(div0, t4);
+ }
+ } else if (if_block2) {
+ if_block2.d(1);
+ if_block2 = null;
+ }
+
+ const headertable_changes = {};
+ if (dirty & /*headers*/ 4) headertable_changes.headers = /*headers*/ ctx[2];
+ headertable.$set(headertable_changes);
+ const codepanel_changes = {};
+ if (dirty & /*contentType*/ 16) codepanel_changes.contentType = /*contentType*/ ctx[4];
+ if (dirty & /*example*/ 32) codepanel_changes.example = /*example*/ ctx[5];
+ if (dirty & /*schema*/ 64) codepanel_changes.schema = /*schema*/ ctx[6];
+ codepanel.$set(codepanel_changes);
+ },
+ i(local) {
+ if (current) return;
+ transition_in(headertable.$$.fragment, local);
+ transition_in(codepanel.$$.fragment, local);
+ current = true;
+ },
+ o(local) {
+ transition_out(headertable.$$.fragment, local);
+ transition_out(codepanel.$$.fragment, local);
+ current = false;
+ },
+ d(detaching) {
+ if (detaching) detach(div1);
+ if_block0.d();
+ if (if_block1) if_block1.d();
+ if (if_block2) if_block2.d();
+ destroy_component(headertable);
+ destroy_component(codepanel);
+ }
+ };
+ }
+
+ function instance$g($$self, $$props, $$invalidate) {
+ let { title } = $$props;
+ let { description } = $$props;
+ let { headers } = $$props;
+ let { statusCode } = $$props;
+ let { contentType } = $$props;
+ let { example } = $$props;
+ let { schema } = $$props;
+
+ $$self.$set = $$props => {
+ if ("title" in $$props) $$invalidate(0, title = $$props.title);
+ if ("description" in $$props) $$invalidate(1, description = $$props.description);
+ if ("headers" in $$props) $$invalidate(2, headers = $$props.headers);
+ if ("statusCode" in $$props) $$invalidate(3, statusCode = $$props.statusCode);
+ if ("contentType" in $$props) $$invalidate(4, contentType = $$props.contentType);
+ if ("example" in $$props) $$invalidate(5, example = $$props.example);
+ if ("schema" in $$props) $$invalidate(6, schema = $$props.schema);
+ };
+
+ return [title, description, headers, statusCode, contentType, example, schema];
+ }
+
+ class ResponsePanel extends SvelteComponent {
+ constructor(options) {
+ super();
+
+ init(this, options, instance$g, create_fragment$g, safe_not_equal, {
+ title: 0,
+ description: 1,
+ headers: 2,
+ statusCode: 3,
+ contentType: 4,
+ example: 5,
+ schema: 6
+ });
+ }
+ }
+
+ /* usr/local/lib/node_modules/snowboard/templates/winter/panels/ScenarioPanel.svelte generated by Svelte v3.19.2 */
+
+ function get_each_context_1$1(ctx, list, i) {
+ const child_ctx = ctx.slice();
+ child_ctx[7] = list[i];
+ child_ctx[4] = i;
+ return child_ctx;
+ }
+
+ function get_each_context$3(ctx, list, i) {
+ const child_ctx = ctx.slice();
+ child_ctx[7] = list[i];
+ child_ctx[4] = i;
+ return child_ctx;
+ }
+
+ // (50:0) {:else}
+ function create_else_block$5(ctx) {
let current;
const collapsiblepanel = new CollapsiblePanel({
props: {
- isDarkmode: /*isDarkmode*/ ctx[4],
+ isDarkmode: /*isDarkmode*/ ctx[3],
show: /*show*/ ctx[0],
$$slots: {
default: [create_default_slot$1],
@@ -16303,10 +20312,10 @@
},
p(ctx, dirty) {
const collapsiblepanel_changes = {};
- if (dirty & /*isDarkmode*/ 16) collapsiblepanel_changes.isDarkmode = /*isDarkmode*/ ctx[4];
+ if (dirty & /*isDarkmode*/ 8) collapsiblepanel_changes.isDarkmode = /*isDarkmode*/ ctx[3];
if (dirty & /*show*/ 1) collapsiblepanel_changes.show = /*show*/ ctx[0];
- if (dirty & /*$$scope, response, request, index*/ 142) {
+ if (dirty & /*$$scope, responses, request, index*/ 1046) {
collapsiblepanel_changes.$$scope = { dirty, ctx };
}
@@ -16329,17 +20338,163 @@
// (30:0) {#if request.title === ''}
function create_if_block$b(ctx) {
+ let t0;
+ let t1;
+ let div;
+ let current;
+ let if_block = /*show*/ ctx[0] && create_if_block_1$8(ctx);
+ let each_value = /*responses*/ ctx[2];
+ let each_blocks = [];
+
+ for (let i = 0; i < each_value.length; i += 1) {
+ each_blocks[i] = create_each_block$3(get_each_context$3(ctx, each_value, i));
+ }
+
+ const out = i => transition_out(each_blocks[i], 1, 1, () => {
+ each_blocks[i] = null;
+ });
+
+ return {
+ c() {
+ if (if_block) if_block.c();
+ t0 = space();
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].c();
+ }
+
+ t1 = space();
+ div = element("div");
+ attr(div, "class", "panel");
+ },
+ m(target, anchor) {
+ if (if_block) if_block.m(target, anchor);
+ insert(target, t0, anchor);
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].m(target, anchor);
+ }
+
+ insert(target, t1, anchor);
+ insert(target, div, anchor);
+ current = true;
+ },
+ p(ctx, dirty) {
+ if (/*show*/ ctx[0]) {
+ if (if_block) {
+ if_block.p(ctx, dirty);
+ transition_in(if_block, 1);
+ } else {
+ if_block = create_if_block_1$8(ctx);
+ if_block.c();
+ transition_in(if_block, 1);
+ if_block.m(t0.parentNode, t0);
+ }
+ } else if (if_block) {
+ group_outros();
+
+ transition_out(if_block, 1, 1, () => {
+ if_block = null;
+ });
+
+ check_outros();
+ }
+
+ if (dirty & /*responses*/ 4) {
+ each_value = /*responses*/ ctx[2];
+ let i;
+
+ for (i = 0; i < each_value.length; i += 1) {
+ const child_ctx = get_each_context$3(ctx, each_value, i);
+
+ if (each_blocks[i]) {
+ each_blocks[i].p(child_ctx, dirty);
+ transition_in(each_blocks[i], 1);
+ } else {
+ each_blocks[i] = create_each_block$3(child_ctx);
+ each_blocks[i].c();
+ transition_in(each_blocks[i], 1);
+ each_blocks[i].m(t1.parentNode, t1);
+ }
+ }
+
+ group_outros();
+
+ for (i = each_value.length; i < each_blocks.length; i += 1) {
+ out(i);
+ }
+
+ check_outros();
+ }
+ },
+ i(local) {
+ if (current) return;
+ transition_in(if_block);
+
+ for (let i = 0; i < each_value.length; i += 1) {
+ transition_in(each_blocks[i]);
+ }
+
+ current = true;
+ },
+ o(local) {
+ transition_out(if_block);
+ each_blocks = each_blocks.filter(Boolean);
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ transition_out(each_blocks[i]);
+ }
+
+ current = false;
+ },
+ d(detaching) {
+ if (if_block) if_block.d(detaching);
+ if (detaching) detach(t0);
+ destroy_each(each_blocks, detaching);
+ if (detaching) detach(t1);
+ if (detaching) detach(div);
+ }
+ };
+ }
+
+ // (52:4)
+ function create_heading_slot$1(ctx) {
+ let span;
+ let t_value = /*title*/ ctx[5](/*index*/ ctx[4]) + "";
+ let t;
+
+ return {
+ c() {
+ span = element("span");
+ t = text(t_value);
+ attr(span, "slot", "heading");
+ },
+ m(target, anchor) {
+ insert(target, span, anchor);
+ append(span, t);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*index*/ 16 && t_value !== (t_value = /*title*/ ctx[5](/*index*/ ctx[4]) + "")) set_data(t, t_value);
+ },
+ d(detaching) {
+ if (detaching) detach(span);
+ }
+ };
+ }
+
+ // (61:6) {#each responses as response, index}
+ function create_each_block_1$1(ctx) {
let current;
const responsepanel = new ResponsePanel({
props: {
- title: /*response*/ ctx[3].title,
- description: /*response*/ ctx[3].description,
- statusCode: /*response*/ ctx[3].statusCode,
- headers: /*response*/ ctx[3].headers,
- contentType: /*response*/ ctx[3].contentType,
- example: /*response*/ ctx[3].example,
- schema: /*response*/ ctx[3].schema
+ title: /*response*/ ctx[7].title,
+ description: /*response*/ ctx[7].description,
+ statusCode: /*response*/ ctx[7].statusCode,
+ headers: /*response*/ ctx[7].headers,
+ contentType: /*response*/ ctx[7].contentType,
+ example: /*response*/ ctx[7].example,
+ schema: /*response*/ ctx[7].schema
}
});
@@ -16353,13 +20508,13 @@
},
p(ctx, dirty) {
const responsepanel_changes = {};
- if (dirty & /*response*/ 8) responsepanel_changes.title = /*response*/ ctx[3].title;
- if (dirty & /*response*/ 8) responsepanel_changes.description = /*response*/ ctx[3].description;
- if (dirty & /*response*/ 8) responsepanel_changes.statusCode = /*response*/ ctx[3].statusCode;
- if (dirty & /*response*/ 8) responsepanel_changes.headers = /*response*/ ctx[3].headers;
- if (dirty & /*response*/ 8) responsepanel_changes.contentType = /*response*/ ctx[3].contentType;
- if (dirty & /*response*/ 8) responsepanel_changes.example = /*response*/ ctx[3].example;
- if (dirty & /*response*/ 8) responsepanel_changes.schema = /*response*/ ctx[3].schema;
+ if (dirty & /*responses*/ 4) responsepanel_changes.title = /*response*/ ctx[7].title;
+ if (dirty & /*responses*/ 4) responsepanel_changes.description = /*response*/ ctx[7].description;
+ if (dirty & /*responses*/ 4) responsepanel_changes.statusCode = /*response*/ ctx[7].statusCode;
+ if (dirty & /*responses*/ 4) responsepanel_changes.headers = /*response*/ ctx[7].headers;
+ if (dirty & /*responses*/ 4) responsepanel_changes.contentType = /*response*/ ctx[7].contentType;
+ if (dirty & /*responses*/ 4) responsepanel_changes.example = /*response*/ ctx[7].example;
+ if (dirty & /*responses*/ 4) responsepanel_changes.schema = /*response*/ ctx[7].schema;
responsepanel.$set(responsepanel_changes);
},
i(local) {
@@ -16377,32 +20532,7 @@
};
}
- // (41:4)
- function create_heading_slot$1(ctx) {
- let span;
- let t_value = /*title*/ ctx[5](/*index*/ ctx[1]) + "";
- let t;
-
- return {
- c() {
- span = element("span");
- t = text(t_value);
- attr(span, "slot", "heading");
- },
- m(target, anchor) {
- insert(target, span, anchor);
- append(span, t);
- },
- p(ctx, dirty) {
- if (dirty & /*index*/ 2 && t_value !== (t_value = /*title*/ ctx[5](/*index*/ ctx[1]) + "")) set_data(t, t_value);
- },
- d(detaching) {
- if (detaching) detach(span);
- }
- };
- }
-
- // (42:4)
+ // (53:4)
function create_body_slot$1(ctx) {
let div;
let t;
@@ -16410,79 +20540,113 @@
const requestpanel = new RequestPanel({
props: {
- description: /*request*/ ctx[2].description,
- headers: /*request*/ ctx[2].headers,
- contentType: /*request*/ ctx[2].contentType,
- example: /*request*/ ctx[2].example,
- schema: /*request*/ ctx[2].schema
+ description: /*request*/ ctx[1].description,
+ headers: /*request*/ ctx[1].headers,
+ contentType: /*request*/ ctx[1].contentType,
+ example: /*request*/ ctx[1].example,
+ schema: /*request*/ ctx[1].schema
}
});
- const responsepanel = new ResponsePanel({
- props: {
- title: /*response*/ ctx[3].title,
- description: /*response*/ ctx[3].description,
- statusCode: /*response*/ ctx[3].statusCode,
- headers: /*response*/ ctx[3].headers,
- contentType: /*response*/ ctx[3].contentType,
- example: /*response*/ ctx[3].example,
- schema: /*response*/ ctx[3].schema
- }
- });
+ let each_value_1 = /*responses*/ ctx[2];
+ let each_blocks = [];
+
+ for (let i = 0; i < each_value_1.length; i += 1) {
+ each_blocks[i] = create_each_block_1$1(get_each_context_1$1(ctx, each_value_1, i));
+ }
+
+ const out = i => transition_out(each_blocks[i], 1, 1, () => {
+ each_blocks[i] = null;
+ });
return {
c() {
div = element("div");
create_component(requestpanel.$$.fragment);
t = space();
- create_component(responsepanel.$$.fragment);
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].c();
+ }
+
attr(div, "slot", "body");
},
m(target, anchor) {
insert(target, div, anchor);
mount_component(requestpanel, div, null);
append(div, t);
- mount_component(responsepanel, div, null);
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].m(div, null);
+ }
+
current = true;
},
p(ctx, dirty) {
const requestpanel_changes = {};
- if (dirty & /*request*/ 4) requestpanel_changes.description = /*request*/ ctx[2].description;
- if (dirty & /*request*/ 4) requestpanel_changes.headers = /*request*/ ctx[2].headers;
- if (dirty & /*request*/ 4) requestpanel_changes.contentType = /*request*/ ctx[2].contentType;
- if (dirty & /*request*/ 4) requestpanel_changes.example = /*request*/ ctx[2].example;
- if (dirty & /*request*/ 4) requestpanel_changes.schema = /*request*/ ctx[2].schema;
+ if (dirty & /*request*/ 2) requestpanel_changes.description = /*request*/ ctx[1].description;
+ if (dirty & /*request*/ 2) requestpanel_changes.headers = /*request*/ ctx[1].headers;
+ if (dirty & /*request*/ 2) requestpanel_changes.contentType = /*request*/ ctx[1].contentType;
+ if (dirty & /*request*/ 2) requestpanel_changes.example = /*request*/ ctx[1].example;
+ if (dirty & /*request*/ 2) requestpanel_changes.schema = /*request*/ ctx[1].schema;
requestpanel.$set(requestpanel_changes);
- const responsepanel_changes = {};
- if (dirty & /*response*/ 8) responsepanel_changes.title = /*response*/ ctx[3].title;
- if (dirty & /*response*/ 8) responsepanel_changes.description = /*response*/ ctx[3].description;
- if (dirty & /*response*/ 8) responsepanel_changes.statusCode = /*response*/ ctx[3].statusCode;
- if (dirty & /*response*/ 8) responsepanel_changes.headers = /*response*/ ctx[3].headers;
- if (dirty & /*response*/ 8) responsepanel_changes.contentType = /*response*/ ctx[3].contentType;
- if (dirty & /*response*/ 8) responsepanel_changes.example = /*response*/ ctx[3].example;
- if (dirty & /*response*/ 8) responsepanel_changes.schema = /*response*/ ctx[3].schema;
- responsepanel.$set(responsepanel_changes);
+
+ if (dirty & /*responses*/ 4) {
+ each_value_1 = /*responses*/ ctx[2];
+ let i;
+
+ for (i = 0; i < each_value_1.length; i += 1) {
+ const child_ctx = get_each_context_1$1(ctx, each_value_1, i);
+
+ if (each_blocks[i]) {
+ each_blocks[i].p(child_ctx, dirty);
+ transition_in(each_blocks[i], 1);
+ } else {
+ each_blocks[i] = create_each_block_1$1(child_ctx);
+ each_blocks[i].c();
+ transition_in(each_blocks[i], 1);
+ each_blocks[i].m(div, null);
+ }
+ }
+
+ group_outros();
+
+ for (i = each_value_1.length; i < each_blocks.length; i += 1) {
+ out(i);
+ }
+
+ check_outros();
+ }
},
i(local) {
if (current) return;
transition_in(requestpanel.$$.fragment, local);
- transition_in(responsepanel.$$.fragment, local);
+
+ for (let i = 0; i < each_value_1.length; i += 1) {
+ transition_in(each_blocks[i]);
+ }
+
current = true;
},
o(local) {
transition_out(requestpanel.$$.fragment, local);
- transition_out(responsepanel.$$.fragment, local);
+ each_blocks = each_blocks.filter(Boolean);
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ transition_out(each_blocks[i]);
+ }
+
current = false;
},
d(detaching) {
if (detaching) detach(div);
destroy_component(requestpanel);
- destroy_component(responsepanel);
+ destroy_each(each_blocks, detaching);
}
};
}
- // (40:2)
+ // (51:2)
function create_default_slot$1(ctx) {
let t;
let current;
@@ -16503,16 +20667,112 @@
};
}
+ // (31:2) {#if show}
+ function create_if_block_1$8(ctx) {
+ let current;
+
+ const requestpanel = new RequestPanel({
+ props: {
+ description: /*request*/ ctx[1].description,
+ headers: /*request*/ ctx[1].headers,
+ contentType: /*request*/ ctx[1].contentType,
+ example: /*request*/ ctx[1].example,
+ schema: /*request*/ ctx[1].schema
+ }
+ });
+
+ return {
+ c() {
+ create_component(requestpanel.$$.fragment);
+ },
+ m(target, anchor) {
+ mount_component(requestpanel, target, anchor);
+ current = true;
+ },
+ p(ctx, dirty) {
+ const requestpanel_changes = {};
+ if (dirty & /*request*/ 2) requestpanel_changes.description = /*request*/ ctx[1].description;
+ if (dirty & /*request*/ 2) requestpanel_changes.headers = /*request*/ ctx[1].headers;
+ if (dirty & /*request*/ 2) requestpanel_changes.contentType = /*request*/ ctx[1].contentType;
+ if (dirty & /*request*/ 2) requestpanel_changes.example = /*request*/ ctx[1].example;
+ if (dirty & /*request*/ 2) requestpanel_changes.schema = /*request*/ ctx[1].schema;
+ requestpanel.$set(requestpanel_changes);
+ },
+ i(local) {
+ if (current) return;
+ transition_in(requestpanel.$$.fragment, local);
+ current = true;
+ },
+ o(local) {
+ transition_out(requestpanel.$$.fragment, local);
+ current = false;
+ },
+ d(detaching) {
+ destroy_component(requestpanel, detaching);
+ }
+ };
+ }
+
+ // (39:2) {#each responses as response, index}
+ function create_each_block$3(ctx) {
+ let current;
+
+ const responsepanel = new ResponsePanel({
+ props: {
+ title: /*response*/ ctx[7].title,
+ description: /*response*/ ctx[7].description,
+ statusCode: /*response*/ ctx[7].statusCode,
+ headers: /*response*/ ctx[7].headers,
+ contentType: /*response*/ ctx[7].contentType,
+ example: /*response*/ ctx[7].example,
+ schema: /*response*/ ctx[7].schema
+ }
+ });
+
+ return {
+ c() {
+ create_component(responsepanel.$$.fragment);
+ },
+ m(target, anchor) {
+ mount_component(responsepanel, target, anchor);
+ current = true;
+ },
+ p(ctx, dirty) {
+ const responsepanel_changes = {};
+ if (dirty & /*responses*/ 4) responsepanel_changes.title = /*response*/ ctx[7].title;
+ if (dirty & /*responses*/ 4) responsepanel_changes.description = /*response*/ ctx[7].description;
+ if (dirty & /*responses*/ 4) responsepanel_changes.statusCode = /*response*/ ctx[7].statusCode;
+ if (dirty & /*responses*/ 4) responsepanel_changes.headers = /*response*/ ctx[7].headers;
+ if (dirty & /*responses*/ 4) responsepanel_changes.contentType = /*response*/ ctx[7].contentType;
+ if (dirty & /*responses*/ 4) responsepanel_changes.example = /*response*/ ctx[7].example;
+ if (dirty & /*responses*/ 4) responsepanel_changes.schema = /*response*/ ctx[7].schema;
+ responsepanel.$set(responsepanel_changes);
+ },
+ i(local) {
+ if (current) return;
+ transition_in(responsepanel.$$.fragment, local);
+ current = true;
+ },
+ o(local) {
+ transition_out(responsepanel.$$.fragment, local);
+ current = false;
+ },
+ d(detaching) {
+ destroy_component(responsepanel, detaching);
+ }
+ };
+ }
+
function create_fragment$h(ctx) {
let current_block_type_index;
let if_block;
let if_block_anchor;
let current;
- const if_block_creators = [create_if_block$b, create_else_block$4];
+ const if_block_creators = [create_if_block$b, create_else_block$5];
const if_blocks = [];
function select_block_type(ctx, dirty) {
- if (/*request*/ ctx[2].title === "") return 0;
+ if (/*request*/ ctx[1].title === "") return 0;
return 1;
}
@@ -16575,7 +20835,7 @@
let { count } = $$props;
let { index } = $$props;
let { request } = $$props;
- let { response } = $$props;
+ let { responses } = $$props;
let { isDarkmode } = $$props;
function title(index) {
@@ -16593,13 +20853,13 @@
$$self.$set = $$props => {
if ("show" in $$props) $$invalidate(0, show = $$props.show);
if ("count" in $$props) $$invalidate(6, count = $$props.count);
- if ("index" in $$props) $$invalidate(1, index = $$props.index);
- if ("request" in $$props) $$invalidate(2, request = $$props.request);
- if ("response" in $$props) $$invalidate(3, response = $$props.response);
- if ("isDarkmode" in $$props) $$invalidate(4, isDarkmode = $$props.isDarkmode);
+ if ("index" in $$props) $$invalidate(4, index = $$props.index);
+ if ("request" in $$props) $$invalidate(1, request = $$props.request);
+ if ("responses" in $$props) $$invalidate(2, responses = $$props.responses);
+ if ("isDarkmode" in $$props) $$invalidate(3, isDarkmode = $$props.isDarkmode);
};
- return [show, index, request, response, isDarkmode, title, count];
+ return [show, request, responses, isDarkmode, index, title, count];
}
class ScenarioPanel extends SvelteComponent {
@@ -16609,204 +20869,65 @@
init(this, options, instance$h, create_fragment$h, safe_not_equal, {
show: 0,
count: 6,
- index: 1,
- request: 2,
- response: 3,
- isDarkmode: 4
+ index: 4,
+ request: 1,
+ responses: 2,
+ isDarkmode: 3
});
}
}
- /* usr/local/lib/node_modules/snowboard/templates/winter.svelte generated by Svelte v3.16.5 */
+ /* usr/local/lib/node_modules/snowboard/templates/winter/pages/Action.svelte generated by Svelte v3.19.2 */
- const { document: document_1 } = globals;
-
- function add_css$9() {
+ function add_css$8() {
var style = element("style");
- style.id = "svelte-1jcck2f-style";
- style.textContent = "html{height:100%}body{min-height:100%}.sidenav.svelte-1jcck2f{padding:1rem 0 1rem 0.75rem}.main.svelte-1jcck2f{padding:3rem;background-color:#fff;box-shadow:0 2px 0 2px #f5f5f5}.main.is-darkmode.svelte-1jcck2f{background-color:#000;box-shadow:0 2px 0 2px #363636}.breadcrumb-right.svelte-1jcck2f{margin-top:0.3em}.box-wrapper.svelte-1jcck2f{border-radius:0}.body-inner.svelte-1jcck2f{min-height:100vh;background-color:#fafafa}.body-inner.is-darkmode.svelte-1jcck2f{background-color:#000}.is-darkmode .input, .is-darkmode .select select, .is-darkmode\n .textarea{background-color:#484848;border-color:#484848;color:#fff}.is-darkmode .input:hover, .is-darkmode\n .is-hovered.input, .is-darkmode .is-hovered.textarea, .is-darkmode\n .select\n select.is-hovered, .is-darkmode .select select:hover, .is-darkmode\n .textarea:hover{border-color:#666}.is-darkmode .select select.is-focused, .is-darkmode\n .select\n select:active, .is-darkmode .select select:focus, .is-darkmode\n .textarea:active, .is-darkmode .textarea:focus{border-color:#888}.is-darkmode .input::placeholder, .is-darkmode\n .select\n select::placeholder, .is-darkmode .textarea::placeholder{color:#ccc}code[class*=\"language-\"], pre[class*=\"language-\"]{font-family:monospace}.token.number, .token.tag{display:inline;padding:inherit;font-size:inherit;line-height:inherit;text-align:inherit;vertical-align:inherit;border-radius:inherit;font-weight:inherit;white-space:inherit;background:inherit;margin:inherit}.icon-brand.svelte-1jcck2f{margin-right:0.5rem}.menu-collapsible.svelte-1jcck2f{display:none;position:fixed;width:calc(25% - 0.5rem);height:calc(2.5rem + 10px);left:0;bottom:0;font-size:1.33333em;line-height:calc(2.5rem + 5px);text-align:center;color:#b5b5b5;font-weight:300;border-top:1px solid #eee;box-shadow:2px 0 0 #f5f5f5;cursor:pointer}.menu-collapsible.svelte-1jcck2f:hover{background:rgba(0, 0, 0, 0.05);box-shadow:2px 0 0 #eee;border-color:#e8e8e8}.menu-collapsible.is-darkmode.svelte-1jcck2f{border-color:#363636;box-shadow:2px 0 0 #363636}.menu-collapsible.is-darkmode.svelte-1jcck2f:hover{background:rgba(255, 255, 255, 0.2);border-color:#363636;box-shadow:2px 0 0 #363636}.footer.is-darkmode.svelte-1jcck2f{background-color:#000}.footer.svelte-1jcck2f .content.svelte-1jcck2f{transition:margin 0.3s}@media screen and (min-width: 768px){.menu-collapsible.svelte-1jcck2f{display:block}.is-collapsed.svelte-1jcck2f .sidenav.svelte-1jcck2f{width:3.75rem}.is-collapsed.svelte-1jcck2f .main.svelte-1jcck2f{width:calc(100% - 4.5rem)}.is-collapsed.svelte-1jcck2f .menu-collapsible.svelte-1jcck2f{width:calc(3rem - 2px)}.menu-collapsible.svelte-1jcck2f,.sidenav.svelte-1jcck2f,.main.svelte-1jcck2f{transition:width 0.3s}}";
- append(document_1.head, style);
+ style.id = "svelte-1kw1ago-style";
+ style.textContent = ".breadcrumb-right.svelte-1kw1ago{margin-top:0.3em}.box-wrapper.svelte-1kw1ago{border-radius:0}";
+ append(document.head, style);
}
- function get_each_context$6(ctx, list, i) {
+ function get_each_context$4(ctx, list, i) {
const child_ctx = ctx.slice();
- child_ctx[22] = list[i].request;
- child_ctx[23] = list[i].response;
- child_ctx[12] = i;
+ child_ctx[11] = list[i].request;
+ child_ctx[12] = list[i].responses;
+ child_ctx[14] = i;
return child_ctx;
}
function get_each_context_1$2(ctx, list, i) {
const child_ctx = ctx.slice();
- child_ctx[25] = list[i];
- child_ctx[12] = i;
+ child_ctx[15] = list[i];
+ child_ctx[14] = i;
return child_ctx;
}
- // (438:8) {#if config.playground.enabled}
- function create_if_block_8$1(ctx) {
- let current;
-
- const selectorpanel = new SelectorPanel({
- props: {
- environments: /*config*/ ctx[4].playground.environments,
- authenticating: /*authenticating*/ ctx[7]
- }
- });
+ // (192:0) {:else}
+ function create_else_block_1$1(ctx) {
+ let h3;
return {
c() {
- create_component(selectorpanel.$$.fragment);
+ h3 = element("h3");
+ h3.textContent = "404 - Not Found";
},
m(target, anchor) {
- mount_component(selectorpanel, target, anchor);
- current = true;
- },
- p(ctx, dirty) {
- const selectorpanel_changes = {};
- if (dirty & /*config*/ 16) selectorpanel_changes.environments = /*config*/ ctx[4].playground.environments;
- if (dirty & /*authenticating*/ 128) selectorpanel_changes.authenticating = /*authenticating*/ ctx[7];
- selectorpanel.$set(selectorpanel_changes);
- },
- i(local) {
- if (current) return;
- transition_in(selectorpanel.$$.fragment, local);
- current = true;
- },
- o(local) {
- transition_out(selectorpanel.$$.fragment, local);
- current = false;
+ insert(target, h3, anchor);
},
+ p: noop,
+ i: noop,
+ o: noop,
d(detaching) {
- destroy_component(selectorpanel, detaching);
+ if (detaching) detach(h3);
}
};
}
- // (443:8) {#if darkMode.enable}
- function create_if_block_7$1(ctx) {
- let div;
- let a;
- let span;
- let i;
- let dispose;
-
- return {
- c() {
- div = element("div");
- a = element("a");
- span = element("span");
- i = element("i");
- attr(i, "class", "fas fa-lg");
- toggle_class(i, "fa-moon", /*darkMode*/ ctx[9].active);
- toggle_class(i, "fa-sun", !/*darkMode*/ ctx[9].active);
- attr(span, "class", "icon is-medium has-text-grey-light");
- attr(a, "href", "javascript:void(0)");
- attr(a, "title", "Dark Mode");
- attr(a, "class", "navbar-link is-arrowless");
- attr(div, "class", "navbar-item has-dropdown is-hoverable");
- dispose = listen(a, "click", /*darkToggle*/ ctx[19]);
- },
- m(target, anchor) {
- insert(target, div, anchor);
- append(div, a);
- append(a, span);
- append(span, i);
- },
- p(ctx, dirty) {
- if (dirty & /*darkMode*/ 512) {
- toggle_class(i, "fa-moon", /*darkMode*/ ctx[9].active);
- }
-
- if (dirty & /*darkMode*/ 512) {
- toggle_class(i, "fa-sun", !/*darkMode*/ ctx[9].active);
- }
- },
- d(detaching) {
- if (detaching) detach(div);
- dispose();
- }
- };
- }
-
- // (485:8) {#if collapsed}
- function create_if_block_6$1(ctx) {
- let span;
-
- return {
- c() {
- span = element("span");
- span.textContent = "»";
- attr(span, "class", "icon");
- attr(span, "title", "Expand [");
- },
- m(target, anchor) {
- insert(target, span, anchor);
- },
- d(detaching) {
- if (detaching) detach(span);
- }
- };
- }
-
- // (488:8) {#if !collapsed}
- function create_if_block_5$1(ctx) {
- let span0;
- let t1;
- let span1;
-
- return {
- c() {
- span0 = element("span");
- span0.textContent = "«";
- t1 = space();
- span1 = element("span");
- span1.textContent = "Collapse sidebar";
- attr(span0, "class", "icon");
- attr(span1, "class", "fa-xs");
- },
- m(target, anchor) {
- insert(target, span0, anchor);
- insert(target, t1, anchor);
- insert(target, span1, anchor);
- },
- d(detaching) {
- if (detaching) detach(span0);
- if (detaching) detach(t1);
- if (detaching) detach(span1);
- }
- };
- }
-
- // (498:6) {#if index === -1}
- function create_if_block_4$1(ctx) {
- let div;
- let raw_value = markdown(/*description*/ ctx[1]) + "";
-
- return {
- c() {
- div = element("div");
- attr(div, "class", "content");
- },
- m(target, anchor) {
- insert(target, div, anchor);
- div.innerHTML = raw_value;
- },
- p(ctx, dirty) {
- if (dirty & /*description*/ 2 && raw_value !== (raw_value = markdown(/*description*/ ctx[1]) + "")) div.innerHTML = raw_value;;
- },
- d(detaching) {
- if (detaching) detach(div);
- }
- };
- }
-
- // (504:6) {#if currentAction}
+ // (126:0) {#if action}
function create_if_block$c(ctx) {
let div2;
let div0;
let h1;
- let t0_value = /*currentAction*/ ctx[10].title + "";
+ let t0_value = /*action*/ ctx[0].title + "";
let t0;
let t1;
let div1;
@@ -16817,41 +20938,39 @@
let t3;
let div3;
let code0;
- let t4_value = /*currentAction*/ ctx[10].method + "";
+ let t4_value = /*action*/ ctx[0].method + "";
let t4;
let code0_class_value;
let t5;
let code1;
- let t6_value = /*currentAction*/ ctx[10].pathTemplate + "";
+ let t6_value = /*action*/ ctx[0].pathTemplate + "";
let t6;
let t7;
let div4;
- let raw_value = markdown(/*currentAction*/ ctx[10].description) + "";
+ let raw_value = markdown(/*action*/ ctx[0].description) + "";
let t8;
let t9;
let t10;
let each1_anchor;
let current;
- let each_value_1 = /*currentAction*/ ctx[10].tags;
+ let each_value_1 = /*action*/ ctx[0].tags;
let each_blocks_1 = [];
for (let i = 0; i < each_value_1.length; i += 1) {
each_blocks_1[i] = create_each_block_1$2(get_each_context_1$2(ctx, each_value_1, i));
}
- let if_block = /*config*/ ctx[4].playground.enabled && create_if_block_1$8(ctx);
+ let if_block = /*config*/ ctx[1].playground.enabled && create_if_block_1$9(ctx);
const parameterpanel = new ParameterPanel({
- props: {
- parameters: /*currentAction*/ ctx[10].parameters
- }
+ props: { parameters: /*action*/ ctx[0].parameters }
});
- let each_value = /*currentAction*/ ctx[10].transactions;
+ let each_value = /*transactions*/ ctx[5];
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
- each_blocks[i] = create_each_block$6(get_each_context$6(ctx, each_value, i));
+ each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i));
}
const out = i => transition_out(each_blocks[i], 1, 1, () => {
@@ -16897,11 +21016,11 @@
each1_anchor = empty();
attr(h1, "class", "title is-4");
attr(div0, "class", "column");
- attr(nav, "class", "breadcrumb breadcrumb-right is-pulled-right svelte-1jcck2f");
+ attr(nav, "class", "breadcrumb breadcrumb-right is-pulled-right svelte-1kw1ago");
attr(nav, "aria-label", "breadcrumbs");
attr(div1, "class", "column");
attr(div2, "class", "columns");
- attr(code0, "class", code0_class_value = "tag is-uppercase " + colorize(/*currentAction*/ ctx[10].method) + " svelte-1jcck2f");
+ attr(code0, "class", code0_class_value = "tag is-uppercase " + colorize(/*action*/ ctx[0].method) + " svelte-1kw1ago");
attr(code1, "class", "tag ");
attr(div3, "class", "tags has-addons are-large");
attr(div4, "class", "content");
@@ -16946,10 +21065,10 @@
current = true;
},
p(ctx, dirty) {
- if ((!current || dirty & /*currentAction*/ 1024) && t0_value !== (t0_value = /*currentAction*/ ctx[10].title + "")) set_data(t0, t0_value);
+ if ((!current || dirty & /*action*/ 1) && t0_value !== (t0_value = /*action*/ ctx[0].title + "")) set_data(t0, t0_value);
- if (dirty & /*currentAction, slugify, handleGroupClick*/ 17408) {
- each_value_1 = /*currentAction*/ ctx[10].tags;
+ if (dirty & /*action, slugify, handleLink*/ 1) {
+ each_value_1 = /*action*/ ctx[0].tags;
let i;
for (i = 0; i < each_value_1.length; i += 1) {
@@ -16971,21 +21090,21 @@
each_blocks_1.length = each_value_1.length;
}
- if ((!current || dirty & /*currentAction*/ 1024) && t4_value !== (t4_value = /*currentAction*/ ctx[10].method + "")) set_data(t4, t4_value);
+ if ((!current || dirty & /*action*/ 1) && t4_value !== (t4_value = /*action*/ ctx[0].method + "")) set_data(t4, t4_value);
- if (!current || dirty & /*currentAction*/ 1024 && code0_class_value !== (code0_class_value = "tag is-uppercase " + colorize(/*currentAction*/ ctx[10].method) + " svelte-1jcck2f")) {
+ if (!current || dirty & /*action*/ 1 && code0_class_value !== (code0_class_value = "tag is-uppercase " + colorize(/*action*/ ctx[0].method) + " svelte-1kw1ago")) {
attr(code0, "class", code0_class_value);
}
- if ((!current || dirty & /*currentAction*/ 1024) && t6_value !== (t6_value = /*currentAction*/ ctx[10].pathTemplate + "")) set_data(t6, t6_value);
- if ((!current || dirty & /*currentAction*/ 1024) && raw_value !== (raw_value = markdown(/*currentAction*/ ctx[10].description) + "")) div4.innerHTML = raw_value;;
+ if ((!current || dirty & /*action*/ 1) && t6_value !== (t6_value = /*action*/ ctx[0].pathTemplate + "")) set_data(t6, t6_value);
+ if ((!current || dirty & /*action*/ 1) && raw_value !== (raw_value = markdown(/*action*/ ctx[0].description) + "")) div4.innerHTML = raw_value;;
- if (/*config*/ ctx[4].playground.enabled) {
+ if (/*config*/ ctx[1].playground.enabled) {
if (if_block) {
if_block.p(ctx, dirty);
transition_in(if_block, 1);
} else {
- if_block = create_if_block_1$8(ctx);
+ if_block = create_if_block_1$9(ctx);
if_block.c();
transition_in(if_block, 1);
if_block.m(t9.parentNode, t9);
@@ -17001,21 +21120,21 @@
}
const parameterpanel_changes = {};
- if (dirty & /*currentAction*/ 1024) parameterpanel_changes.parameters = /*currentAction*/ ctx[10].parameters;
+ if (dirty & /*action*/ 1) parameterpanel_changes.parameters = /*action*/ ctx[0].parameters;
parameterpanel.$set(parameterpanel_changes);
- if (dirty & /*darkMode, currentAction*/ 1536) {
- each_value = /*currentAction*/ ctx[10].transactions;
+ if (dirty & /*darkMode, transactions*/ 48) {
+ each_value = /*transactions*/ ctx[5];
let i;
for (i = 0; i < each_value.length; i += 1) {
- const child_ctx = get_each_context$6(ctx, each_value, i);
+ const child_ctx = get_each_context$4(ctx, each_value, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
transition_in(each_blocks[i], 1);
} else {
- each_blocks[i] = create_each_block$6(child_ctx);
+ each_blocks[i] = create_each_block$4(child_ctx);
each_blocks[i].c();
transition_in(each_blocks[i], 1);
each_blocks[i].m(each1_anchor.parentNode, each1_anchor);
@@ -17073,12 +21192,11 @@
};
}
- // (518:20) {:else}
- function create_else_block$5(ctx) {
+ // (140:14) {:else}
+ function create_else_block$6(ctx) {
let a;
- let t_value = /*tag*/ ctx[25] + "";
+ let t_value = /*tag*/ ctx[15] + "";
let t;
- let a_data_slug_value;
let a_href_value;
let dispose;
@@ -17086,22 +21204,17 @@
c() {
a = element("a");
t = text(t_value);
- attr(a, "data-slug", a_data_slug_value = slugify(/*tag*/ ctx[25]));
- attr(a, "href", a_href_value = "#/g~" + slugify(/*tag*/ ctx[25]));
- dispose = listen(a, "click", /*handleGroupClick*/ ctx[14]);
+ attr(a, "href", a_href_value = "/#/g~" + slugify(/*action*/ ctx[0].tags[0]) + "~" + slugify(/*tag*/ ctx[15]));
},
m(target, anchor) {
insert(target, a, anchor);
append(a, t);
+ dispose = listen(a, "click", handleLink);
},
p(ctx, dirty) {
- if (dirty & /*currentAction*/ 1024 && t_value !== (t_value = /*tag*/ ctx[25] + "")) set_data(t, t_value);
+ if (dirty & /*action*/ 1 && t_value !== (t_value = /*tag*/ ctx[15] + "")) set_data(t, t_value);
- if (dirty & /*currentAction*/ 1024 && a_data_slug_value !== (a_data_slug_value = slugify(/*tag*/ ctx[25]))) {
- attr(a, "data-slug", a_data_slug_value);
- }
-
- if (dirty & /*currentAction*/ 1024 && a_href_value !== (a_href_value = "#/g~" + slugify(/*tag*/ ctx[25]))) {
+ if (dirty & /*action*/ 1 && a_href_value !== (a_href_value = "/#/g~" + slugify(/*action*/ ctx[0].tags[0]) + "~" + slugify(/*tag*/ ctx[15]))) {
attr(a, "href", a_href_value);
}
},
@@ -17112,10 +21225,10 @@
};
}
- // (516:20) {#if index === 0}
- function create_if_block_3$3(ctx) {
+ // (138:14) {#if index === 0}
+ function create_if_block_3$1(ctx) {
let a;
- let t_value = /*tag*/ ctx[25] + "";
+ let t_value = /*tag*/ ctx[15] + "";
let t;
return {
@@ -17129,7 +21242,7 @@
append(a, t);
},
p(ctx, dirty) {
- if (dirty & /*currentAction*/ 1024 && t_value !== (t_value = /*tag*/ ctx[25] + "")) set_data(t, t_value);
+ if (dirty & /*action*/ 1 && t_value !== (t_value = /*tag*/ ctx[15] + "")) set_data(t, t_value);
},
d(detaching) {
if (detaching) detach(a);
@@ -17137,17 +21250,17 @@
};
}
- // (514:16) {#each currentAction.tags as tag, index}
+ // (136:10) {#each action.tags as tag, index}
function create_each_block_1$2(ctx) {
let li;
let t;
- function select_block_type(ctx, dirty) {
- if (/*index*/ ctx[12] === 0) return create_if_block_3$3;
- return create_else_block$5;
+ function select_block_type_1(ctx, dirty) {
+ if (/*index*/ ctx[14] === 0) return create_if_block_3$1;
+ return create_else_block$6;
}
- let current_block_type = select_block_type(ctx, -1);
+ let current_block_type = select_block_type_1(ctx, -1);
let if_block = current_block_type(ctx);
return {
@@ -17171,11 +21284,11 @@
};
}
- // (546:8) {#if config.playground.enabled}
- function create_if_block_1$8(ctx) {
+ // (167:2) {#if config.playground.enabled}
+ function create_if_block_1$9(ctx) {
let if_block_anchor;
let current;
- let if_block = /*environment*/ ctx[11].playground !== false && create_if_block_2$5(ctx);
+ let if_block = /*environment*/ ctx[2].playground !== false && create_if_block_2$5(ctx);
return {
c() {
@@ -17188,7 +21301,7 @@
current = true;
},
p(ctx, dirty) {
- if (/*environment*/ ctx[11].playground !== false) {
+ if (/*environment*/ ctx[2].playground !== false) {
if (if_block) {
if_block.p(ctx, dirty);
transition_in(if_block, 1);
@@ -17224,19 +21337,20 @@
};
}
- // (547:10) {#if environment.playground !== false}
+ // (168:4) {#if environment.playground !== false}
function create_if_block_2$5(ctx) {
let current;
const playgroundpanel = new PlaygroundPanel({
props: {
- currentAction: /*currentAction*/ ctx[10],
- environments: /*config*/ ctx[4].playground.environments,
- currentSample: sample(/*currentAction*/ ctx[10]),
- requestHeaders: headersMap(/*currentAction*/ ctx[10]),
- requestParameters: parametersMap(/*currentAction*/ ctx[10]),
- requestBody: bodyMap(/*currentAction*/ ctx[10]),
- isDarkmode: /*darkMode*/ ctx[9].active
+ currentAction: /*action*/ ctx[0],
+ pkceChallenge: /*challengePair*/ ctx[3],
+ environments: /*config*/ ctx[1].playground.environments,
+ requestHeaders: headersMap(/*action*/ ctx[0]),
+ requestAuthHeader: /*authHeader*/ ctx[6](/*action*/ ctx[0], /*environment*/ ctx[2]),
+ requestParameters: parametersMap(/*action*/ ctx[0]),
+ requestBody: bodyMap(/*action*/ ctx[0]),
+ isDarkmode: /*darkMode*/ ctx[4].active
}
});
@@ -17250,13 +21364,14 @@
},
p(ctx, dirty) {
const playgroundpanel_changes = {};
- if (dirty & /*currentAction*/ 1024) playgroundpanel_changes.currentAction = /*currentAction*/ ctx[10];
- if (dirty & /*config*/ 16) playgroundpanel_changes.environments = /*config*/ ctx[4].playground.environments;
- if (dirty & /*currentAction*/ 1024) playgroundpanel_changes.currentSample = sample(/*currentAction*/ ctx[10]);
- if (dirty & /*currentAction*/ 1024) playgroundpanel_changes.requestHeaders = headersMap(/*currentAction*/ ctx[10]);
- if (dirty & /*currentAction*/ 1024) playgroundpanel_changes.requestParameters = parametersMap(/*currentAction*/ ctx[10]);
- if (dirty & /*currentAction*/ 1024) playgroundpanel_changes.requestBody = bodyMap(/*currentAction*/ ctx[10]);
- if (dirty & /*darkMode*/ 512) playgroundpanel_changes.isDarkmode = /*darkMode*/ ctx[9].active;
+ if (dirty & /*action*/ 1) playgroundpanel_changes.currentAction = /*action*/ ctx[0];
+ if (dirty & /*challengePair*/ 8) playgroundpanel_changes.pkceChallenge = /*challengePair*/ ctx[3];
+ if (dirty & /*config*/ 2) playgroundpanel_changes.environments = /*config*/ ctx[1].playground.environments;
+ if (dirty & /*action*/ 1) playgroundpanel_changes.requestHeaders = headersMap(/*action*/ ctx[0]);
+ if (dirty & /*action, environment*/ 5) playgroundpanel_changes.requestAuthHeader = /*authHeader*/ ctx[6](/*action*/ ctx[0], /*environment*/ ctx[2]);
+ if (dirty & /*action*/ 1) playgroundpanel_changes.requestParameters = parametersMap(/*action*/ ctx[0]);
+ if (dirty & /*action*/ 1) playgroundpanel_changes.requestBody = bodyMap(/*action*/ ctx[0]);
+ if (dirty & /*darkMode*/ 16) playgroundpanel_changes.isDarkmode = /*darkMode*/ ctx[4].active;
playgroundpanel.$set(playgroundpanel_changes);
},
i(local) {
@@ -17274,18 +21389,18 @@
};
}
- // (561:8) {#each currentAction.transactions as { request, response }
- function create_each_block$6(ctx) {
+ // (183:2) {#each transactions as { request, responses }
+ function create_each_block$4(ctx) {
let current;
const scenariopanel = new ScenarioPanel({
props: {
- show: /*index*/ ctx[12] === 0,
- isDarkmode: /*darkMode*/ ctx[9].active,
- request: /*request*/ ctx[22],
- response: /*response*/ ctx[23],
- index: /*index*/ ctx[12],
- count: /*currentAction*/ ctx[10].transactions.length
+ show: /*index*/ ctx[14] === 0,
+ isDarkmode: /*darkMode*/ ctx[4].active,
+ request: /*request*/ ctx[11],
+ responses: /*responses*/ ctx[12],
+ index: /*index*/ ctx[14],
+ count: /*transactions*/ ctx[5].length
}
});
@@ -17299,10 +21414,10 @@
},
p(ctx, dirty) {
const scenariopanel_changes = {};
- if (dirty & /*darkMode*/ 512) scenariopanel_changes.isDarkmode = /*darkMode*/ ctx[9].active;
- if (dirty & /*currentAction*/ 1024) scenariopanel_changes.request = /*request*/ ctx[22];
- if (dirty & /*currentAction*/ 1024) scenariopanel_changes.response = /*response*/ ctx[23];
- if (dirty & /*currentAction*/ 1024) scenariopanel_changes.count = /*currentAction*/ ctx[10].transactions.length;
+ if (dirty & /*darkMode*/ 16) scenariopanel_changes.isDarkmode = /*darkMode*/ ctx[4].active;
+ if (dirty & /*transactions*/ 32) scenariopanel_changes.request = /*request*/ ctx[11];
+ if (dirty & /*transactions*/ 32) scenariopanel_changes.responses = /*responses*/ ctx[12];
+ if (dirty & /*transactions*/ 32) scenariopanel_changes.count = /*transactions*/ ctx[5].length;
scenariopanel.$set(scenariopanel_changes);
},
i(local) {
@@ -17321,350 +21436,68 @@
}
function create_fragment$i(ctx) {
- let div8;
- let nav;
- let div0;
- let a0;
- let span0;
- let t0;
- let span1;
- let t1;
- let t2;
- let a1;
- let t5;
- let div2;
- let div1;
- let t6;
- let t7;
- let div6;
- let div4;
- let t8;
- let div3;
- let t9;
- let t10;
- let div5;
- let t11;
- let t12;
- let footer;
- let div7;
- let p;
- let strong0;
- let t13;
- let t14;
- let a2;
+ let current_block_type_index;
+ let if_block;
+ let if_block_anchor;
let current;
- let dispose;
- let if_block0 = /*config*/ ctx[4].playground.enabled && create_if_block_8$1(ctx);
- let if_block1 = /*darkMode*/ ctx[9].enable && create_if_block_7$1(ctx);
+ const if_block_creators = [create_if_block$c, create_else_block_1$1];
+ const if_blocks = [];
- const menupanel = new MenuPanel({
- props: {
- tagActions: /*tagActions*/ ctx[3],
- tagHeaders: toc(/*description*/ ctx[1]),
- currentSlug: /*currentAction*/ ctx[10] && /*currentAction*/ ctx[10].slug,
- actionsCount: /*actions*/ ctx[2].length,
- isCollapsed: /*collapsed*/ ctx[6],
- isDarkmode: /*darkMode*/ ctx[9].active,
- query: /*query*/ ctx[8],
- config: /*config*/ ctx[4],
- handleClick: /*handleClick*/ ctx[13],
- handleGroupClick: /*handleGroupClick*/ ctx[14],
- tocClick: /*tocClick*/ ctx[15],
- searchClick: /*searchClick*/ ctx[18]
- }
- });
+ function select_block_type(ctx, dirty) {
+ if (/*action*/ ctx[0]) return 0;
+ return 1;
+ }
- let if_block2 = /*collapsed*/ ctx[6] && create_if_block_6$1(ctx);
- let if_block3 = !/*collapsed*/ ctx[6] && create_if_block_5$1(ctx);
- let if_block4 = /*index*/ ctx[12] === -1 && create_if_block_4$1(ctx);
- let if_block5 = /*currentAction*/ ctx[10] && create_if_block$c(ctx);
+ current_block_type_index = select_block_type(ctx, -1);
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
return {
c() {
- div8 = element("div");
- nav = element("nav");
- div0 = element("div");
- a0 = element("a");
- span0 = element("span");
- span0.innerHTML = ``;
- t0 = space();
- span1 = element("span");
- t1 = text(/*title*/ ctx[0]);
- t2 = space();
- a1 = element("a");
-
- a1.innerHTML = `
-
- `;
-
- t5 = space();
- div2 = element("div");
- div1 = element("div");
- if (if_block0) if_block0.c();
- t6 = space();
- if (if_block1) if_block1.c();
- t7 = space();
- div6 = element("div");
- div4 = element("div");
- create_component(menupanel.$$.fragment);
- t8 = space();
- div3 = element("div");
- if (if_block2) if_block2.c();
- t9 = space();
- if (if_block3) if_block3.c();
- t10 = space();
- div5 = element("div");
- if (if_block4) if_block4.c();
- t11 = space();
- if (if_block5) if_block5.c();
- t12 = space();
- footer = element("footer");
- div7 = element("div");
- p = element("p");
- strong0 = element("strong");
- t13 = text(/*title*/ ctx[0]);
- t14 = text("\n powered by\n ");
- a2 = element("a");
- a2.innerHTML = `Snowboard.`;
- attr(span0, "class", "icon icon-brand is-medium has-text-grey-light svelte-1jcck2f");
- attr(span1, "class", "title is-4");
- attr(a0, "href", "javascript:void(0)");
- attr(a0, "class", "navbar-item");
- attr(a1, "href", "javascript:void(0)");
- attr(a1, "role", "button");
- attr(a1, "class", "navbar-burger");
- attr(a1, "aria-label", "menu");
- attr(a1, "aria-expanded", "false");
- attr(a1, "data-target", "mainnav");
- attr(div0, "class", "navbar-brand");
- attr(div1, "class", "navbar-end");
- attr(div2, "class", "navbar-menu");
- attr(nav, "class", "navbar is-fixed-top has-shadow");
- attr(nav, "role", "navigation");
- attr(nav, "aria-label", "main navigation");
- attr(div3, "class", "menu-collapsible svelte-1jcck2f");
- toggle_class(div3, "is-darkmode", /*darkMode*/ ctx[9].active);
- attr(div4, "class", "column is-one-quarter sidenav svelte-1jcck2f");
- attr(div4, "id", "mainnav");
- toggle_class(div4, "is-hidden-mobile", /*showMenu*/ ctx[5]);
- attr(div5, "class", "column is-three-quarters main svelte-1jcck2f");
- toggle_class(div5, "is-darkmode", /*darkMode*/ ctx[9].active);
- attr(div6, "class", "columns svelte-1jcck2f");
- toggle_class(div6, "is-collapsed", /*collapsed*/ ctx[6]);
- attr(a2, "href", "https://github.com/bukalapak/snowboard");
- attr(a2, "target", "_blank");
- attr(div7, "class", "content column is-paddingless has-text-centered svelte-1jcck2f");
- toggle_class(div7, "is-offset-one-quarter", !/*collapsed*/ ctx[6]);
- attr(footer, "class", "footer svelte-1jcck2f");
- toggle_class(footer, "is-darkmode", /*darkMode*/ ctx[9].active);
- attr(div8, "class", "body-inner svelte-1jcck2f");
- toggle_class(div8, "is-darkmode", /*darkMode*/ ctx[9].active);
-
- dispose = [
- listen(a1, "click", /*burgerClick*/ ctx[16]),
- listen(div3, "click", /*collapseToggle*/ ctx[17])
- ];
+ if_block.c();
+ if_block_anchor = empty();
},
m(target, anchor) {
- insert(target, div8, anchor);
- append(div8, nav);
- append(nav, div0);
- append(div0, a0);
- append(a0, span0);
- append(a0, t0);
- append(a0, span1);
- append(span1, t1);
- append(div0, t2);
- append(div0, a1);
- append(nav, t5);
- append(nav, div2);
- append(div2, div1);
- if (if_block0) if_block0.m(div1, null);
- append(div1, t6);
- if (if_block1) if_block1.m(div1, null);
- append(div8, t7);
- append(div8, div6);
- append(div6, div4);
- mount_component(menupanel, div4, null);
- append(div4, t8);
- append(div4, div3);
- if (if_block2) if_block2.m(div3, null);
- append(div3, t9);
- if (if_block3) if_block3.m(div3, null);
- append(div6, t10);
- append(div6, div5);
- if (if_block4) if_block4.m(div5, null);
- append(div5, t11);
- if (if_block5) if_block5.m(div5, null);
- append(div8, t12);
- append(div8, footer);
- append(footer, div7);
- append(div7, p);
- append(p, strong0);
- append(strong0, t13);
- append(p, t14);
- append(p, a2);
+ if_blocks[current_block_type_index].m(target, anchor);
+ insert(target, if_block_anchor, anchor);
current = true;
},
p(ctx, [dirty]) {
- if (!current || dirty & /*title*/ 1) set_data(t1, /*title*/ ctx[0]);
+ let previous_block_index = current_block_type_index;
+ current_block_type_index = select_block_type(ctx, dirty);
- if (/*config*/ ctx[4].playground.enabled) {
- if (if_block0) {
- if_block0.p(ctx, dirty);
- transition_in(if_block0, 1);
- } else {
- if_block0 = create_if_block_8$1(ctx);
- if_block0.c();
- transition_in(if_block0, 1);
- if_block0.m(div1, t6);
- }
- } else if (if_block0) {
+ if (current_block_type_index === previous_block_index) {
+ if_blocks[current_block_type_index].p(ctx, dirty);
+ } else {
group_outros();
- transition_out(if_block0, 1, 1, () => {
- if_block0 = null;
+ transition_out(if_blocks[previous_block_index], 1, 1, () => {
+ if_blocks[previous_block_index] = null;
});
check_outros();
- }
+ if_block = if_blocks[current_block_type_index];
- if (/*darkMode*/ ctx[9].enable) {
- if (if_block1) {
- if_block1.p(ctx, dirty);
- } else {
- if_block1 = create_if_block_7$1(ctx);
- if_block1.c();
- if_block1.m(div1, null);
+ if (!if_block) {
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
+ if_block.c();
}
- } else if (if_block1) {
- if_block1.d(1);
- if_block1 = null;
- }
- const menupanel_changes = {};
- if (dirty & /*tagActions*/ 8) menupanel_changes.tagActions = /*tagActions*/ ctx[3];
- if (dirty & /*description*/ 2) menupanel_changes.tagHeaders = toc(/*description*/ ctx[1]);
- if (dirty & /*currentAction*/ 1024) menupanel_changes.currentSlug = /*currentAction*/ ctx[10] && /*currentAction*/ ctx[10].slug;
- if (dirty & /*actions*/ 4) menupanel_changes.actionsCount = /*actions*/ ctx[2].length;
- if (dirty & /*collapsed*/ 64) menupanel_changes.isCollapsed = /*collapsed*/ ctx[6];
- if (dirty & /*darkMode*/ 512) menupanel_changes.isDarkmode = /*darkMode*/ ctx[9].active;
- if (dirty & /*query*/ 256) menupanel_changes.query = /*query*/ ctx[8];
- if (dirty & /*config*/ 16) menupanel_changes.config = /*config*/ ctx[4];
- menupanel.$set(menupanel_changes);
-
- if (/*collapsed*/ ctx[6]) {
- if (!if_block2) {
- if_block2 = create_if_block_6$1(ctx);
- if_block2.c();
- if_block2.m(div3, t9);
- } else {
-
- }
- } else if (if_block2) {
- if_block2.d(1);
- if_block2 = null;
- }
-
- if (!/*collapsed*/ ctx[6]) {
- if (!if_block3) {
- if_block3 = create_if_block_5$1(ctx);
- if_block3.c();
- if_block3.m(div3, null);
- } else {
-
- }
- } else if (if_block3) {
- if_block3.d(1);
- if_block3 = null;
- }
-
- if (dirty & /*darkMode*/ 512) {
- toggle_class(div3, "is-darkmode", /*darkMode*/ ctx[9].active);
- }
-
- if (dirty & /*showMenu*/ 32) {
- toggle_class(div4, "is-hidden-mobile", /*showMenu*/ ctx[5]);
- }
-
- if (/*index*/ ctx[12] === -1) {
- if (if_block4) {
- if_block4.p(ctx, dirty);
- } else {
- if_block4 = create_if_block_4$1(ctx);
- if_block4.c();
- if_block4.m(div5, t11);
- }
- } else if (if_block4) {
- if_block4.d(1);
- if_block4 = null;
- }
-
- if (/*currentAction*/ ctx[10]) {
- if (if_block5) {
- if_block5.p(ctx, dirty);
- transition_in(if_block5, 1);
- } else {
- if_block5 = create_if_block$c(ctx);
- if_block5.c();
- transition_in(if_block5, 1);
- if_block5.m(div5, null);
- }
- } else if (if_block5) {
- group_outros();
-
- transition_out(if_block5, 1, 1, () => {
- if_block5 = null;
- });
-
- check_outros();
- }
-
- if (dirty & /*darkMode*/ 512) {
- toggle_class(div5, "is-darkmode", /*darkMode*/ ctx[9].active);
- }
-
- if (dirty & /*collapsed*/ 64) {
- toggle_class(div6, "is-collapsed", /*collapsed*/ ctx[6]);
- }
-
- if (!current || dirty & /*title*/ 1) set_data(t13, /*title*/ ctx[0]);
-
- if (dirty & /*collapsed*/ 64) {
- toggle_class(div7, "is-offset-one-quarter", !/*collapsed*/ ctx[6]);
- }
-
- if (dirty & /*darkMode*/ 512) {
- toggle_class(footer, "is-darkmode", /*darkMode*/ ctx[9].active);
- }
-
- if (dirty & /*darkMode*/ 512) {
- toggle_class(div8, "is-darkmode", /*darkMode*/ ctx[9].active);
+ transition_in(if_block, 1);
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
},
i(local) {
if (current) return;
- transition_in(if_block0);
- transition_in(menupanel.$$.fragment, local);
- transition_in(if_block5);
+ transition_in(if_block);
current = true;
},
o(local) {
- transition_out(if_block0);
- transition_out(menupanel.$$.fragment, local);
- transition_out(if_block5);
+ transition_out(if_block);
current = false;
},
d(detaching) {
- if (detaching) detach(div8);
- if (if_block0) if_block0.d();
- if (if_block1) if_block1.d();
- destroy_component(menupanel);
- if (if_block2) if_block2.d();
- if (if_block3) if_block3.d();
- if (if_block4) if_block4.d();
- if (if_block5) if_block5.d();
- run_all(dispose);
+ if_blocks[current_block_type_index].d(detaching);
+ if (detaching) detach(if_block_anchor);
}
};
}
@@ -17701,44 +21534,2403 @@
}
function instance$i($$self, $$props, $$invalidate) {
+ let $auth;
let $env;
- component_subscribe($$self, env, $$value => $$invalidate(20, $env = $$value));
+ let $token;
+ component_subscribe($$self, auth, $$value => $$invalidate(7, $auth = $$value));
+ component_subscribe($$self, env, $$value => $$invalidate(8, $env = $$value));
+ component_subscribe($$self, token$1, $$value => $$invalidate(9, $token = $$value));
+ let { action } = $$props;
+ let { config } = $$props;
+ let { environment } = $$props;
+ let { challengePair } = $$props;
+ let { darkMode } = $$props;
+
+ function authHeader(action, environment) {
+ const header = sample(action).headers.find(header => header.name === "Authorization");
+ if (!header) return;
+ header.value = header.example;
+ header.used = true;
+
+ if (isAuth(environment, "basic")) {
+ header.value = `Basic ${basicAuth(environment.auth.options.username, environment.auth.options.password)}`;
+ }
+
+ if (isAuth(environment, "apikey")) {
+ header.name = environment.auth.options.header;
+ header.value = environment.auth.options.key;
+ }
+
+ if (isAuth(environment, "oauth2")) {
+ if ($auth.split(";").includes($env)) {
+ header.value = `Bearer ${$token}`;
+ }
+ }
+
+ return header;
+ }
+
+ function toTransactions(transactions) {
+ if (!transactions) return [];
+ const items = {};
+
+ transactions.forEach(transaction => {
+ const { request, response } = transaction;
+ const requestHash = lib$2.h32(fastJsonStableStringify(request), 703710).toString(16);
+
+ if (!Object.keys(items).includes(requestHash)) {
+ items[requestHash] = { request, responses: [response] };
+ } else {
+ items[requestHash].responses.push(response);
+ }
+ });
+
+ return Object.values(items);
+ }
+
+ $$self.$set = $$props => {
+ if ("action" in $$props) $$invalidate(0, action = $$props.action);
+ if ("config" in $$props) $$invalidate(1, config = $$props.config);
+ if ("environment" in $$props) $$invalidate(2, environment = $$props.environment);
+ if ("challengePair" in $$props) $$invalidate(3, challengePair = $$props.challengePair);
+ if ("darkMode" in $$props) $$invalidate(4, darkMode = $$props.darkMode);
+ };
+
+ let transactions;
+
+ $$self.$$.update = () => {
+ if ($$self.$$.dirty & /*action*/ 1) {
+ $$invalidate(5, transactions = toTransactions(action && action.transactions));
+ }
+ };
+
+ return [action, config, environment, challengePair, darkMode, transactions, authHeader];
+ }
+
+ class Action extends SvelteComponent {
+ constructor(options) {
+ super();
+ if (!document.getElementById("svelte-1kw1ago-style")) add_css$8();
+
+ init(this, options, instance$i, create_fragment$i, safe_not_equal, {
+ action: 0,
+ config: 1,
+ environment: 2,
+ challengePair: 3,
+ darkMode: 4
+ });
+ }
+ }
+
+ /* usr/local/lib/node_modules/snowboard/templates/winter/components/MenuItem.svelte generated by Svelte v3.19.2 */
+
+ function add_css$9() {
+ var style = element("style");
+ style.id = "svelte-39af3j-style";
+ style.textContent = ".tag.svelte-39af3j{width:3.5rem}.menu-ellipsis.svelte-39af3j{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding:0.25em 0.75em}.menu-action.svelte-39af3j{vertical-align:middle}";
+ append(document.head, style);
+ }
+
+ function get_each_context$5(ctx, list, i) {
+ const child_ctx = ctx.slice();
+ child_ctx[6] = list[i];
+ return child_ctx;
+ }
+
+ // (28:0) {#if title}
+ function create_if_block_1$a(ctx) {
+ let li;
+ let a0;
+ let t0;
+ let a0_href_value;
+ let t1;
+ let a1;
+ let span;
+ let i;
+ let dispose;
+
+ return {
+ c() {
+ li = element("li");
+ a0 = element("a");
+ t0 = text(/*title*/ ctx[1]);
+ t1 = space();
+ a1 = element("a");
+ span = element("span");
+ i = element("i");
+ attr(a0, "href", a0_href_value = buildHref(`#/g~${/*parentSlug*/ ctx[3]}~${slugify(/*title*/ ctx[1])}`));
+ attr(a0, "class", "is-inline-block");
+ attr(i, "class", "fas");
+ toggle_class(i, "fa-chevron-right", /*hidden*/ ctx[0]);
+ toggle_class(i, "fa-chevron-down", !/*hidden*/ ctx[0]);
+ attr(span, "class", "icon is-small has-text-grey-light");
+ attr(a1, "href", "javascript:void(0)");
+ attr(a1, "class", "is-inline-block is-pulled-right");
+ },
+ m(target, anchor) {
+ insert(target, li, anchor);
+ append(li, a0);
+ append(a0, t0);
+ append(li, t1);
+ append(li, a1);
+ append(a1, span);
+ append(span, i);
+
+ dispose = [
+ listen(a0, "click", handleLink),
+ listen(a1, "click", /*click_handler*/ ctx[5])
+ ];
+ },
+ p(ctx, dirty) {
+ if (dirty & /*title*/ 2) set_data(t0, /*title*/ ctx[1]);
+
+ if (dirty & /*parentSlug, title*/ 10 && a0_href_value !== (a0_href_value = buildHref(`#/g~${/*parentSlug*/ ctx[3]}~${slugify(/*title*/ ctx[1])}`))) {
+ attr(a0, "href", a0_href_value);
+ }
+
+ if (dirty & /*hidden*/ 1) {
+ toggle_class(i, "fa-chevron-right", /*hidden*/ ctx[0]);
+ }
+
+ if (dirty & /*hidden*/ 1) {
+ toggle_class(i, "fa-chevron-down", !/*hidden*/ ctx[0]);
+ }
+ },
+ d(detaching) {
+ if (detaching) detach(li);
+ run_all(dispose);
+ }
+ };
+ }
+
+ // (50:0) {#if actions.length > 0}
+ function create_if_block$d(ctx) {
+ let li;
+ let ul;
+ let each_value = /*actions*/ ctx[2];
+ let each_blocks = [];
+
+ for (let i = 0; i < each_value.length; i += 1) {
+ each_blocks[i] = create_each_block$5(get_each_context$5(ctx, each_value, i));
+ }
+
+ return {
+ c() {
+ li = element("li");
+ ul = element("ul");
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].c();
+ }
+
+ toggle_class(li, "is-hidden", /*hidden*/ ctx[0]);
+ },
+ m(target, anchor) {
+ insert(target, li, anchor);
+ append(li, ul);
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].m(ul, null);
+ }
+ },
+ p(ctx, dirty) {
+ if (dirty & /*buildHref, actions, $router, handleLink, colorize*/ 20) {
+ each_value = /*actions*/ ctx[2];
+ let i;
+
+ for (i = 0; i < each_value.length; i += 1) {
+ const child_ctx = get_each_context$5(ctx, each_value, i);
+
+ if (each_blocks[i]) {
+ each_blocks[i].p(child_ctx, dirty);
+ } else {
+ each_blocks[i] = create_each_block$5(child_ctx);
+ each_blocks[i].c();
+ each_blocks[i].m(ul, null);
+ }
+ }
+
+ for (; i < each_blocks.length; i += 1) {
+ each_blocks[i].d(1);
+ }
+
+ each_blocks.length = each_value.length;
+ }
+
+ if (dirty & /*hidden*/ 1) {
+ toggle_class(li, "is-hidden", /*hidden*/ ctx[0]);
+ }
+ },
+ d(detaching) {
+ if (detaching) detach(li);
+ destroy_each(each_blocks, detaching);
+ }
+ };
+ }
+
+ // (53:6) {#each actions as action}
+ function create_each_block$5(ctx) {
+ let li;
+ let a;
+ let code;
+ let t0_value = /*action*/ ctx[6].method + "";
+ let t0;
+ let code_class_value;
+ let t1;
+ let span;
+ let t2_value = /*action*/ ctx[6].title + "";
+ let t2;
+ let a_href_value;
+ let t3;
+ let dispose;
+
+ return {
+ c() {
+ li = element("li");
+ a = element("a");
+ code = element("code");
+ t0 = text(t0_value);
+ t1 = space();
+ span = element("span");
+ t2 = text(t2_value);
+ t3 = space();
+ attr(code, "class", code_class_value = "tag " + colorize(/*action*/ ctx[6].method) + " is-uppercase" + " svelte-39af3j");
+ attr(span, "class", "menu-action svelte-39af3j");
+ attr(a, "href", a_href_value = buildHref(`#/${/*action*/ ctx[6].slug}`));
+ attr(a, "class", "menu-ellipsis svelte-39af3j");
+ toggle_class(a, "is-active", /*action*/ ctx[6].slug === /*$router*/ ctx[4].params.slug);
+ },
+ m(target, anchor) {
+ insert(target, li, anchor);
+ append(li, a);
+ append(a, code);
+ append(code, t0);
+ append(a, t1);
+ append(a, span);
+ append(span, t2);
+ append(li, t3);
+ dispose = listen(a, "click", handleLink);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*actions*/ 4 && t0_value !== (t0_value = /*action*/ ctx[6].method + "")) set_data(t0, t0_value);
+
+ if (dirty & /*actions*/ 4 && code_class_value !== (code_class_value = "tag " + colorize(/*action*/ ctx[6].method) + " is-uppercase" + " svelte-39af3j")) {
+ attr(code, "class", code_class_value);
+ }
+
+ if (dirty & /*actions*/ 4 && t2_value !== (t2_value = /*action*/ ctx[6].title + "")) set_data(t2, t2_value);
+
+ if (dirty & /*actions*/ 4 && a_href_value !== (a_href_value = buildHref(`#/${/*action*/ ctx[6].slug}`))) {
+ attr(a, "href", a_href_value);
+ }
+
+ if (dirty & /*actions, $router*/ 20) {
+ toggle_class(a, "is-active", /*action*/ ctx[6].slug === /*$router*/ ctx[4].params.slug);
+ }
+ },
+ d(detaching) {
+ if (detaching) detach(li);
+ dispose();
+ }
+ };
+ }
+
+ function create_fragment$j(ctx) {
+ let t;
+ let if_block1_anchor;
+ let if_block0 = /*title*/ ctx[1] && create_if_block_1$a(ctx);
+ let if_block1 = /*actions*/ ctx[2].length > 0 && create_if_block$d(ctx);
+
+ return {
+ c() {
+ if (if_block0) if_block0.c();
+ t = space();
+ if (if_block1) if_block1.c();
+ if_block1_anchor = empty();
+ },
+ m(target, anchor) {
+ if (if_block0) if_block0.m(target, anchor);
+ insert(target, t, anchor);
+ if (if_block1) if_block1.m(target, anchor);
+ insert(target, if_block1_anchor, anchor);
+ },
+ p(ctx, [dirty]) {
+ if (/*title*/ ctx[1]) {
+ if (if_block0) {
+ if_block0.p(ctx, dirty);
+ } else {
+ if_block0 = create_if_block_1$a(ctx);
+ if_block0.c();
+ if_block0.m(t.parentNode, t);
+ }
+ } else if (if_block0) {
+ if_block0.d(1);
+ if_block0 = null;
+ }
+
+ if (/*actions*/ ctx[2].length > 0) {
+ if (if_block1) {
+ if_block1.p(ctx, dirty);
+ } else {
+ if_block1 = create_if_block$d(ctx);
+ if_block1.c();
+ if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
+ }
+ } else if (if_block1) {
+ if_block1.d(1);
+ if_block1 = null;
+ }
+ },
+ i: noop,
+ o: noop,
+ d(detaching) {
+ if (if_block0) if_block0.d(detaching);
+ if (detaching) detach(t);
+ if (if_block1) if_block1.d(detaching);
+ if (detaching) detach(if_block1_anchor);
+ }
+ };
+ }
+
+ function instance$j($$self, $$props, $$invalidate) {
+ let $router;
+ component_subscribe($$self, router, $$value => $$invalidate(4, $router = $$value));
+ let { title } = $$props;
+ let { actions } = $$props;
+ let { parentSlug } = $$props;
+ let { hidden = false } = $$props;
+ const click_handler = () => $$invalidate(0, hidden = !hidden);
+
+ $$self.$set = $$props => {
+ if ("title" in $$props) $$invalidate(1, title = $$props.title);
+ if ("actions" in $$props) $$invalidate(2, actions = $$props.actions);
+ if ("parentSlug" in $$props) $$invalidate(3, parentSlug = $$props.parentSlug);
+ if ("hidden" in $$props) $$invalidate(0, hidden = $$props.hidden);
+ };
+
+ return [hidden, title, actions, parentSlug, $router, click_handler];
+ }
+
+ class MenuItem extends SvelteComponent {
+ constructor(options) {
+ super();
+ if (!document.getElementById("svelte-39af3j-style")) add_css$9();
+
+ init(this, options, instance$j, create_fragment$j, safe_not_equal, {
+ title: 1,
+ actions: 2,
+ parentSlug: 3,
+ hidden: 0
+ });
+ }
+ }
+
+ /* usr/local/lib/node_modules/snowboard/templates/winter/panels/MenuPanel.svelte generated by Svelte v3.19.2 */
+
+ function add_css$a() {
+ var style = element("style");
+ style.id = "svelte-fvssqr-style";
+ style.textContent = ".hero.svelte-fvssqr.svelte-fvssqr,.menu-wrapper.svelte-fvssqr.svelte-fvssqr{padding:0 2.75rem 0 2rem}.hero.svelte-fvssqr.svelte-fvssqr{position:sticky;top:54px;background-color:#fafafa;margin-bottom:1.5rem}.hero.is-darkmode.svelte-fvssqr.svelte-fvssqr{background-color:#000}.hero-body.svelte-fvssqr.svelte-fvssqr{padding:1.5rem 0;box-shadow:0 2px 0 0 #f5f5f5}.hero-body.is-darkmode.svelte-fvssqr.svelte-fvssqr{box-shadow:0 2px 0 0 #363636}.menu-wrapper.svelte-fvssqr.svelte-fvssqr::-webkit-scrollbar{display:none}@media screen and (min-width: 768px){.hero.svelte-fvssqr.svelte-fvssqr,.menu-wrapper.svelte-fvssqr.svelte-fvssqr{width:-moz-calc(25% - 0.5rem);width:-webkit-calc(25% - 0.5rem);width:-o-calc(25% - 0.5rem);width:calc(25% - 0.5rem)}.hero.svelte-fvssqr.svelte-fvssqr{position:fixed;padding:0 1.25rem}.menu-wrapper.svelte-fvssqr.svelte-fvssqr{position:fixed;top:140px;padding:1.5rem 1.25rem 1.25rem;height:-moz-calc(100% - 150px - 2.5rem);height:-webkit-calc(100% - 150px - 2.5rem);height:-o-calc(100% - 150px - 2.5rem);height:calc(100% - 150px - 2.5rem);overflow:-moz-scrollbars-none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:auto;transition:opacity 0.3s, left 0.3s}.menu.is-collapsed.svelte-fvssqr.svelte-fvssqr{width:3rem}.is-collapsed.svelte-fvssqr .hero.svelte-fvssqr,.is-collapsed.svelte-fvssqr .hero-body.svelte-fvssqr{width:calc(3rem - 2px)}.is-collapsed.svelte-fvssqr .hero.svelte-fvssqr{padding-left:0;padding-right:0}.is-collapsed.svelte-fvssqr .hero-body.svelte-fvssqr{padding-left:0.3175rem;padding-right:0.3175rem;box-shadow:none}.is-collapsed.svelte-fvssqr .input.is-rounded.svelte-fvssqr{padding-left:0;padding-right:0;opacity:0}.is-collapsed.svelte-fvssqr .icon-input-search.svelte-fvssqr{color:#b5b5b5;background-color:#eee;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;cursor:pointer;pointer-events:auto}.is-collapsed.svelte-fvssqr .icon-input-search.svelte-fvssqr:hover{color:#999;background-color:#e0e0e0}.is-collapsed.svelte-fvssqr .is-darkmode .icon-input-search.svelte-fvssqr{color:#ccc;background-color:#484848}.is-collapsed.svelte-fvssqr .is-darkmode .icon-input-search.svelte-fvssqr:hover{color:#fff;background-color:#484848}.is-collapsed.svelte-fvssqr .menu-wrapper.svelte-fvssqr{left:-30%;opacity:0}}";
+ append(document.head, style);
+ }
+
+ function get_each_context_1$3(ctx, list, i) {
+ const child_ctx = ctx.slice();
+ child_ctx[13] = list[i];
+ return child_ctx;
+ }
+
+ function get_each_context$6(ctx, list, i) {
+ const child_ctx = ctx.slice();
+ child_ctx[10] = list[i];
+ return child_ctx;
+ }
+
+ function get_each_context_2$1(ctx, list, i) {
+ const child_ctx = ctx.slice();
+ child_ctx[16] = list[i];
+ return child_ctx;
+ }
+
+ // (169:4) {#if query === ''}
+ function create_if_block_1$b(ctx) {
+ let if_block_anchor;
+ let if_block = /*tagHeaders*/ ctx[3] && create_if_block_2$6(ctx);
+
+ return {
+ c() {
+ if (if_block) if_block.c();
+ if_block_anchor = empty();
+ },
+ m(target, anchor) {
+ if (if_block) if_block.m(target, anchor);
+ insert(target, if_block_anchor, anchor);
+ },
+ p(ctx, dirty) {
+ if (/*tagHeaders*/ ctx[3]) {
+ if (if_block) {
+ if_block.p(ctx, dirty);
+ } else {
+ if_block = create_if_block_2$6(ctx);
+ if_block.c();
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
+ }
+ } else if (if_block) {
+ if_block.d(1);
+ if_block = null;
+ }
+ },
+ d(detaching) {
+ if (if_block) if_block.d(detaching);
+ if (detaching) detach(if_block_anchor);
+ }
+ };
+ }
+
+ // (170:6) {#if tagHeaders}
+ function create_if_block_2$6(ctx) {
+ let ul1;
+ let li;
+ let ul0;
+ let each_value_2 = /*tagHeaders*/ ctx[3];
+ let each_blocks = [];
+
+ for (let i = 0; i < each_value_2.length; i += 1) {
+ each_blocks[i] = create_each_block_2$1(get_each_context_2$1(ctx, each_value_2, i));
+ }
+
+ return {
+ c() {
+ ul1 = element("ul");
+ li = element("li");
+ ul0 = element("ul");
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].c();
+ }
+
+ attr(ul1, "class", "menu-list");
+ },
+ m(target, anchor) {
+ insert(target, ul1, anchor);
+ append(ul1, li);
+ append(li, ul0);
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].m(ul0, null);
+ }
+ },
+ p(ctx, dirty) {
+ if (dirty & /*headerLink, tagHeaders, tocClick*/ 136) {
+ each_value_2 = /*tagHeaders*/ ctx[3];
+ let i;
+
+ for (i = 0; i < each_value_2.length; i += 1) {
+ const child_ctx = get_each_context_2$1(ctx, each_value_2, i);
+
+ if (each_blocks[i]) {
+ each_blocks[i].p(child_ctx, dirty);
+ } else {
+ each_blocks[i] = create_each_block_2$1(child_ctx);
+ each_blocks[i].c();
+ each_blocks[i].m(ul0, null);
+ }
+ }
+
+ for (; i < each_blocks.length; i += 1) {
+ each_blocks[i].d(1);
+ }
+
+ each_blocks.length = each_value_2.length;
+ }
+ },
+ d(detaching) {
+ if (detaching) detach(ul1);
+ destroy_each(each_blocks, detaching);
+ }
+ };
+ }
+
+ // (175:16) {#if header.level === 0}
+ function create_if_block_3$2(ctx) {
+ let li;
+ let a;
+ let t0_value = /*header*/ ctx[16].text + "";
+ let t0;
+ let a_href_value;
+ let t1;
+ let dispose;
+
+ return {
+ c() {
+ li = element("li");
+ a = element("a");
+ t0 = text(t0_value);
+ t1 = space();
+ attr(a, "href", a_href_value = "#" + headerLink(/*header*/ ctx[16].text));
+ },
+ m(target, anchor) {
+ insert(target, li, anchor);
+ append(li, a);
+ append(a, t0);
+ append(li, t1);
+
+ dispose = listen(a, "click", prevent_default(function () {
+ if (is_function(/*tocClick*/ ctx[7])) /*tocClick*/ ctx[7].apply(this, arguments);
+ }));
+ },
+ p(new_ctx, dirty) {
+ ctx = new_ctx;
+ if (dirty & /*tagHeaders*/ 8 && t0_value !== (t0_value = /*header*/ ctx[16].text + "")) set_data(t0, t0_value);
+
+ if (dirty & /*tagHeaders*/ 8 && a_href_value !== (a_href_value = "#" + headerLink(/*header*/ ctx[16].text))) {
+ attr(a, "href", a_href_value);
+ }
+ },
+ d(detaching) {
+ if (detaching) detach(li);
+ dispose();
+ }
+ };
+ }
+
+ // (174:14) {#each tagHeaders as header}
+ function create_each_block_2$1(ctx) {
+ let if_block_anchor;
+ let if_block = /*header*/ ctx[16].level === 0 && create_if_block_3$2(ctx);
+
+ return {
+ c() {
+ if (if_block) if_block.c();
+ if_block_anchor = empty();
+ },
+ m(target, anchor) {
+ if (if_block) if_block.m(target, anchor);
+ insert(target, if_block_anchor, anchor);
+ },
+ p(ctx, dirty) {
+ if (/*header*/ ctx[16].level === 0) {
+ if (if_block) {
+ if_block.p(ctx, dirty);
+ } else {
+ if_block = create_if_block_3$2(ctx);
+ if_block.c();
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
+ }
+ } else if (if_block) {
+ if_block.d(1);
+ if_block = null;
+ }
+ },
+ d(detaching) {
+ if (if_block) if_block.d(detaching);
+ if (detaching) detach(if_block_anchor);
+ }
+ };
+ }
+
+ // (192:6) {#if tag.title}
+ function create_if_block$e(ctx) {
+ let p;
+ let a;
+ let t_value = /*tag*/ ctx[10].title + "";
+ let t;
+ let a_href_value;
+ let dispose;
+
+ return {
+ c() {
+ p = element("p");
+ a = element("a");
+ t = text(t_value);
+ attr(a, "href", a_href_value = buildHref(`#/rg~${slugify(/*tag*/ ctx[10].title)}`));
+ attr(a, "class", "is-inline-block");
+ attr(p, "class", "menu-label");
+ },
+ m(target, anchor) {
+ insert(target, p, anchor);
+ append(p, a);
+ append(a, t);
+ dispose = listen(a, "click", handleLink);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*tagActions*/ 4 && t_value !== (t_value = /*tag*/ ctx[10].title + "")) set_data(t, t_value);
+
+ if (dirty & /*tagActions*/ 4 && a_href_value !== (a_href_value = buildHref(`#/rg~${slugify(/*tag*/ ctx[10].title)}`))) {
+ attr(a, "href", a_href_value);
+ }
+ },
+ d(detaching) {
+ if (detaching) detach(p);
+ dispose();
+ }
+ };
+ }
+
+ // (204:8) {#each tag.children as child}
+ function create_each_block_1$3(ctx) {
+ let current;
+
+ const menuitem = new MenuItem({
+ props: {
+ title: /*child*/ ctx[13].title,
+ actions: /*child*/ ctx[13].actions,
+ hidden: /*actionsCount*/ ctx[4] > 50,
+ parentSlug: slugify(/*tag*/ ctx[10].title)
+ }
+ });
+
+ return {
+ c() {
+ create_component(menuitem.$$.fragment);
+ },
+ m(target, anchor) {
+ mount_component(menuitem, target, anchor);
+ current = true;
+ },
+ p(ctx, dirty) {
+ const menuitem_changes = {};
+ if (dirty & /*tagActions*/ 4) menuitem_changes.title = /*child*/ ctx[13].title;
+ if (dirty & /*tagActions*/ 4) menuitem_changes.actions = /*child*/ ctx[13].actions;
+ if (dirty & /*actionsCount*/ 16) menuitem_changes.hidden = /*actionsCount*/ ctx[4] > 50;
+ if (dirty & /*tagActions*/ 4) menuitem_changes.parentSlug = slugify(/*tag*/ ctx[10].title);
+ menuitem.$set(menuitem_changes);
+ },
+ i(local) {
+ if (current) return;
+ transition_in(menuitem.$$.fragment, local);
+ current = true;
+ },
+ o(local) {
+ transition_out(menuitem.$$.fragment, local);
+ current = false;
+ },
+ d(detaching) {
+ destroy_component(menuitem, detaching);
+ }
+ };
+ }
+
+ // (191:4) {#each tagActions as tag}
+ function create_each_block$6(ctx) {
+ let t0;
+ let ul;
+ let t1;
+ let current;
+ let if_block = /*tag*/ ctx[10].title && create_if_block$e(ctx);
+ let each_value_1 = /*tag*/ ctx[10].children;
+ let each_blocks = [];
+
+ for (let i = 0; i < each_value_1.length; i += 1) {
+ each_blocks[i] = create_each_block_1$3(get_each_context_1$3(ctx, each_value_1, i));
+ }
+
+ const out = i => transition_out(each_blocks[i], 1, 1, () => {
+ each_blocks[i] = null;
+ });
+
+ return {
+ c() {
+ if (if_block) if_block.c();
+ t0 = space();
+ ul = element("ul");
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].c();
+ }
+
+ t1 = space();
+ attr(ul, "class", "menu-list");
+ },
+ m(target, anchor) {
+ if (if_block) if_block.m(target, anchor);
+ insert(target, t0, anchor);
+ insert(target, ul, anchor);
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].m(ul, null);
+ }
+
+ append(ul, t1);
+ current = true;
+ },
+ p(ctx, dirty) {
+ if (/*tag*/ ctx[10].title) {
+ if (if_block) {
+ if_block.p(ctx, dirty);
+ } else {
+ if_block = create_if_block$e(ctx);
+ if_block.c();
+ if_block.m(t0.parentNode, t0);
+ }
+ } else if (if_block) {
+ if_block.d(1);
+ if_block = null;
+ }
+
+ if (dirty & /*tagActions, actionsCount, slugify*/ 20) {
+ each_value_1 = /*tag*/ ctx[10].children;
+ let i;
+
+ for (i = 0; i < each_value_1.length; i += 1) {
+ const child_ctx = get_each_context_1$3(ctx, each_value_1, i);
+
+ if (each_blocks[i]) {
+ each_blocks[i].p(child_ctx, dirty);
+ transition_in(each_blocks[i], 1);
+ } else {
+ each_blocks[i] = create_each_block_1$3(child_ctx);
+ each_blocks[i].c();
+ transition_in(each_blocks[i], 1);
+ each_blocks[i].m(ul, t1);
+ }
+ }
+
+ group_outros();
+
+ for (i = each_value_1.length; i < each_blocks.length; i += 1) {
+ out(i);
+ }
+
+ check_outros();
+ }
+ },
+ i(local) {
+ if (current) return;
+
+ for (let i = 0; i < each_value_1.length; i += 1) {
+ transition_in(each_blocks[i]);
+ }
+
+ current = true;
+ },
+ o(local) {
+ each_blocks = each_blocks.filter(Boolean);
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ transition_out(each_blocks[i]);
+ }
+
+ current = false;
+ },
+ d(detaching) {
+ if (if_block) if_block.d(detaching);
+ if (detaching) detach(t0);
+ if (detaching) detach(ul);
+ destroy_each(each_blocks, detaching);
+ }
+ };
+ }
+
+ function create_fragment$k(ctx) {
+ let aside;
+ let section;
+ let div1;
+ let div0;
+ let p0;
+ let input;
+ let t0;
+ let span;
+ let t1;
+ let div2;
+ let p1;
+ let a;
+ let t2;
+ let a_href_value;
+ let t3;
+ let t4;
+ let current;
+ let dispose;
+ let if_block = /*query*/ ctx[0] === "" && create_if_block_1$b(ctx);
+ let each_value = /*tagActions*/ ctx[2];
+ let each_blocks = [];
+
+ for (let i = 0; i < each_value.length; i += 1) {
+ each_blocks[i] = create_each_block$6(get_each_context$6(ctx, each_value, i));
+ }
+
+ const out = i => transition_out(each_blocks[i], 1, 1, () => {
+ each_blocks[i] = null;
+ });
+
+ return {
+ c() {
+ aside = element("aside");
+ section = element("section");
+ div1 = element("div");
+ div0 = element("div");
+ p0 = element("p");
+ input = element("input");
+ t0 = space();
+ span = element("span");
+ span.innerHTML = ``;
+ t1 = space();
+ div2 = element("div");
+ p1 = element("p");
+ a = element("a");
+ t2 = text(/*title*/ ctx[1]);
+ t3 = space();
+ if (if_block) if_block.c();
+ t4 = space();
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].c();
+ }
+
+ attr(input, "id", "search-input-text");
+ attr(input, "class", "input is-rounded svelte-fvssqr");
+ attr(input, "placeholder", "Filter by path, method, and title...");
+ attr(span, "class", "icon is-right icon-input-search svelte-fvssqr");
+ attr(p0, "class", "control has-icons-right");
+ attr(div0, "class", "field");
+ attr(div1, "class", "hero-body svelte-fvssqr");
+ toggle_class(div1, "is-darkmode", /*isDarkmode*/ ctx[6]);
+ attr(section, "class", "hero is-sticky svelte-fvssqr");
+ toggle_class(section, "is-darkmode", /*isDarkmode*/ ctx[6]);
+ attr(a, "href", a_href_value = buildHref(""));
+ attr(p1, "class", "menu-label");
+ attr(div2, "class", "menu-wrapper svelte-fvssqr");
+ attr(aside, "class", "menu svelte-fvssqr");
+ toggle_class(aside, "is-collapsed", /*isCollapsed*/ ctx[5]);
+ },
+ m(target, anchor) {
+ insert(target, aside, anchor);
+ append(aside, section);
+ append(section, div1);
+ append(div1, div0);
+ append(div0, p0);
+ append(p0, input);
+ set_input_value(input, /*query*/ ctx[0]);
+ append(p0, t0);
+ append(p0, span);
+ append(aside, t1);
+ append(aside, div2);
+ append(div2, p1);
+ append(p1, a);
+ append(a, t2);
+ append(div2, t3);
+ if (if_block) if_block.m(div2, null);
+ append(div2, t4);
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].m(div2, null);
+ }
+
+ current = true;
+
+ dispose = [
+ listen(input, "input", /*input_input_handler*/ ctx[9]),
+ listen(span, "click", function () {
+ if (is_function(/*searchClick*/ ctx[8])) /*searchClick*/ ctx[8].apply(this, arguments);
+ }),
+ listen(a, "click", prevent_default(function () {
+ if (is_function(/*tocClick*/ ctx[7])) /*tocClick*/ ctx[7].apply(this, arguments);
+ }))
+ ];
+ },
+ p(new_ctx, [dirty]) {
+ ctx = new_ctx;
+
+ if (dirty & /*query*/ 1 && input.value !== /*query*/ ctx[0]) {
+ set_input_value(input, /*query*/ ctx[0]);
+ }
+
+ if (dirty & /*isDarkmode*/ 64) {
+ toggle_class(div1, "is-darkmode", /*isDarkmode*/ ctx[6]);
+ }
+
+ if (dirty & /*isDarkmode*/ 64) {
+ toggle_class(section, "is-darkmode", /*isDarkmode*/ ctx[6]);
+ }
+
+ if (!current || dirty & /*title*/ 2) set_data(t2, /*title*/ ctx[1]);
+
+ if (/*query*/ ctx[0] === "") {
+ if (if_block) {
+ if_block.p(ctx, dirty);
+ } else {
+ if_block = create_if_block_1$b(ctx);
+ if_block.c();
+ if_block.m(div2, t4);
+ }
+ } else if (if_block) {
+ if_block.d(1);
+ if_block = null;
+ }
+
+ if (dirty & /*tagActions, actionsCount, slugify, buildHref, handleLink*/ 20) {
+ each_value = /*tagActions*/ ctx[2];
+ let i;
+
+ for (i = 0; i < each_value.length; i += 1) {
+ const child_ctx = get_each_context$6(ctx, each_value, i);
+
+ if (each_blocks[i]) {
+ each_blocks[i].p(child_ctx, dirty);
+ transition_in(each_blocks[i], 1);
+ } else {
+ each_blocks[i] = create_each_block$6(child_ctx);
+ each_blocks[i].c();
+ transition_in(each_blocks[i], 1);
+ each_blocks[i].m(div2, null);
+ }
+ }
+
+ group_outros();
+
+ for (i = each_value.length; i < each_blocks.length; i += 1) {
+ out(i);
+ }
+
+ check_outros();
+ }
+
+ if (dirty & /*isCollapsed*/ 32) {
+ toggle_class(aside, "is-collapsed", /*isCollapsed*/ ctx[5]);
+ }
+ },
+ i(local) {
+ if (current) return;
+
+ for (let i = 0; i < each_value.length; i += 1) {
+ transition_in(each_blocks[i]);
+ }
+
+ current = true;
+ },
+ o(local) {
+ each_blocks = each_blocks.filter(Boolean);
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ transition_out(each_blocks[i]);
+ }
+
+ current = false;
+ },
+ d(detaching) {
+ if (detaching) detach(aside);
+ if (if_block) if_block.d();
+ destroy_each(each_blocks, detaching);
+ run_all(dispose);
+ }
+ };
+ }
+
+ function headerLink(text) {
+ return text.toLowerCase().replace(/\s/g, "-");
+ }
+
+ function instance$k($$self, $$props, $$invalidate) {
+ let { title } = $$props;
+ let { tagActions = [] } = $$props;
+ let { tagHeaders = [] } = $$props;
+ let { actionsCount } = $$props;
+ let { isCollapsed } = $$props;
+ let { isDarkmode } = $$props;
+ let { tocClick } = $$props;
+ let { searchClick } = $$props;
+ let { query } = $$props;
+
+ function input_input_handler() {
+ query = this.value;
+ $$invalidate(0, query);
+ }
+
+ $$self.$set = $$props => {
+ if ("title" in $$props) $$invalidate(1, title = $$props.title);
+ if ("tagActions" in $$props) $$invalidate(2, tagActions = $$props.tagActions);
+ if ("tagHeaders" in $$props) $$invalidate(3, tagHeaders = $$props.tagHeaders);
+ if ("actionsCount" in $$props) $$invalidate(4, actionsCount = $$props.actionsCount);
+ if ("isCollapsed" in $$props) $$invalidate(5, isCollapsed = $$props.isCollapsed);
+ if ("isDarkmode" in $$props) $$invalidate(6, isDarkmode = $$props.isDarkmode);
+ if ("tocClick" in $$props) $$invalidate(7, tocClick = $$props.tocClick);
+ if ("searchClick" in $$props) $$invalidate(8, searchClick = $$props.searchClick);
+ if ("query" in $$props) $$invalidate(0, query = $$props.query);
+ };
+
+ return [
+ query,
+ title,
+ tagActions,
+ tagHeaders,
+ actionsCount,
+ isCollapsed,
+ isDarkmode,
+ tocClick,
+ searchClick,
+ input_input_handler
+ ];
+ }
+
+ class MenuPanel extends SvelteComponent {
+ constructor(options) {
+ super();
+ if (!document.getElementById("svelte-fvssqr-style")) add_css$a();
+
+ init(this, options, instance$k, create_fragment$k, safe_not_equal, {
+ title: 1,
+ tagActions: 2,
+ tagHeaders: 3,
+ actionsCount: 4,
+ isCollapsed: 5,
+ isDarkmode: 6,
+ tocClick: 7,
+ searchClick: 8,
+ query: 0
+ });
+ }
+ }
+
+ /* usr/local/lib/node_modules/snowboard/templates/winter/components/LogoutButton.svelte generated by Svelte v3.19.2 */
+
+ function create_fragment$l(ctx) {
+ let a;
+ let dispose;
+
+ return {
+ c() {
+ a = element("a");
+
+ a.innerHTML = `
+ Logout`;
+
+ attr(a, "href", "javascript:void(0)");
+ attr(a, "class", "button is-light");
+ },
+ m(target, anchor) {
+ insert(target, a, anchor);
+ dispose = listen(a, "click", /*handleClick*/ ctx[0]);
+ },
+ p: noop,
+ i: noop,
+ o: noop,
+ d(detaching) {
+ if (detaching) detach(a);
+ dispose();
+ }
+ };
+ }
+
+ function instance$l($$self, $$props, $$invalidate) {
+ let $env;
+ component_subscribe($$self, env, $$value => $$invalidate(1, $env = $$value));
+
+ function handleClick() {
+ auth.remove($env);
+ removeToken($env);
+ removeRefreshToken($env);
+ }
+
+ return [handleClick];
+ }
+
+ class LogoutButton extends SvelteComponent {
+ constructor(options) {
+ super();
+ init(this, options, instance$l, create_fragment$l, safe_not_equal, {});
+ }
+ }
+
+ /* usr/local/lib/node_modules/snowboard/templates/winter/panels/SelectorPanel.svelte generated by Svelte v3.19.2 */
+
+ function add_css$b() {
+ var style = element("style");
+ style.id = "svelte-cjzzpf-style";
+ style.textContent = ".icon-info.svelte-cjzzpf{cursor:pointer}.content.svelte-cjzzpf{padding:1rem 1.5rem}";
+ append(document.head, style);
+ }
+
+ function get_each_context$7(ctx, list, i) {
+ const child_ctx = ctx.slice();
+ child_ctx[10] = list[i];
+ return child_ctx;
+ }
+
+ // (52:0) {#if isAuth(environment, 'oauth2')}
+ function create_if_block_1$c(ctx) {
+ let current_block_type_index;
+ let if_block;
+ let if_block_anchor;
+ let current;
+ const if_block_creators = [create_if_block_2$7, create_if_block_3$3, create_else_block_1$2];
+ const if_blocks = [];
+
+ function select_block_type(ctx, dirty) {
+ if (/*authenticating*/ ctx[1]) return 0;
+ if (/*authenticated*/ ctx[3]) return 1;
+ return 2;
+ }
+
+ current_block_type_index = select_block_type(ctx, -1);
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
+
+ return {
+ c() {
+ if_block.c();
+ if_block_anchor = empty();
+ },
+ m(target, anchor) {
+ if_blocks[current_block_type_index].m(target, anchor);
+ insert(target, if_block_anchor, anchor);
+ current = true;
+ },
+ p(ctx, dirty) {
+ let previous_block_index = current_block_type_index;
+ current_block_type_index = select_block_type(ctx, dirty);
+
+ if (current_block_type_index === previous_block_index) {
+ if_blocks[current_block_type_index].p(ctx, dirty);
+ } else {
+ group_outros();
+
+ transition_out(if_blocks[previous_block_index], 1, 1, () => {
+ if_blocks[previous_block_index] = null;
+ });
+
+ check_outros();
+ if_block = if_blocks[current_block_type_index];
+
+ if (!if_block) {
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
+ if_block.c();
+ }
+
+ transition_in(if_block, 1);
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
+ }
+ },
+ i(local) {
+ if (current) return;
+ transition_in(if_block);
+ current = true;
+ },
+ o(local) {
+ transition_out(if_block);
+ current = false;
+ },
+ d(detaching) {
+ if_blocks[current_block_type_index].d(detaching);
+ if (detaching) detach(if_block_anchor);
+ }
+ };
+ }
+
+ // (67:2) {:else}
+ function create_else_block_1$2(ctx) {
+ let div1;
+ let div0;
+ let p;
+ let current;
+
+ const loginbutton = new LoginButton({
+ props: {
+ authOptions: /*environment*/ ctx[5].auth.options,
+ isPKCE: isPKCE(/*environment*/ ctx[5]),
+ pkceChallenge: /*pkceChallenge*/ ctx[2]
+ }
+ });
+
+ return {
+ c() {
+ div1 = element("div");
+ div0 = element("div");
+ p = element("p");
+ create_component(loginbutton.$$.fragment);
+ attr(p, "class", "control");
+ attr(div0, "class", "field is-grouped");
+ attr(div1, "class", "navbar-item");
+ },
+ m(target, anchor) {
+ insert(target, div1, anchor);
+ append(div1, div0);
+ append(div0, p);
+ mount_component(loginbutton, p, null);
+ current = true;
+ },
+ p(ctx, dirty) {
+ const loginbutton_changes = {};
+ if (dirty & /*environment*/ 32) loginbutton_changes.authOptions = /*environment*/ ctx[5].auth.options;
+ if (dirty & /*environment*/ 32) loginbutton_changes.isPKCE = isPKCE(/*environment*/ ctx[5]);
+ if (dirty & /*pkceChallenge*/ 4) loginbutton_changes.pkceChallenge = /*pkceChallenge*/ ctx[2];
+ loginbutton.$set(loginbutton_changes);
+ },
+ i(local) {
+ if (current) return;
+ transition_in(loginbutton.$$.fragment, local);
+ current = true;
+ },
+ o(local) {
+ transition_out(loginbutton.$$.fragment, local);
+ current = false;
+ },
+ d(detaching) {
+ if (detaching) detach(div1);
+ destroy_component(loginbutton);
+ }
+ };
+ }
+
+ // (59:26)
+ function create_if_block_3$3(ctx) {
+ let div1;
+ let div0;
+ let p;
+ let current;
+ const logoutbutton = new LogoutButton({});
+
+ return {
+ c() {
+ div1 = element("div");
+ div0 = element("div");
+ p = element("p");
+ create_component(logoutbutton.$$.fragment);
+ attr(p, "class", "control");
+ attr(div0, "class", "field is-grouped");
+ attr(div1, "class", "navbar-item");
+ },
+ m(target, anchor) {
+ insert(target, div1, anchor);
+ append(div1, div0);
+ append(div0, p);
+ mount_component(logoutbutton, p, null);
+ current = true;
+ },
+ p: noop,
+ i(local) {
+ if (current) return;
+ transition_in(logoutbutton.$$.fragment, local);
+ current = true;
+ },
+ o(local) {
+ transition_out(logoutbutton.$$.fragment, local);
+ current = false;
+ },
+ d(detaching) {
+ if (detaching) detach(div1);
+ destroy_component(logoutbutton);
+ }
+ };
+ }
+
+ // (53:2) {#if authenticating}
+ function create_if_block_2$7(ctx) {
+ let div;
+
+ return {
+ c() {
+ div = element("div");
+ div.innerHTML = ``;
+ attr(div, "class", "navbar-item");
+ },
+ m(target, anchor) {
+ insert(target, div, anchor);
+ },
+ p: noop,
+ i: noop,
+ o: noop,
+ d(detaching) {
+ if (detaching) detach(div);
+ }
+ };
+ }
+
+ // (87:4) {#each Object.keys(environments) as envName}
+ function create_each_block$7(ctx) {
+ let a;
+ let t0_value = /*envName*/ ctx[10] + "";
+ let t0;
+ let t1;
+ let a_data_name_value;
+ let dispose;
+
+ return {
+ c() {
+ a = element("a");
+ t0 = text(t0_value);
+ t1 = space();
+ attr(a, "data-name", a_data_name_value = /*envName*/ ctx[10]);
+ attr(a, "href", "javascript:void(0)");
+ attr(a, "class", "navbar-item");
+ },
+ m(target, anchor) {
+ insert(target, a, anchor);
+ append(a, t0);
+ append(a, t1);
+ dispose = listen(a, "click", /*handleClick*/ ctx[7]);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*environments*/ 1 && t0_value !== (t0_value = /*envName*/ ctx[10] + "")) set_data(t0, t0_value);
+
+ if (dirty & /*environments*/ 1 && a_data_name_value !== (a_data_name_value = /*envName*/ ctx[10])) {
+ attr(a, "data-name", a_data_name_value);
+ }
+ },
+ d(detaching) {
+ if (detaching) detach(a);
+ dispose();
+ }
+ };
+ }
+
+ // (113:8) {:else}
+ function create_else_block$7(ctx) {
+ let span;
+
+ return {
+ c() {
+ span = element("span");
+ span.textContent = "None";
+ attr(span, "class", "is-capitalized");
+ },
+ m(target, anchor) {
+ insert(target, span, anchor);
+ },
+ p: noop,
+ d(detaching) {
+ if (detaching) detach(span);
+ }
+ };
+ }
+
+ // (111:8) {#if environment.auth}
+ function create_if_block$f(ctx) {
+ let span;
+ let t_value = /*environment*/ ctx[5].auth.name + "";
+ let t;
+
+ return {
+ c() {
+ span = element("span");
+ t = text(t_value);
+ attr(span, "class", "is-capitalized");
+ },
+ m(target, anchor) {
+ insert(target, span, anchor);
+ append(span, t);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*environment*/ 32 && t_value !== (t_value = /*environment*/ ctx[5].auth.name + "")) set_data(t, t_value);
+ },
+ d(detaching) {
+ if (detaching) detach(span);
+ }
+ };
+ }
+
+ function create_fragment$m(ctx) {
+ let show_if = isAuth(/*environment*/ ctx[5], "oauth2");
+ let t0;
+ let div1;
+ let a0;
+ let t1;
+ let t2;
+ let div0;
+ let t3;
+ let div4;
+ let a1;
+ let t4;
+ let div3;
+ let div2;
+ let p0;
+ let t5;
+ let t6_value = /*environment*/ ctx[5].url + "";
+ let t6;
+ let t7;
+ let p1;
+ let t8;
+ let current;
+ let dispose;
+ let if_block0 = show_if && create_if_block_1$c(ctx);
+ let each_value = Object.keys(/*environments*/ ctx[0]);
+ let each_blocks = [];
+
+ for (let i = 0; i < each_value.length; i += 1) {
+ each_blocks[i] = create_each_block$7(get_each_context$7(ctx, each_value, i));
+ }
+
+ function select_block_type_1(ctx, dirty) {
+ if (/*environment*/ ctx[5].auth) return create_if_block$f;
+ return create_else_block$7;
+ }
+
+ let current_block_type = select_block_type_1(ctx, -1);
+ let if_block1 = current_block_type(ctx);
+
+ return {
+ c() {
+ if (if_block0) if_block0.c();
+ t0 = space();
+ div1 = element("div");
+ a0 = element("a");
+ t1 = text(/*$env*/ ctx[6]);
+ t2 = space();
+ div0 = element("div");
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].c();
+ }
+
+ t3 = space();
+ div4 = element("div");
+ a1 = element("a");
+ a1.innerHTML = ``;
+ t4 = space();
+ div3 = element("div");
+ div2 = element("div");
+ p0 = element("p");
+ t5 = text("BaseURL: ");
+ t6 = text(t6_value);
+ t7 = space();
+ p1 = element("p");
+ t8 = text("Auth:\n ");
+ if_block1.c();
+ attr(a0, "href", "javascript:void(0)");
+ attr(a0, "class", "navbar-link");
+ attr(div0, "class", "navbar-dropdown is-right");
+ attr(div1, "class", "navbar-item has-dropdown is-capitalized");
+ toggle_class(div1, "is-active", /*show*/ ctx[4]);
+ attr(a1, "href", "javascript:void(0)");
+ attr(a1, "class", "navbar-link is-arrowless");
+ attr(div2, "class", "content svelte-cjzzpf");
+ attr(div3, "class", "navbar-dropdown is-right");
+ attr(div4, "class", "navbar-item has-dropdown is-hoverable");
+ },
+ m(target, anchor) {
+ if (if_block0) if_block0.m(target, anchor);
+ insert(target, t0, anchor);
+ insert(target, div1, anchor);
+ append(div1, a0);
+ append(a0, t1);
+ append(div1, t2);
+ append(div1, div0);
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].m(div0, null);
+ }
+
+ insert(target, t3, anchor);
+ insert(target, div4, anchor);
+ append(div4, a1);
+ append(div4, t4);
+ append(div4, div3);
+ append(div3, div2);
+ append(div2, p0);
+ append(p0, t5);
+ append(p0, t6);
+ append(div2, t7);
+ append(div2, p1);
+ append(p1, t8);
+ if_block1.m(p1, null);
+ current = true;
+ dispose = listen(a0, "click", /*toggleClick*/ ctx[8]);
+ },
+ p(ctx, [dirty]) {
+ if (dirty & /*environment*/ 32) show_if = isAuth(/*environment*/ ctx[5], "oauth2");
+
+ if (show_if) {
+ if (if_block0) {
+ if_block0.p(ctx, dirty);
+ transition_in(if_block0, 1);
+ } else {
+ if_block0 = create_if_block_1$c(ctx);
+ if_block0.c();
+ transition_in(if_block0, 1);
+ if_block0.m(t0.parentNode, t0);
+ }
+ } else if (if_block0) {
+ group_outros();
+
+ transition_out(if_block0, 1, 1, () => {
+ if_block0 = null;
+ });
+
+ check_outros();
+ }
+
+ if (!current || dirty & /*$env*/ 64) set_data(t1, /*$env*/ ctx[6]);
+
+ if (dirty & /*Object, environments, handleClick*/ 129) {
+ each_value = Object.keys(/*environments*/ ctx[0]);
+ let i;
+
+ for (i = 0; i < each_value.length; i += 1) {
+ const child_ctx = get_each_context$7(ctx, each_value, i);
+
+ if (each_blocks[i]) {
+ each_blocks[i].p(child_ctx, dirty);
+ } else {
+ each_blocks[i] = create_each_block$7(child_ctx);
+ each_blocks[i].c();
+ each_blocks[i].m(div0, null);
+ }
+ }
+
+ for (; i < each_blocks.length; i += 1) {
+ each_blocks[i].d(1);
+ }
+
+ each_blocks.length = each_value.length;
+ }
+
+ if (dirty & /*show*/ 16) {
+ toggle_class(div1, "is-active", /*show*/ ctx[4]);
+ }
+
+ if ((!current || dirty & /*environment*/ 32) && t6_value !== (t6_value = /*environment*/ ctx[5].url + "")) set_data(t6, t6_value);
+
+ if (current_block_type === (current_block_type = select_block_type_1(ctx, dirty)) && if_block1) {
+ if_block1.p(ctx, dirty);
+ } else {
+ if_block1.d(1);
+ if_block1 = current_block_type(ctx);
+
+ if (if_block1) {
+ if_block1.c();
+ if_block1.m(p1, null);
+ }
+ }
+ },
+ i(local) {
+ if (current) return;
+ transition_in(if_block0);
+ current = true;
+ },
+ o(local) {
+ transition_out(if_block0);
+ current = false;
+ },
+ d(detaching) {
+ if (if_block0) if_block0.d(detaching);
+ if (detaching) detach(t0);
+ if (detaching) detach(div1);
+ destroy_each(each_blocks, detaching);
+ if (detaching) detach(t3);
+ if (detaching) detach(div4);
+ if_block1.d();
+ dispose();
+ }
+ };
+ }
+
+ function instance$m($$self, $$props, $$invalidate) {
+ let $env;
+ let $auth;
+ component_subscribe($$self, env, $$value => $$invalidate(6, $env = $$value));
+ component_subscribe($$self, auth, $$value => $$invalidate(9, $auth = $$value));
+ let { environments } = $$props;
+ let { authenticating } = $$props;
+ let { pkceChallenge } = $$props;
+ let authenticated = false;
+ let show = false;
+
+ function handleClick(event) {
+ $$invalidate(4, show = false);
+ const envName = event.target.dataset["name"];
+ env.set(envName);
+ const authToken = getToken($env);
+
+ if (authToken) {
+ auth.add(envName);
+ token$1.set(authToken);
+ } else {
+ auth.remove(envName);
+ token$1.set(null);
+ }
+ }
+
+ function toggleClick() {
+ $$invalidate(4, show = !show);
+ }
+
+ $$self.$set = $$props => {
+ if ("environments" in $$props) $$invalidate(0, environments = $$props.environments);
+ if ("authenticating" in $$props) $$invalidate(1, authenticating = $$props.authenticating);
+ if ("pkceChallenge" in $$props) $$invalidate(2, pkceChallenge = $$props.pkceChallenge);
+ };
+
+ let environment;
+
+ $$self.$$.update = () => {
+ if ($$self.$$.dirty & /*environments, $env*/ 65) {
+ $$invalidate(5, environment = environments[$env]);
+ }
+
+ if ($$self.$$.dirty & /*$auth, $env*/ 576) {
+ {
+ $$invalidate(3, authenticated = $auth.split(";").includes($env));
+ }
+ }
+ };
+
+ return [
+ environments,
+ authenticating,
+ pkceChallenge,
+ authenticated,
+ show,
+ environment,
+ $env,
+ handleClick,
+ toggleClick
+ ];
+ }
+
+ class SelectorPanel extends SvelteComponent {
+ constructor(options) {
+ super();
+ if (!document.getElementById("svelte-cjzzpf-style")) add_css$b();
+
+ init(this, options, instance$m, create_fragment$m, safe_not_equal, {
+ environments: 0,
+ authenticating: 1,
+ pkceChallenge: 2
+ });
+ }
+ }
+
+ /* usr/local/lib/node_modules/snowboard/templates/winter.svelte generated by Svelte v3.19.2 */
+
+ const { document: document_1 } = globals;
+
+ function add_css$c() {
+ var style = element("style");
+ style.id = "svelte-1s8fs56-style";
+ style.textContent = "html{height:100%}body{min-height:100%}.sidenav.svelte-1s8fs56.svelte-1s8fs56{padding:1rem 0 1rem 0.75rem}.main.svelte-1s8fs56.svelte-1s8fs56{padding:3rem;background-color:#fff;box-shadow:0 2px 0 2px #f5f5f5}.main.is-darkmode.svelte-1s8fs56.svelte-1s8fs56{background-color:#000;box-shadow:0 2px 0 2px #363636}.body-inner.svelte-1s8fs56.svelte-1s8fs56{min-height:100vh;background-color:#fafafa}.body-inner.is-darkmode.svelte-1s8fs56.svelte-1s8fs56{background-color:#000}.is-darkmode .input, .is-darkmode .select select, .is-darkmode\n .textarea{background-color:#484848;border-color:#484848;color:#fff}.is-darkmode .input:hover, .is-darkmode\n .is-hovered.input, .is-darkmode .is-hovered.textarea, .is-darkmode\n .select\n select.is-hovered, .is-darkmode .select select:hover, .is-darkmode\n .textarea:hover{border-color:#666}.is-darkmode .select select.is-focused, .is-darkmode\n .select\n select:active, .is-darkmode .select select:focus, .is-darkmode\n .textarea:active, .is-darkmode .textarea:focus{border-color:#888}.is-darkmode .input::placeholder, .is-darkmode\n .select\n select::placeholder, .is-darkmode .textarea::placeholder{color:#ccc}code[class*=\"language-\"], pre[class*=\"language-\"]{font-family:monospace}.token.number, .token.tag{display:inline;padding:inherit;font-size:inherit;line-height:inherit;text-align:inherit;vertical-align:inherit;border-radius:inherit;font-weight:inherit;white-space:inherit;background:inherit;margin:inherit}.icon-brand.svelte-1s8fs56.svelte-1s8fs56{margin-right:0.5rem}.menu-collapsible.svelte-1s8fs56.svelte-1s8fs56{display:none;position:fixed;width:calc(25% - 0.5rem);height:calc(2.5rem + 10px);left:0;bottom:0;font-size:1.33333em;line-height:calc(2.5rem + 5px);text-align:center;color:#b5b5b5;font-weight:300;border-top:1px solid #eee;box-shadow:2px 0 0 #f5f5f5;cursor:pointer}.menu-collapsible.svelte-1s8fs56.svelte-1s8fs56:hover{background:rgba(0, 0, 0, 0.05);box-shadow:2px 0 0 #eee;border-color:#e8e8e8}.menu-collapsible.is-darkmode.svelte-1s8fs56.svelte-1s8fs56{border-color:#363636;box-shadow:2px 0 0 #363636}.menu-collapsible.is-darkmode.svelte-1s8fs56.svelte-1s8fs56:hover{background:rgba(255, 255, 255, 0.2);border-color:#363636;box-shadow:2px 0 0 #363636}.footer.is-darkmode.svelte-1s8fs56.svelte-1s8fs56{background-color:#000}.footer.svelte-1s8fs56 .content.svelte-1s8fs56{transition:margin 0.3s}@media screen and (min-width: 768px){.menu-collapsible.svelte-1s8fs56.svelte-1s8fs56{display:block}.is-collapsed.svelte-1s8fs56 .sidenav.svelte-1s8fs56{width:3.75rem}.is-collapsed.svelte-1s8fs56 .main.svelte-1s8fs56{width:calc(100% - 4.5rem)}.is-collapsed.svelte-1s8fs56 .menu-collapsible.svelte-1s8fs56{width:calc(3rem - 2px)}.menu-collapsible.svelte-1s8fs56.svelte-1s8fs56,.sidenav.svelte-1s8fs56.svelte-1s8fs56,.main.svelte-1s8fs56.svelte-1s8fs56{transition:width 0.3s}.content.svelte-1s8fs56.svelte-1s8fs56{scroll-margin:200px}}";
+ append(document_1.head, style);
+ }
+
+ // (412:6)
+ function create_default_slot_3(ctx) {
+ let span0;
+ let t0;
+ let span1;
+ let t1;
+
+ return {
+ c() {
+ span0 = element("span");
+ span0.innerHTML = ``;
+ t0 = space();
+ span1 = element("span");
+ t1 = text(/*title*/ ctx[0]);
+ attr(span0, "class", "icon icon-brand is-medium has-text-grey-light svelte-1s8fs56");
+ attr(span1, "class", "title is-4");
+ },
+ m(target, anchor) {
+ insert(target, span0, anchor);
+ insert(target, t0, anchor);
+ insert(target, span1, anchor);
+ append(span1, t1);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*title*/ 1) set_data(t1, /*title*/ ctx[0]);
+ },
+ d(detaching) {
+ if (detaching) detach(span0);
+ if (detaching) detach(t0);
+ if (detaching) detach(span1);
+ }
+ };
+ }
+
+ // (435:8) {#if config.playground.enabled}
+ function create_if_block_3$4(ctx) {
+ let current;
+
+ const selectorpanel = new SelectorPanel({
+ props: {
+ environments: /*config*/ ctx[3].playground.environments,
+ pkceChallenge: /*challengePair*/ ctx[12],
+ authenticating: /*authenticating*/ ctx[6]
+ }
+ });
+
+ return {
+ c() {
+ create_component(selectorpanel.$$.fragment);
+ },
+ m(target, anchor) {
+ mount_component(selectorpanel, target, anchor);
+ current = true;
+ },
+ p(ctx, dirty) {
+ const selectorpanel_changes = {};
+ if (dirty & /*config*/ 8) selectorpanel_changes.environments = /*config*/ ctx[3].playground.environments;
+ if (dirty & /*authenticating*/ 64) selectorpanel_changes.authenticating = /*authenticating*/ ctx[6];
+ selectorpanel.$set(selectorpanel_changes);
+ },
+ i(local) {
+ if (current) return;
+ transition_in(selectorpanel.$$.fragment, local);
+ current = true;
+ },
+ o(local) {
+ transition_out(selectorpanel.$$.fragment, local);
+ current = false;
+ },
+ d(detaching) {
+ destroy_component(selectorpanel, detaching);
+ }
+ };
+ }
+
+ // (441:8) {#if darkMode.enable}
+ function create_if_block_2$8(ctx) {
+ let div;
+ let a;
+ let span;
+ let i;
+ let dispose;
+
+ return {
+ c() {
+ div = element("div");
+ a = element("a");
+ span = element("span");
+ i = element("i");
+ attr(i, "class", "fas fa-lg");
+ toggle_class(i, "fa-moon", /*darkMode*/ ctx[7].active);
+ toggle_class(i, "fa-sun", !/*darkMode*/ ctx[7].active);
+ attr(span, "class", "icon is-medium has-text-grey-light");
+ attr(a, "href", "javascript:void(0)");
+ attr(a, "title", "Dark Mode");
+ attr(a, "class", "navbar-link is-arrowless");
+ attr(div, "class", "navbar-item has-dropdown is-hoverable");
+ },
+ m(target, anchor) {
+ insert(target, div, anchor);
+ append(div, a);
+ append(a, span);
+ append(span, i);
+ dispose = listen(a, "click", /*darkToggle*/ ctx[16]);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*darkMode*/ 128) {
+ toggle_class(i, "fa-moon", /*darkMode*/ ctx[7].active);
+ }
+
+ if (dirty & /*darkMode*/ 128) {
+ toggle_class(i, "fa-sun", !/*darkMode*/ ctx[7].active);
+ }
+ },
+ d(detaching) {
+ if (detaching) detach(div);
+ dispose();
+ }
+ };
+ }
+
+ // (481:8) {#if collapsed}
+ function create_if_block_1$d(ctx) {
+ let span;
+
+ return {
+ c() {
+ span = element("span");
+ span.textContent = "»";
+ attr(span, "class", "icon");
+ attr(span, "title", "Expand [");
+ },
+ m(target, anchor) {
+ insert(target, span, anchor);
+ },
+ d(detaching) {
+ if (detaching) detach(span);
+ }
+ };
+ }
+
+ // (484:8) {#if !collapsed}
+ function create_if_block$g(ctx) {
+ let span0;
+ let t1;
+ let span1;
+
+ return {
+ c() {
+ span0 = element("span");
+ span0.textContent = "«";
+ t1 = space();
+ span1 = element("span");
+ span1.textContent = "Collapse sidebar";
+ attr(span0, "class", "icon");
+ attr(span1, "class", "fa-xs");
+ },
+ m(target, anchor) {
+ insert(target, span0, anchor);
+ insert(target, t1, anchor);
+ insert(target, span1, anchor);
+ },
+ d(detaching) {
+ if (detaching) detach(span0);
+ if (detaching) detach(t1);
+ if (detaching) detach(span1);
+ }
+ };
+ }
+
+ // (495:8)
+ function create_default_slot_2(ctx) {
+ let current;
+
+ const home = new Home({
+ props: {
+ title: /*title*/ ctx[0],
+ description: /*description*/ ctx[1]
+ }
+ });
+
+ return {
+ c() {
+ create_component(home.$$.fragment);
+ },
+ m(target, anchor) {
+ mount_component(home, target, anchor);
+ current = true;
+ },
+ p(ctx, dirty) {
+ const home_changes = {};
+ if (dirty & /*title*/ 1) home_changes.title = /*title*/ ctx[0];
+ if (dirty & /*description*/ 2) home_changes.description = /*description*/ ctx[1];
+ home.$set(home_changes);
+ },
+ i(local) {
+ if (current) return;
+ transition_in(home.$$.fragment, local);
+ current = true;
+ },
+ o(local) {
+ transition_out(home.$$.fragment, local);
+ current = false;
+ },
+ d(detaching) {
+ destroy_component(home, detaching);
+ }
+ };
+ }
+
+ // (498:8)
+ function create_default_slot_1(ctx) {
+ let current;
+
+ const action_1 = new Action({
+ props: {
+ action: /*action*/ ctx[8],
+ config: /*config*/ ctx[3],
+ environment: /*environment*/ ctx[11],
+ challengePair: /*challengePair*/ ctx[12],
+ darkMode: /*darkMode*/ ctx[7]
+ }
+ });
+
+ return {
+ c() {
+ create_component(action_1.$$.fragment);
+ },
+ m(target, anchor) {
+ mount_component(action_1, target, anchor);
+ current = true;
+ },
+ p(ctx, dirty) {
+ const action_1_changes = {};
+ if (dirty & /*action*/ 256) action_1_changes.action = /*action*/ ctx[8];
+ if (dirty & /*config*/ 8) action_1_changes.config = /*config*/ ctx[3];
+ if (dirty & /*environment*/ 2048) action_1_changes.environment = /*environment*/ ctx[11];
+ if (dirty & /*darkMode*/ 128) action_1_changes.darkMode = /*darkMode*/ ctx[7];
+ action_1.$set(action_1_changes);
+ },
+ i(local) {
+ if (current) return;
+ transition_in(action_1.$$.fragment, local);
+ current = true;
+ },
+ o(local) {
+ transition_out(action_1.$$.fragment, local);
+ current = false;
+ },
+ d(detaching) {
+ destroy_component(action_1, detaching);
+ }
+ };
+ }
+
+ // (494:6)
+ function create_default_slot$2(ctx) {
+ let t;
+ let current;
+
+ const route0 = new Route({
+ props: {
+ exact: true,
+ $$slots: { default: [create_default_slot_2] },
+ $$scope: { ctx }
+ }
+ });
+
+ const route1 = new Route({
+ props: {
+ exact: true,
+ path: "/:slug",
+ $$slots: { default: [create_default_slot_1] },
+ $$scope: { ctx }
+ }
+ });
+
+ return {
+ c() {
+ create_component(route0.$$.fragment);
+ t = space();
+ create_component(route1.$$.fragment);
+ },
+ m(target, anchor) {
+ mount_component(route0, target, anchor);
+ insert(target, t, anchor);
+ mount_component(route1, target, anchor);
+ current = true;
+ },
+ p(ctx, dirty) {
+ const route0_changes = {};
+
+ if (dirty & /*$$scope, title, description*/ 16777219) {
+ route0_changes.$$scope = { dirty, ctx };
+ }
+
+ route0.$set(route0_changes);
+ const route1_changes = {};
+
+ if (dirty & /*$$scope, action, config, environment, darkMode*/ 16779656) {
+ route1_changes.$$scope = { dirty, ctx };
+ }
+
+ route1.$set(route1_changes);
+ },
+ i(local) {
+ if (current) return;
+ transition_in(route0.$$.fragment, local);
+ transition_in(route1.$$.fragment, local);
+ current = true;
+ },
+ o(local) {
+ transition_out(route0.$$.fragment, local);
+ transition_out(route1.$$.fragment, local);
+ current = false;
+ },
+ d(detaching) {
+ destroy_component(route0, detaching);
+ if (detaching) detach(t);
+ destroy_component(route1, detaching);
+ }
+ };
+ }
+
+ function create_fragment$n(ctx) {
+ let div8;
+ let nav;
+ let div0;
+ let t0;
+ let a0;
+ let t3;
+ let div2;
+ let div1;
+ let t4;
+ let t5;
+ let div6;
+ let div4;
+ let t6;
+ let div3;
+ let t7;
+ let t8;
+ let div5;
+ let t9;
+ let footer;
+ let div7;
+ let p;
+ let strong0;
+ let t10;
+ let t11;
+ let a1;
+ let current;
+ let dispose;
+
+ const link = new Link({
+ props: {
+ href: "/",
+ class: "navbar-item",
+ $$slots: { default: [create_default_slot_3] },
+ $$scope: { ctx }
+ }
+ });
+
+ let if_block0 = /*config*/ ctx[3].playground.enabled && create_if_block_3$4(ctx);
+ let if_block1 = /*darkMode*/ ctx[7].enable && create_if_block_2$8(ctx);
+
+ const menupanel = new MenuPanel({
+ props: {
+ title: /*title*/ ctx[0],
+ tagActions: /*filteredActions*/ ctx[10],
+ tagHeaders: toc(/*description*/ ctx[1]),
+ currentSlug: /*action*/ ctx[8] && /*action*/ ctx[8].slug,
+ actionsCount: /*actions*/ ctx[2].length,
+ isCollapsed: /*collapsed*/ ctx[5],
+ isDarkmode: /*darkMode*/ ctx[7].active,
+ query: /*query*/ ctx[9],
+ tocClick,
+ searchClick: /*searchClick*/ ctx[15]
+ }
+ });
+
+ let if_block2 = /*collapsed*/ ctx[5] && create_if_block_1$d(ctx);
+ let if_block3 = !/*collapsed*/ ctx[5] && create_if_block$g(ctx);
+
+ const router_1 = new Router({
+ props: {
+ $$slots: { default: [create_default_slot$2] },
+ $$scope: { ctx }
+ }
+ });
+
+ return {
+ c() {
+ div8 = element("div");
+ nav = element("nav");
+ div0 = element("div");
+ create_component(link.$$.fragment);
+ t0 = space();
+ a0 = element("a");
+
+ a0.innerHTML = `
+
+ `;
+
+ t3 = space();
+ div2 = element("div");
+ div1 = element("div");
+ if (if_block0) if_block0.c();
+ t4 = space();
+ if (if_block1) if_block1.c();
+ t5 = space();
+ div6 = element("div");
+ div4 = element("div");
+ create_component(menupanel.$$.fragment);
+ t6 = space();
+ div3 = element("div");
+ if (if_block2) if_block2.c();
+ t7 = space();
+ if (if_block3) if_block3.c();
+ t8 = space();
+ div5 = element("div");
+ create_component(router_1.$$.fragment);
+ t9 = space();
+ footer = element("footer");
+ div7 = element("div");
+ p = element("p");
+ strong0 = element("strong");
+ t10 = text(/*title*/ ctx[0]);
+ t11 = text("\n powered by\n ");
+ a1 = element("a");
+ a1.innerHTML = `Snowboard.`;
+ attr(a0, "href", "javascript:void(0)");
+ attr(a0, "role", "button");
+ attr(a0, "class", "navbar-burger");
+ attr(a0, "aria-label", "menu");
+ attr(a0, "aria-expanded", "false");
+ attr(a0, "data-target", "mainnav");
+ attr(div0, "class", "navbar-brand");
+ attr(div1, "class", "navbar-end");
+ attr(div2, "class", "navbar-menu");
+ attr(nav, "class", "navbar is-fixed-top has-shadow");
+ attr(nav, "role", "navigation");
+ attr(nav, "aria-label", "main navigation");
+ attr(div3, "class", "menu-collapsible svelte-1s8fs56");
+ toggle_class(div3, "is-darkmode", /*darkMode*/ ctx[7].active);
+ attr(div4, "class", "column is-one-quarter sidenav svelte-1s8fs56");
+ attr(div4, "id", "mainnav");
+ toggle_class(div4, "is-hidden-mobile", /*showMenu*/ ctx[4]);
+ attr(div5, "class", "column is-three-quarters main svelte-1s8fs56");
+ toggle_class(div5, "is-darkmode", /*darkMode*/ ctx[7].active);
+ attr(div6, "class", "columns svelte-1s8fs56");
+ toggle_class(div6, "is-collapsed", /*collapsed*/ ctx[5]);
+ attr(a1, "href", "https://github.com/bukalapak/snowboard");
+ attr(a1, "target", "_blank");
+ attr(div7, "class", "content column is-paddingless has-text-centered svelte-1s8fs56");
+ toggle_class(div7, "is-offset-one-quarter", !/*collapsed*/ ctx[5]);
+ attr(footer, "class", "footer svelte-1s8fs56");
+ toggle_class(footer, "is-darkmode", /*darkMode*/ ctx[7].active);
+ attr(div8, "class", "body-inner svelte-1s8fs56");
+ toggle_class(div8, "is-darkmode", /*darkMode*/ ctx[7].active);
+ },
+ m(target, anchor) {
+ insert(target, div8, anchor);
+ append(div8, nav);
+ append(nav, div0);
+ mount_component(link, div0, null);
+ append(div0, t0);
+ append(div0, a0);
+ append(nav, t3);
+ append(nav, div2);
+ append(div2, div1);
+ if (if_block0) if_block0.m(div1, null);
+ append(div1, t4);
+ if (if_block1) if_block1.m(div1, null);
+ append(div8, t5);
+ append(div8, div6);
+ append(div6, div4);
+ mount_component(menupanel, div4, null);
+ append(div4, t6);
+ append(div4, div3);
+ if (if_block2) if_block2.m(div3, null);
+ append(div3, t7);
+ if (if_block3) if_block3.m(div3, null);
+ append(div6, t8);
+ append(div6, div5);
+ mount_component(router_1, div5, null);
+ append(div8, t9);
+ append(div8, footer);
+ append(footer, div7);
+ append(div7, p);
+ append(p, strong0);
+ append(strong0, t10);
+ append(p, t11);
+ append(p, a1);
+ current = true;
+
+ dispose = [
+ listen(a0, "click", /*burgerClick*/ ctx[13]),
+ listen(div3, "click", /*collapseToggle*/ ctx[14])
+ ];
+ },
+ p(ctx, [dirty]) {
+ const link_changes = {};
+
+ if (dirty & /*$$scope, title*/ 16777217) {
+ link_changes.$$scope = { dirty, ctx };
+ }
+
+ link.$set(link_changes);
+
+ if (/*config*/ ctx[3].playground.enabled) {
+ if (if_block0) {
+ if_block0.p(ctx, dirty);
+ transition_in(if_block0, 1);
+ } else {
+ if_block0 = create_if_block_3$4(ctx);
+ if_block0.c();
+ transition_in(if_block0, 1);
+ if_block0.m(div1, t4);
+ }
+ } else if (if_block0) {
+ group_outros();
+
+ transition_out(if_block0, 1, 1, () => {
+ if_block0 = null;
+ });
+
+ check_outros();
+ }
+
+ if (/*darkMode*/ ctx[7].enable) {
+ if (if_block1) {
+ if_block1.p(ctx, dirty);
+ } else {
+ if_block1 = create_if_block_2$8(ctx);
+ if_block1.c();
+ if_block1.m(div1, null);
+ }
+ } else if (if_block1) {
+ if_block1.d(1);
+ if_block1 = null;
+ }
+
+ const menupanel_changes = {};
+ if (dirty & /*title*/ 1) menupanel_changes.title = /*title*/ ctx[0];
+ if (dirty & /*filteredActions*/ 1024) menupanel_changes.tagActions = /*filteredActions*/ ctx[10];
+ if (dirty & /*description*/ 2) menupanel_changes.tagHeaders = toc(/*description*/ ctx[1]);
+ if (dirty & /*action*/ 256) menupanel_changes.currentSlug = /*action*/ ctx[8] && /*action*/ ctx[8].slug;
+ if (dirty & /*actions*/ 4) menupanel_changes.actionsCount = /*actions*/ ctx[2].length;
+ if (dirty & /*collapsed*/ 32) menupanel_changes.isCollapsed = /*collapsed*/ ctx[5];
+ if (dirty & /*darkMode*/ 128) menupanel_changes.isDarkmode = /*darkMode*/ ctx[7].active;
+ if (dirty & /*query*/ 512) menupanel_changes.query = /*query*/ ctx[9];
+ menupanel.$set(menupanel_changes);
+
+ if (/*collapsed*/ ctx[5]) {
+ if (!if_block2) {
+ if_block2 = create_if_block_1$d(ctx);
+ if_block2.c();
+ if_block2.m(div3, t7);
+ } else {
+
+ }
+ } else if (if_block2) {
+ if_block2.d(1);
+ if_block2 = null;
+ }
+
+ if (!/*collapsed*/ ctx[5]) {
+ if (!if_block3) {
+ if_block3 = create_if_block$g(ctx);
+ if_block3.c();
+ if_block3.m(div3, null);
+ } else {
+
+ }
+ } else if (if_block3) {
+ if_block3.d(1);
+ if_block3 = null;
+ }
+
+ if (dirty & /*darkMode*/ 128) {
+ toggle_class(div3, "is-darkmode", /*darkMode*/ ctx[7].active);
+ }
+
+ if (dirty & /*showMenu*/ 16) {
+ toggle_class(div4, "is-hidden-mobile", /*showMenu*/ ctx[4]);
+ }
+
+ const router_1_changes = {};
+
+ if (dirty & /*$$scope, action, config, environment, darkMode, title, description*/ 16779659) {
+ router_1_changes.$$scope = { dirty, ctx };
+ }
+
+ router_1.$set(router_1_changes);
+
+ if (dirty & /*darkMode*/ 128) {
+ toggle_class(div5, "is-darkmode", /*darkMode*/ ctx[7].active);
+ }
+
+ if (dirty & /*collapsed*/ 32) {
+ toggle_class(div6, "is-collapsed", /*collapsed*/ ctx[5]);
+ }
+
+ if (!current || dirty & /*title*/ 1) set_data(t10, /*title*/ ctx[0]);
+
+ if (dirty & /*collapsed*/ 32) {
+ toggle_class(div7, "is-offset-one-quarter", !/*collapsed*/ ctx[5]);
+ }
+
+ if (dirty & /*darkMode*/ 128) {
+ toggle_class(footer, "is-darkmode", /*darkMode*/ ctx[7].active);
+ }
+
+ if (dirty & /*darkMode*/ 128) {
+ toggle_class(div8, "is-darkmode", /*darkMode*/ ctx[7].active);
+ }
+ },
+ i(local) {
+ if (current) return;
+ transition_in(link.$$.fragment, local);
+ transition_in(if_block0);
+ transition_in(menupanel.$$.fragment, local);
+ transition_in(router_1.$$.fragment, local);
+ current = true;
+ },
+ o(local) {
+ transition_out(link.$$.fragment, local);
+ transition_out(if_block0);
+ transition_out(menupanel.$$.fragment, local);
+ transition_out(router_1.$$.fragment, local);
+ current = false;
+ },
+ d(detaching) {
+ if (detaching) detach(div8);
+ destroy_component(link);
+ if (if_block0) if_block0.d();
+ if (if_block1) if_block1.d();
+ destroy_component(menupanel);
+ if (if_block2) if_block2.d();
+ if (if_block3) if_block3.d();
+ destroy_component(router_1);
+ run_all(dispose);
+ }
+ };
+ }
+
+ function getQuery(slug) {
+ if (!slug) return "";
+
+ if (slug.startsWith("rg~")) {
+ const tagPrefix = slug.substr(0, 2);
+ const tagSlug = slug.substr(3);
+ return `${tagPrefix}:${tagSlug}`;
+ }
+
+ if (slug.startsWith("g~")) {
+ const groupPrefix = slug.substr(0, 1);
+ const groupSlug = slug.substr(2);
+ return `${groupPrefix}:${groupSlug}`;
+ }
+
+ return "";
+ }
+
+ function tocClick(event) {
+ navigateTo("/");
+ let href = event.target.getAttribute("href");
+ const target = document.getElementById(href.substr(1));
+ window.scrollTo(0, target ? target.offsetTop - 80 : 20);
+ }
+
+ function instance$n($$self, $$props, $$invalidate) {
+ let $router;
+ let $env;
+ component_subscribe($$self, router, $$value => $$invalidate(18, $router = $$value));
+ component_subscribe($$self, env, $$value => $$invalidate(19, $env = $$value));
+ Router.hashchange = true;
let { title } = $$props;
let { description } = $$props;
let { actions } = $$props;
let { tagActions } = $$props;
let { config } = $$props;
- let index = -1;
- function handleClick(event) {
- let target = event.target;
-
- if (target.nodeName == "SPAN") {
- target = target.parentElement;
- }
-
- const slug = target.dataset["slug"];
- $$invalidate(12, index = actions.findIndex(el => el.slug === slug));
- document.body.scrollTop = document.documentElement.scrollTop = 0;
+ function findAction(slug) {
+ return actions.find(el => el.slug === slug);
}
- function handleGroupClick(event) {
- const groupSlug = event.target.dataset["slug"];
- const firstAction = firstGroupAction(groupSlug);
+ function getAction(slug) {
+ if (!slug) return;
- if (firstAction) {
- const slug = firstAction.slug;
- $$invalidate(12, index = actions.findIndex(el => el.slug === slug));
- $$invalidate(8, query = `g:${groupSlug}`);
- document.body.scrollTop = document.documentElement.scrollTop = 0;
+ if (slug.startsWith("rg~")) {
+ const tagSlug = slug.substr(3);
+ const firstGroup = firstTagGroup(tagSlug);
+
+ if (firstGroup) {
+ const groupSlug = `${tagSlug}~${slugify(firstGroup.title)}`;
+ const selected = firstGroupAction(groupSlug);
+ return findAction(selected.slug);
+ }
+
+ return;
+ }
+
+ if (slug.startsWith("g~")) {
+ const groupSlug = slug.substr(2);
+ const selected = firstGroupAction(groupSlug);
+ return findAction(selected.slug);
+ }
+
+ return findAction(slug);
+ }
+
+ function firstTagGroup(tagSlug) {
+ let matches = [];
+
+ tagActions.forEach(tag => {
+ if (slugify(tag.title) === tagSlug) {
+ matches.push(tag);
+ }
+ });
+
+ if (matches.length > 0) {
+ return matches[0].children[0];
}
}
function firstGroupAction(groupSlug) {
let matches = [];
+ const slugs = groupSlug.split("~");
tagActions.forEach(tag => {
- matches = matches.concat(tag.children.filter(child => slugify(child.title) === groupSlug));
+ matches = matches.concat(tag.children.filter(child => slugify(child.title) === slugs[1] && slugify(tag.title) === slugs[0]));
});
if (matches.length > 0) {
@@ -17746,12 +23938,6 @@
}
}
- function tocClick(event) {
- $$invalidate(12, index = -1);
- let href = event.target.getAttribute("href");
- pushHistory(href);
- }
-
if (config.playground.enabled) {
const savedEnv = getEnv();
@@ -17765,21 +23951,21 @@
if (authToken) {
auth.add($env);
- token.set(authToken);
+ token$1.set(authToken);
}
}
let showMenu = true;
let collapsed = false;
let authenticating = false;
- let query = "";
+ let challengePair = getPKCE();
function burgerClick() {
- $$invalidate(5, showMenu = !showMenu);
+ $$invalidate(4, showMenu = !showMenu);
}
function collapseToggle() {
- $$invalidate(6, collapsed = !collapsed);
+ $$invalidate(5, collapsed = !collapsed);
}
function searchClick() {
@@ -17800,7 +23986,7 @@
};
function darkToggle() {
- $$invalidate(9, darkMode.active = !darkMode.active, darkMode);
+ $$invalidate(7, darkMode.active = !darkMode.active, darkMode);
document.getElementById(`bulma-theme-${darkMode.mode[Number(!darkMode.active)]}`).media = "none";
document.getElementById(`bulma-theme-${darkMode.mode[Number(darkMode.active)]}`).media = "";
darkMode.store.setItem(darkMode.toggle, darkMode.mode[Number(darkMode.active)]);
@@ -17815,41 +24001,25 @@
const authParam = querystringify_1.parse(location.search);
if (authParam.code) {
- $$invalidate(7, authenticating = true);
- pushHistory(basePath(config));
- const { accessToken, refreshToken } = await exchangeToken(authParam.code, environment.auth.options);
+ $$invalidate(6, authenticating = true);
+ navigateTo(config.basePath);
+ const { accessToken, refreshToken } = await exchangeToken(authParam.code, environment.auth.options, isPKCE(environment), challengePair);
if (accessToken) {
setToken($env, accessToken);
auth.add($env);
- token.set(accessToken);
+ token$1.set(accessToken);
if (refreshToken) {
setRefreshToken($env, refreshToken);
}
}
- $$invalidate(7, authenticating = false);
+ $$invalidate(6, authenticating = false);
+ clearPKCE();
+ clearState();
}
}
-
- const hash = location.hash;
-
- if (hash.match("#/")) {
- let slug = hash.replace("#/", "");
-
- if (slug.startsWith("g~")) {
- const groupSlug = slug.substr(2);
- const firstAction = firstGroupAction(groupSlug);
-
- if (firstAction) {
- slug = firstAction.slug;
- $$invalidate(8, query = `g:${groupSlug}`);
- }
- }
-
- $$invalidate(12, index = actions.findIndex(el => el.slug === slug));
- }
});
document.onkeyup = function (e) {
@@ -17862,25 +24032,35 @@
if ("title" in $$props) $$invalidate(0, title = $$props.title);
if ("description" in $$props) $$invalidate(1, description = $$props.description);
if ("actions" in $$props) $$invalidate(2, actions = $$props.actions);
- if ("tagActions" in $$props) $$invalidate(3, tagActions = $$props.tagActions);
- if ("config" in $$props) $$invalidate(4, config = $$props.config);
+ if ("tagActions" in $$props) $$invalidate(17, tagActions = $$props.tagActions);
+ if ("config" in $$props) $$invalidate(3, config = $$props.config);
};
- let currentAction;
+ let action;
+ let query;
+ let filteredActions;
let environment;
$$self.$$.update = () => {
- if ($$self.$$.dirty & /*actions, index*/ 4100) {
- $$invalidate(10, currentAction = actions[index]);
+ if ($$self.$$.dirty & /*$router*/ 262144) {
+ $$invalidate(8, action = getAction($router.params.slug));
}
- if ($$self.$$.dirty & /*currentAction, title*/ 1025) {
+ if ($$self.$$.dirty & /*$router*/ 262144) {
+ $$invalidate(9, query = getQuery($router.params.slug));
+ }
+
+ if ($$self.$$.dirty & /*tagActions, query*/ 131584) {
+ $$invalidate(10, filteredActions = filterActions(tagActions, query));
+ }
+
+ if ($$self.$$.dirty & /*action, title*/ 257) {
{
- document.title = currentAction && `${currentAction.title} - ${title}` || title;
+ document.title = action && `${action.title} - ${title}` || title;
}
}
- if ($$self.$$.dirty & /*config, $env*/ 1048592) {
+ if ($$self.$$.dirty & /*config, $env*/ 524296) {
$$invalidate(11, environment = config.playground.enabled && config.playground.environments[$env]);
}
};
@@ -17889,44 +24069,42 @@
title,
description,
actions,
- tagActions,
config,
showMenu,
collapsed,
authenticating,
- query,
darkMode,
- currentAction,
+ action,
+ query,
+ filteredActions,
environment,
- index,
- handleClick,
- handleGroupClick,
- tocClick,
+ challengePair,
burgerClick,
collapseToggle,
searchClick,
- darkToggle
+ darkToggle,
+ tagActions
];
}
class Winter extends SvelteComponent {
constructor(options) {
super();
- if (!document_1.getElementById("svelte-1jcck2f-style")) add_css$9();
+ if (!document_1.getElementById("svelte-1s8fs56-style")) add_css$c();
- init(this, options, instance$i, create_fragment$i, safe_not_equal, {
+ init(this, options, instance$n, create_fragment$n, safe_not_equal, {
title: 0,
description: 1,
actions: 2,
- tagActions: 3,
- config: 4
+ tagActions: 17,
+ config: 3
});
}
}
const app = new Winter({
target: document.body,
- props: {"title":"mailcow API","description":"mailcow is complete e-mailing solution with advanced antispam, antivirus, nice UI and API.\n\nIn order to use this API you have to create a API key and add your IP address to the whitelist of allowed IPs this can be done by logging into the Mailcow UI using your admin account, then go to Configuration > Access > Edit administrator details > API. There you will find a collapsed API menu.\n\n**This documentation is in Work In Progress status. It contains only few endpoints.**","version":"","servers":[{"url":"https://mailcow.host/"}],"tags":[{"title":"Domains","description":"","children":[{"title":"Get domains","description":"","children":[]},{"title":"Create domain","description":"","children":[]},{"title":"Update domain","description":"","children":[]},{"title":"Delete domain","description":"","children":[]}]},{"title":"Domain antispam policies","description":"You can create antispam whitelist and blacklist policies","children":[{"title":"List whitelist domain policy","description":"","children":[]},{"title":"List blacklist domain policy","description":"","children":[]},{"title":"Create domain policy","description":"","children":[]},{"title":"Delete domain policy","description":"","children":[]}]},{"title":"Mailboxes","description":"","children":[{"title":"Get mailboxes","description":"","children":[]},{"title":"Create mailbox","description":"","children":[]},{"title":"Update mailbox","description":"","children":[]},{"title":"Delete mailbox","description":"","children":[]},{"title":"Quarantine Notifications","description":"","children":[]}]},{"title":"Aliases","description":"","children":[{"title":"Get aliases","description":"","children":[]},{"title":"Create alias","description":"","children":[]},{"title":"Update alias","description":"","children":[]},{"title":"Delete alias","description":"","children":[]}]},{"title":"Sync jobs","description":"","children":[{"title":"Get sync jobs","description":"","children":[]},{"title":"Create sync job","description":"","children":[]},{"title":"Update sync job","description":"","children":[]},{"title":"Delete sync job","description":"","children":[]}]},{"title":"Fordwarding Hosts","description":"","children":[{"title":"Get Forwarding Hosts","description":"","children":[]},{"title":"Add Forward Host","description":"","children":[]}]},{"title":"Logs","description":"","children":[{"title":"Get Postfix logs","description":"","children":[]},{"title":"Get Rspamd logs","description":"","children":[]},{"title":"Get Dovecot logs","description":"","children":[]},{"title":"Get ACME logs","description":"","children":[]},{"title":"Get SOGo logs","description":"","children":[]},{"title":"Get Watchdog logs","description":"","children":[]},{"title":"Get Api logs","description":"","children":[]},{"title":"Get Ratelimit logs","description":"","children":[]},{"title":"Get Netfilter logs","description":"","children":[]},{"title":"Get Autodiscover logs","description":"","children":[]}]},{"title":"Queue Manager","description":"","children":[{"title":"Get Queue","description":"","children":[]},{"title":"Flush Queue","description":"","children":[]},{"title":"Delete Queue","description":"","children":[]}]},{"title":"Quarantine","description":"","children":[{"title":"Get mails in Quarantine","description":"","children":[]},{"title":"Delete mails in Quarantine","description":"","children":[]}]},{"title":"Fail2Ban","description":"","children":[{"title":"Get Fail2Ban Config","description":"","children":[]},{"title":"Edit Fail2Ban","description":"","children":[]}]},{"title":"DKIM","description":"","children":[{"title":"Get DKIM Key","description":"","children":[]},{"title":"Generate DKIM Key","description":"","children":[]},{"title":"Duplicate DKIM Key","description":"","children":[]},{"title":"Delete DKIM Key","description":"","children":[]}]},{"title":"Domain admin","description":"","children":[{"title":"Get Domain Admins","description":"","children":[]},{"title":"Create Domain Admin user","description":"","children":[]},{"title":"Delete Domain Admin","description":"","children":[]}]},{"title":"Address Rewriting","description":"","children":[{"title":"Get BCC Map","description":"","children":[]},{"title":"Create BCC Map","description":"","children":[]},{"title":"Delete BCC Map","description":"","children":[]},{"title":"Get Recipient Map","description":"","children":[]},{"title":"Create Recipient Map","description":"","children":[]},{"title":"Delete Recipient Map","description":"","children":[]}]},{"title":"Outgoing TLS Policy Map Overrides","description":"","children":[{"title":"Get TLS Policy Map","description":"","children":[]},{"title":"Create TLS Policy Map","description":"","children":[]},{"title":"Delete TLS Policy Map","description":"","children":[]}]},{"title":"oAuth Clients","description":"","children":[{"title":"Get oAuth Clients","description":"","children":[]},{"title":"Create oAuth Client","description":"","children":[]},{"title":"Delete oAuth Client","description":"","children":[]}]},{"title":"Routing","description":"","children":[{"title":"Get Sender-Dependent Transports","description":"","children":[]},{"title":"Create Sender-Dependent Transports","description":"","children":[]},{"title":"Delete Sender-Dependent Transports","description":"","children":[]},{"title":"Get Transport Maps","description":"","children":[]},{"title":"Create Transport Maps","description":"","children":[]},{"title":"Delete Transport Maps","description":"","children":[]}]},{"title":"Resources","description":"","children":[{"title":"Get Resources","description":"","children":[]},{"title":"Create Resources","description":"","children":[]},{"title":"Delete Resources","description":"","children":[]}]},{"title":"App Passwords","description":"","children":[{"title":"Get App Password","description":"","children":[]},{"title":"Create App Password","description":"","children":[]},{"title":"Delete App Password","description":"","children":[]}]},{"title":"status","description":"","children":[{"title":"Get container status","description":"","children":[]},{"title":"Get vmail status","description":"","children":[]},{"title":"Get solr status","description":"","children":[]}]}],"actions":[{"title":"Get domains","path":"/api/v1/get/domain/{id}","pathTemplate":"/api/v1/get/domain/{id}","slug":"get~api~v1~get~domain~id","method":"get","description":"\nYou can list all domains existing in system.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","mailcow.tld"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"max_new_mailbox_quota\": 10737418240,\n \"def_new_mailbox_quota\": 3221225472,\n \"quota_used_in_domain\": \"0\",\n \"mboxes_in_domain\": 0,\n \"mboxes_left\": 10,\n \"domain_name\": \"domain.tld\",\n \"description\": \"Some description\",\n \"max_num_aliases_for_domain\": 400,\n \"max_num_mboxes_for_domain\": 10,\n \"def_quota_for_mbox\": 3221225472,\n \"max_quota_for_mbox\": 10737418240,\n \"max_quota_for_domain\": 10737418240,\n \"relayhost\": \"0\",\n \"backupmx\": \"✘\",\n \"gal\": \"✘\",\n \"backupmx_int\": 0,\n \"gal_int\": 0,\n \"lang\": \"en\",\n \"rl\": false,\n \"active\": \"✔\",\n \"active_int\": 1,\n \"relay_all_recipients\": \"✘\",\n \"relay_all_recipients_int\": 0,\n \"aliases_in_domain\": 0,\n \"aliases_left\": 400\n },\n {\n \"max_new_mailbox_quota\": 10737418240,\n \"def_new_mailbox_quota\": 3221225472,\n \"quota_used_in_domain\": \"0\",\n \"mboxes_in_domain\": 0,\n \"mboxes_left\": 10,\n \"domain_name\": \"domain2.tld\",\n \"description\": \"domain description\",\n \"max_num_aliases_for_domain\": 400,\n \"max_num_mboxes_for_domain\": 10,\n \"def_quota_for_mbox\": 3221225472,\n \"max_quota_for_mbox\": 10737418240,\n \"max_quota_for_domain\": 10737418240,\n \"relayhost\": \"0\",\n \"backupmx\": \"✔\",\n \"gal\": \"✘\",\n \"backupmx_int\": 1,\n \"gal_int\": 0,\n \"lang\": \"cs\",\n \"rl\": false,\n \"active\": \"✔\",\n \"active_int\": 1,\n \"relay_all_recipients\": \"✘\",\n \"relay_all_recipients_int\": 0,\n \"aliases_in_domain\": 0,\n \"aliases_left\": 400\n }\n]\n","schema":""}}],"tags":["Domains","Get domains"]},{"title":"Create domain","path":"/api/v1/add/domain","pathTemplate":"/api/v1/add/domain","slug":"post~api~v1~add~domain","method":"post","description":"\nYou may create your own domain using this action. It takes a JSON object containing a domain informations.","parameters":[],"transactions":[{"request":{"title":"json","description":"You can also define rate limiting. If `rl_value` is not empty string, them ratelimit object is created and returned in response.","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"domain","description":"Fully qualified domain name","required":false,"members":[],"schema":{"type":"string"}},{"key":"description","description":"Description of domain","required":false,"members":[],"schema":{"type":"string"}},{"key":"aliases","description":"limit count of aliases associated with this domain","required":false,"members":[],"schema":{"type":"number"}},{"key":"mailboxes","description":"limit count of mailboxes associated with this domain","required":false,"members":[],"schema":{"type":"number"}},{"key":"defquota","description":"predefined mailbox quota in `add mailbox` form","required":false,"members":[],"schema":{"type":"number"}},{"key":"maxquota","description":"maximum quota per mailbox","required":false,"members":[],"schema":{"type":"number"}},{"key":"quota","description":"maximum quota for this domain (for all mailboxes in sum)","required":false,"members":[],"schema":{"type":"number"}},{"key":"active","description":"is domain active or not","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"rl_value","description":"rate limit value","required":false,"members":[],"schema":{"type":"number"}},{"key":"rl_frame","required":false,"members":[],"schema":{"type":"enum"}},{"key":"backupmx","description":"relay domain or not","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"relay_all_recipients","description":"if not, them you have to create \"dummy\" mailbox for each address to relay","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"lang","description":"language code","required":false,"members":[],"schema":{"type":"enum"}}]},"example":"{\n \"domain\":\"domain.tld\",\n \"description\":\"some decsription\",\n \"aliases\":\"400\",\n \"mailboxes\":\"10\",\n \"defquota\":\"3072\",\n \"maxquota\":\"10240\",\n \"quota\":\"10240\",\n \"active\":\"1\",\n \"rl_value\":\"10\",\n \"rl_frame\":\"s\",\n \"backupmx\":\"0\",\n \"relay_all_recipients\":\"0\",\n \"lang\":\"cs\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"domain\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"aliases\": {\n \"type\": \"number\"\n },\n \"mailboxes\": {\n \"type\": \"number\"\n },\n \"defquota\": {\n \"type\": \"number\"\n },\n \"maxquota\": {\n \"type\": \"number\"\n },\n \"quota\": {\n \"type\": \"number\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"rl_value\": {\n \"type\": \"number\"\n },\n \"rl_frame\": {\n \"enum\": [\n \"s\",\n \"m\",\n \"h\"\n ]\n },\n \"backupmx\": {\n \"type\": \"boolean\"\n },\n \"relay_all_recipients\": {\n \"type\": \"boolean\"\n },\n \"lang\": {\n \"enum\": [\n \"sk\",\n \"cs\",\n \"de\",\n \"en\",\n \"es\",\n \"fr\",\n \"lv\",\n \"nl\",\n \"pl\",\n \"pt\",\n \"ru\",\n \"it\",\n \"ca\"\n ]\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":" [\n {\n \"type\": \"success\",\n \"log\": [\n \"ratelimit\",\n \"edit\",\n \"domain\",\n {\n \"rl_value\": \"10\",\n \"rl_frame\": \"s\",\n \"object\": \"domain.tld\"\n }\n ],\n \"msg\": [\n \"rl_saved\",\n \"domain.tld\"\n ]\n },\n {\n \"type\": \"success\",\n \"log\": [\n \"mailbox\",\n \"add\",\n \"domain\",\n {\n \"domain\": \"domain.tld\",\n \"description\": \"some decsription\",\n \"aliases\": \"400\",\n \"mailboxes\": \"10\",\n \"defquota\": \"3072\",\n \"maxquota\": \"10240\",\n \"quota\": \"10240\",\n \"active\": \"1\",\n \"rl_value\": \"10\",\n \"rl_frame\": \"s\",\n \"backupmx\": \"0\",\n \"relay_all_recipients\": \"0\",\n \"lang\":\"cs\"\n },\n null\n ],\n \"msg\": [\n \"domain_added\",\n \"domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domains","Create domain"]},{"title":"Update domain","path":"/api/v1/edit/domain","pathTemplate":"/api/v1/edit/domain","slug":"post~api~v1~edit~domain","method":"post","description":"\nYou can update one or more domains per request. You can also send just attributes you want to change. \nExample: You can add domain names to items list and in attr object just include `\"active\": \"0\"` to deactivate domains.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["domain_name"],"description":"contains list of domain names you want update","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"domain.tld\"\n ],\n \"attr\":{\n \"description\":\"domain description\",\n \"aliases\":\"400\",\n \"mailboxes\":\"10\",\n \"defquota\":\"3072\",\n \"maxquota\":\"10240\",\n \"quota\":\"10240\",\n \"active\":\"1\",\n \"gal\":\"1\",\n \"relayhost\":\"2\",\n \"backupmx\":\"1\",\n \"relay_all_recipients\":\"0\",\n \"lang\":\"cs\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"description\": {\n \"type\": \"string\"\n },\n \"aliases\": {\n \"type\": \"number\"\n },\n \"mailboxes\": {\n \"type\": \"number\"\n },\n \"defquota\": {\n \"type\": \"number\"\n },\n \"maxquota\": {\n \"type\": \"number\"\n },\n \"quota\": {\n \"type\": \"number\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"gal\": {\n \"type\": \"boolean\"\n },\n \"relayhost\": {\n \"type\": \"number\"\n },\n \"backupmx\": {\n \"type\": \"boolean\"\n },\n \"relay_all_recipients\": {\n \"type\": \"boolean\"\n },\n \"lang\": {\n \"enum\": [\n \"sk\",\n \"cs\",\n \"de\",\n \"en\",\n \"es\",\n \"fr\",\n \"lv\",\n \"nl\",\n \"pl\",\n \"pt\",\n \"ru\",\n \"it\",\n \"ca\"\n ]\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"edit\",\n \"domain\",\n {\n \"domain\":[\n \"domain.tld\"\n ],\n \"description\":\"domain description\",\n \"aliases\":\"400\",\n \"mailboxes\":\"10\",\n \"defquota\":\"3072\",\n \"maxquota\":\"10240\",\n \"quota\":\"10240\",\n \"active\":\"1\",\n \"gal\":\"1\",\n \"relayhost\":\"2\",\n \"backupmx\":\"1\",\n \"relay_all_recipients\":\"0\",\n \"lang:\"cs\"\n },\n null\n ],\n \"msg\":[\n \"domain_modified\",\n \"domain.tld\"\n ]\n }\n] \n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domains","Update domain"]},{"title":"Delete domain","path":"/api/v1/delete/domain","pathTemplate":"/api/v1/delete/domain","slug":"post~api~v1~delete~domain","method":"post","description":"\nYou can delete one or more domains.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["domain_name"],"description":"contains list of domains you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"domain.tld\",\n \"domain2.tld\"\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"domain\",\n {\n \"domain\":[\n \"domain.tld\",\n \"domain2.tld\"\n ]\n },\n null\n ],\n \"msg\":[\n \"domain_removed\",\n \"domain.tld\"\n ]\n },\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"domain\",\n {\n \"domain\":[\n \"domain.tld\",\n \"domain2.tld\"\n ]\n },\n null\n ],\n \"msg\":[\n \"domain_removed\",\n \"domain2.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domains","Delete domain"]},{"title":"List whitelist domain policy","path":"/api/v1/get/policy_wl_domain/{domain}","pathTemplate":"/api/v1/get/policy_wl_domain/{domain}","slug":"get~api~v1~get~policy~wl~domain~domain","method":"get","description":"\nYou can list all whitelist policies per domain.","parameters":[{"location":"path","name":"domain","description":"name of domain","required":true,"schema":{"type":"string"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"object\": \"domain.tld\",\n \"value\": \"*@gooddomain.tld\",\n \"prefid\": 1\n }\n]\n","schema":""}}],"tags":["Domain antispam policies","List whitelist domain policy"]},{"title":"List blacklist domain policy","path":"/api/v1/get/policy_bl_domain/{domain}","pathTemplate":"/api/v1/get/policy_bl_domain/{domain}","slug":"get~api~v1~get~policy~bl~domain~domain","method":"get","description":"\nYou can list all blacklist policies per domain.","parameters":[{"location":"path","name":"domain","description":"name of domain","required":true,"schema":{"type":"string"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"object\": \"domain.tld\",\n \"value\": \"*@baddomain.tld\",\n \"prefid\": 2\n }\n]\n","schema":""}}],"tags":["Domain antispam policies","List blacklist domain policy"]},{"title":"Create domain policy","path":"/api/v1/add/domain-policy","pathTemplate":"/api/v1/add/domain-policy","slug":"post~api~v1~add~domain-policy","method":"post","description":"\nYou may create your own domain policy using this action. It takes a JSON object containing a domain informations.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"domain","description":"domain name to which policy is associated to","required":false,"members":[],"schema":{"type":"string"}},{"key":"object_list","required":false,"members":[],"schema":{"type":"enum"}},{"key":"object_from","description":"exact address or use wildcard to match whole domain","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"domain\":\"domain.tld\",\n \"object_list\":\"bl\",\n \"object_from\":\"*@baddomain.tld\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"domain\": {\n \"type\": \"string\"\n },\n \"object_list\": {\n \"enum\": [\n \"wl\",\n \"bl\"\n ]\n },\n \"object_from\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"policy\",\n \"add\",\n \"domain\",\n {\n \"domain\":\"domain.tld\",\n \"object_list\":\"bl\",\n \"object_from\":\"*@baddomain.tld\"\n }\n ],\n \"msg\":[\n \"domain_modified\",\n \"domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domain antispam policies","Create domain policy"]},{"title":"Delete domain policy","path":"/api/v1/delete/domain-policy","pathTemplate":"/api/v1/delete/domain-policy","slug":"post~api~v1~delete~domain-policy","method":"post","description":"\nYou can delete one o more domain policies.","parameters":[],"transactions":[{"request":{"title":"json","description":"Delete domain policy by ID","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of domain policys you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"1\",\n \"2\"\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":" [\n {\n \"type\":\"success\",\n \"log\":[\n \"policy\",\n \"delete\",\n \"domain\",\n {\n \"prefid\":[\n \"1\",\n \"2\"\n ]\n }\n ],\n \"msg\":[\n \"item_deleted\",\n \"1\"\n ]\n },\n {\n \"type\":\"success\",\n \"log\":[\n \"policy\",\n \"delete\",\n \"domain\",\n {\n \"prefid\":[\n \"1\",\n \"2\"\n ]\n }\n ],\n \"msg\":[\n \"item_deleted\",\n \"2\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domain antispam policies","Delete domain policy"]},{"title":"Get mailboxes","path":"/api/v1/get/mailbox/{id}","pathTemplate":"/api/v1/get/mailbox/{id}","slug":"get~api~v1~get~mailbox~id","method":"get","description":"\nYou can list all mailboxes existing in system.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","user@domain.tld"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"max_new_quota\":10737418240,\n \"username\":\"info@doman3.tld\",\n \"rl\":false,\n \"is_relayed\":0,\n \"name\":\"Full name\",\n \"active\":\"✔\",\n \"active_int\":1,\n \"domain\":\"doman3.tld\",\n \"local_part\":\"info\",\n \"quota\":3221225472,\n \"attributes\":{\n \"force_pw_update\":\"0\",\n \"tls_enforce_in\":\"0\",\n \"tls_enforce_out\":\"0\",\n \"sogo_access\":\"1\",\n \"mailbox_format\":\"maildir:\",\n \"quarantine_notification\":\"never\"\n },\n \"quota_used\":0,\n \"percent_in_use\":0,\n \"messages\":0,\n \"spam_aliases\":0,\n \"percent_class\":\"success\"\n }\n]\n","schema":""}}],"tags":["Mailboxes","Get mailboxes"]},{"title":"Create mailbox","path":"/api/v1/add/mailbox","pathTemplate":"/api/v1/add/mailbox","slug":"post~api~v1~add~mailbox","method":"post","description":"\nYou may create your own mailbox using this action. It takes a JSON object containing a domain informations.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"local_part","description":"left part of email address","required":false,"members":[],"schema":{"type":"string"}},{"key":"domain","description":"domain name","required":false,"members":[],"schema":{"type":"string"}},{"key":"name","description":"Full name of the mailbox user","required":false,"members":[],"schema":{"type":"string"}},{"key":"quota","description":"mailbox quota","required":false,"members":[],"schema":{"type":"number"}},{"key":"pasword","description":"mailbox password","required":false,"members":[],"schema":{"type":"string"}},{"key":"password2","description":"mailbox password for confirmation","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"is mailbox active or not","required":false,"members":[],"schema":{"type":"boolean"}}]},"example":"{\n \"local_part\":\"info\",\n \"domain\":\"domain.tld\",\n \"name\":\"Full name\",\n \"quota\":\"3072\",\n \"password\":\"atedismonsin\",\n \"password2\":\"atedismonsin\",\n \"active\":\"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"local_part\": {\n \"type\": \"string\"\n },\n \"domain\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"quota\": {\n \"type\": \"number\"\n },\n \"pasword\": {\n \"type\": \"string\"\n },\n \"password2\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"boolean\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"add\",\n \"mailbox\",\n {\n \"local_part\":\"info\",\n \"domain\":\"domain.tld\",\n \"name\":\"Full name\",\n \"quota\":\"3072\",\n \"password\":\"*\",\n \"password2\":\"*\",\n \"active\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"mailbox_added\",\n \"info@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Mailboxes","Create mailbox"]},{"title":"Update mailbox","path":"/api/v1/edit/mailbox","pathTemplate":"/api/v1/edit/mailbox","slug":"post~api~v1~edit~mailbox","method":"post","description":"\nYou can update one or more mailboxes per request. You can also send just attributes you want to change","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["mailbox_name"],"description":"contains list of mailboxes you want update","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{"sender_acl":["default","info@domain2.tld","domain3.tld","asterix"]},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"info@domain.tld\"\n ],\n \"attr\":{\n \"name\":\"Full name\",\n \"quota\":\"3072\",\n \"password\":\"\",\n \"password2\":\"\",\n \"active\":\"1\",\n \"sender_acl\":[\n \"default\",\n \"info@domain2.tld\",\n \"domain3.tld\",\n \"*\"\n ],\n \"force_pw_update\":\"0\",\n \"sogo_access\":\"1\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"quota\": {\n \"type\": \"number\"\n },\n \"pasword\": {\n \"type\": \"string\"\n },\n \"password2\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"sender_acl\": {\n \"type\": \"array\"\n },\n \"force_pw_update\": {\n \"type\": \"boolean\"\n },\n \"sogo_access\": {\n \"type\": \"boolean\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"edit\",\n \"mailbox\",\n {\n \"username\":[\n \"info@domain.tld\"\n ],\n \"name\":\"Full name\",\n \"quota\":\"3072\",\n \"password\":\"*\",\n \"password2\":\"*\",\n \"active\":\"1\",\n \"sender_acl\":[\n \"default\",\n \"info@domain2.tld\",\n \"domain3.tld\",\n \"*\"\n ],\n \"force_pw_update\":\"0\",\n \"sogo_access\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"mailbox_modified\",\n \"info@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Mailboxes","Update mailbox"]},{"title":"Delete mailbox","path":"/api/v1/delete/mailbox","pathTemplate":"/api/v1/delete/mailbox","slug":"post~api~v1~delete~mailbox","method":"post","description":"\nYou can delete one or more mailboxes.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["local_part@domain"],"description":"contains list of mailboxes you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"info@domain.tld\",\n \"sales@domain.tld\"\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"mailbox\",\n {\n \"username\":[\n \"info@domain.tld\",\n \"sales@domain.tld\"\n ]\n },\n null\n ],\n \"msg\":[\n \"mailbox_removed\",\n \"info@domain.tld\"\n ]\n },\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"mailbox\",\n {\n \"username\":[\n \"info@domain.tld\",\n \"sales@domain.tld\"\n ]\n },\n null\n ],\n \"msg\":[\n \"mailbox_removed\",\n \"sales@domain.tld\"\n ]\n }\n] \n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Mailboxes","Delete mailbox"]},{"title":"Quarantine Notifications","path":"/api/v1/edit/quarantine_notification","pathTemplate":"/api/v1/edit/quarantine_notification","slug":"post~api~v1~edit~quarantine~notification","method":"post","description":"\nYou can update one or more mailboxes per request.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["mailbox_name"],"description":"contains list of mailboxes you want set qurantine notifications","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"mailbox1@domain.tld\",\n \"mailbox2@domain.tld\"\n ],\n \"attr\":{\n \"quarantine_notification\":\"hourly\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"quarantine_notification\": {\n \"enum\": [\n \"hourly\",\n \"daily\",\n \"weekly\",\n \"never\"\n ]\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"","schema":""}}],"tags":["Mailboxes","Quarantine Notifications"]},{"title":"Get aliases","path":"/api/v1/get/alias/{id}","pathTemplate":"/api/v1/get/alias/{id}","slug":"get~api~v1~get~alias~id","method":"get","description":"\nYou can list mailbox aliases existing in system.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"in_primary_domain\": \"\",\n \"id\": 6,\n \"domain\": \"domain.tld\",\n \"public_comment\": null,\n \"private_comment\": null,\n \"goto\": \"destination@domain.tld\",\n \"address\": \"alias@domain.tld\",\n \"is_catch_all\": 0,\n \"active\": \"✔\",\n \"active_int\": 1,\n \"created\": \"2019-04-04 19:29:49\",\n \"modified\": null\n },\n {\n \"in_primary_domain\": \"\",\n \"id\": 10,\n \"domain\": \"domain.tld\",\n \"public_comment\": null,\n \"private_comment\": null,\n \"goto\": \"destination@domain.tld\",\n \"address\": \"@domain.tld\",\n \"is_catch_all\": 1,\n \"active\": \"✔\",\n \"active_int\": 1,\n \"created\": \"2019-04-27 13:42:39\",\n \"modified\": null\n }\n]\n","schema":""}}],"tags":["Aliases","Get aliases"]},{"title":"Create alias","path":"/api/v1/add/alias","pathTemplate":"/api/v1/add/alias","slug":"post~api~v1~add~alias","method":"post","description":"\nYou may create your own mailbox alias using this action. It takes a JSON object containing a domain informations. \nOnly one `goto*` option can be used, for ex. if you want learn as spam, then send just `goto_spam = 1` in request body.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"address","description":"alias address, for catchall use \"@domain.tld\"","required":false,"members":[],"schema":{"type":"string"}},{"key":"goto","description":"destination address, comma separated","required":false,"members":[],"schema":{"type":"string"}},{"key":"goto_null","description":"silently ignore","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"goto_spam","description":"learn as spam","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"goto_ham","description":"learn as ham","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"active","description":"is alias active or not","required":false,"members":[],"schema":{"type":"boolean"}}]},"example":"{\n \"address\":\"alias@domain.tld\",\n \"goto\":\"destination@domain.tld\",\n \"active\":\"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"address\": {\n \"type\": \"string\"\n },\n \"goto\": {\n \"type\": \"string\"\n },\n \"goto_null\": {\n \"type\": \"boolean\"\n },\n \"goto_spam\": {\n \"type\": \"boolean\"\n },\n \"goto_ham\": {\n \"type\": \"boolean\"\n },\n \"active\": {\n \"type\": \"boolean\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"add\",\n \"alias\",\n {\n \"address\":\"alias@domain.tld\",\n \"goto\":\"destination@domain.tld\",\n \"active\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"alias_added\",\n \"alias@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Aliases","Create alias"]},{"title":"Update alias","path":"/api/v1/edit/alias","pathTemplate":"/api/v1/edit/alias","slug":"post~api~v1~edit~alias","method":"post","description":"\nYou can update one or more aliases per request. You can also send just attributes you want to change","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of aliases you want update","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"6\"\n ],\n \"attr\":{\n \"address\":\"alias@domain.tld\",\n \"goto\":\"destination@domain.tld\",\n \"private_comment\":\"private comment\",\n \"public_comment\":\"public comment\",\n \"active\":\"1\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"address\": {\n \"type\": \"string\"\n },\n \"goto\": {\n \"type\": \"string\"\n },\n \"goto_null\": {\n \"type\": \"boolean\"\n },\n \"goto_spam\": {\n \"type\": \"boolean\"\n },\n \"goto_ham\": {\n \"type\": \"boolean\"\n },\n \"private_comment\": {\n \"type\": \"string\"\n },\n \"public_comment\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"boolean\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"edit\",\n \"alias\",\n {\n \"id\":[\n \"6\"\n ],\n \"address\":\"alias@domain.tld\",\n \"goto\":\"destination@domain.tld\",\n \"private_comment\":\"private comment\",\n \"public_comment\":\"public comment\",\n \"active\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"alias_modified\",\n \"alias@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Aliases","Update alias"]},{"title":"Delete alias","path":"/api/v1/delete/alias","pathTemplate":"/api/v1/delete/alias","slug":"post~api~v1~delete~alias","method":"post","description":"\nYou can delete one or more aliases.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"[\n \"6\",\n \"9\"\n]\n","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"alias\",\n {\n \"id\":[\n \"6\",\n \"9\"\n ]\n },\n null\n ],\n \"msg\":[\n \"alias_removed\",\n \"alias@domain.tld\"\n ]\n },\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"alias\",\n {\n \"id\":[\n \"6\",\n \"9\"\n ]\n },\n null\n ],\n \"msg\":[\n \"alias_removed\",\n \"alias2@domain.tld\"\n ]\n }\n] \n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Aliases","Delete alias"]},{"title":"Get sync jobs","path":"/api/v1/get/syncjobs/all/no_log","pathTemplate":"/api/v1/get/syncjobs/all/no_log","slug":"get~api~v1~get~syncjobs~all~no~log","method":"get","description":"\nYou can list all syn jobs existing in system.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"user2\": \"mailbox@domain.tld\",\n \"host1\": \"imap.server.tld\",\n \"authmech1\": \"PLAIN\",\n \"regextrans2\": \"\",\n \"authmd51\": 0,\n \"domain2\": \"\",\n \"subfolder2\": \"External\",\n \"user1\": \"username\",\n \"exclude\": \"(?i)spam|(?i)junk\",\n \"maxage\": 0,\n \"mins_interval\": \"20\",\n \"maxbytespersecond\": \"0\",\n \"port1\": 993,\n \"enc1\": \"TLS\",\n \"delete2duplicates\": 1,\n \"delete1\": 0,\n \"delete2\": 0,\n \"automap\": 1,\n \"skipcrossduplicates\": 0,\n \"custom_params\": \"\",\n \"timeout1\": 600,\n \"timeout2\": 600,\n \"subscribeall\": 1,\n \"is_running\": 0,\n \"last_run\": \"2019-05-22 11:40:02\",\n \"created\": \"2019-05-22 11:37:25\",\n \"modified\": \"2019-05-22 11:40:02\",\n \"active\": \"✓\",\n \"active_int\": 1,\n \"log\": \"\"\n }\n]\n","schema":""}}],"tags":["Sync jobs","Get sync jobs"]},{"title":"Create sync job","path":"/api/v1/add/syncjob","pathTemplate":"/api/v1/add/syncjob","slug":"post~api~v1~add~syncjob","method":"post","description":"\nYou can create new sync job using this action. It takes a JSON object containing a domain informations.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"username","description":"The target mailbox","required":false,"members":[],"schema":{"type":"string"}},{"key":"delete2duplicates","description":"Delete duplicates on destination","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"delete1","description":"Delete from source when completed","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"delete2","description":"Delete messages on destination that are not on source","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"automap","description":"Try to automap folders (\"Sent items\", \"Sent\" => \"Sent\" etc.)","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"skipcrossduplicates","description":"Skip duplicate messages across folders (first come, first serve)","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"active","description":"Is sync job active","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"subscribeall","description":"Subscribe all folders","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"host1","description":"Hostname","required":false,"members":[],"schema":{"type":"string"}},{"key":"port1","description":"Port","required":false,"members":[],"schema":{"type":"string"}},{"key":"user1","description":"Username","required":false,"members":[],"schema":{"type":"string"}},{"key":"password1","description":"Password","required":false,"members":[],"schema":{"type":"string"}},{"key":"enc1","description":"Encryption","required":false,"members":[],"schema":{"type":"enum"}},{"key":"mins_interval","description":"Interval (min)","required":false,"members":[],"schema":{"type":"number"}},{"key":"subfolder2","description":"Sync into subfolder on destination (empty = do not use subfolder)","required":false,"members":[],"schema":{"type":"string"}},{"key":"maxage","description":"Maximum age of messages in days that will be polled from remote (0 = ignore age)","required":false,"members":[],"schema":{"type":"number"}},{"key":"maxbytespersecond","description":"Max. bytes per second (0 = unlimited)","required":false,"members":[],"schema":{"type":"number"}},{"key":"timeout1","description":"Timeout for connection to remote host","required":false,"members":[],"schema":{"type":"number"}},{"key":"timeout2","description":"Timeout for connection to local host","required":false,"members":[],"schema":{"type":"number"}},{"key":"exclude","description":"Exclude objects (regex)","required":false,"members":[],"schema":{"type":"string"}},{"key":"custom_params","description":"Custom parameters passed to imapsync command","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"username\":\"mailbox@domain.tld\",\n \"host1\":\"imap.server.tld\",\n \"port1\":\"993\",\n \"user1\":\"username\",\n \"password1\":\"supersecret\",\n \"enc1\":\"SSL\",\n \"mins_interval\":\"20\",\n \"subfolder2\":\"External\",\n \"maxage\":\"0\",\n \"maxbytespersecond\":\"0\",\n \"timeout1\":\"600\",\n \"timeout2\":\"600\",\n \"exclude\":\"(?i)spam|(?i)junk\",\n \"custom_params\":\"\",\n \"delete2duplicates\":\"1\",\n \"delete1\":\"0\",\n \"delete2\":\"0\",\n \"automap\":\"1\",\n \"skipcrossduplicates\":\"0\",\n \"subscribeall\":\"1\",\n \"active\":\"1\",\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"username\": {\n \"type\": \"string\"\n },\n \"delete2duplicates\": {\n \"type\": \"boolean\"\n },\n \"delete1\": {\n \"type\": \"boolean\"\n },\n \"delete2\": {\n \"type\": \"boolean\"\n },\n \"automap\": {\n \"type\": \"boolean\"\n },\n \"skipcrossduplicates\": {\n \"type\": \"boolean\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"subscribeall\": {\n \"type\": \"boolean\"\n },\n \"host1\": {\n \"type\": \"string\"\n },\n \"port1\": {\n \"type\": \"string\"\n },\n \"user1\": {\n \"type\": \"string\"\n },\n \"password1\": {\n \"type\": \"string\"\n },\n \"enc1\": {\n \"enum\": [\n \"TLS\",\n \"SSL\",\n \"PLAIN\"\n ]\n },\n \"mins_interval\": {\n \"type\": \"number\"\n },\n \"subfolder2\": {\n \"type\": \"string\"\n },\n \"maxage\": {\n \"type\": \"number\"\n },\n \"maxbytespersecond\": {\n \"type\": \"number\"\n },\n \"timeout1\": {\n \"type\": \"number\"\n },\n \"timeout2\": {\n \"type\": \"number\"\n },\n \"exclude\": {\n \"type\": \"string\"\n },\n \"custom_params\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"add\",\n \"syncjob\",\n {\n \"username\":\"mailbox@domain.tld\",\n \"host1\":\"imap.server.tld\",\n \"port1\":993,\n \"user1\":\"username\",\n \"password1\":\"supersecret\",\n \"enc1\":\"SSL\",\n \"mins_interval\":\"20\",\n \"subfolder2\":\"External\",\n \"maxage\":\"0\",\n \"maxbytespersecond\":\"0\",\n \"timeout1\":\"600\",\n \"timeout2\":\"600\",\n \"exclude\":\"(?i)spam|(?i)junk\",\n \"custom_params\":\"\",\n \"delete2duplicates\":\"1\",\n \"delete1\":\"0\",\n \"delete2\":\"0\",\n \"automap\":\"1\",\n \"skipcrossduplicates\":\"0\",\n \"subscribeall\":\"1\",\n \"active\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"mailbox_modified\",\n \"mailbox@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Sync jobs","Create sync job"]},{"title":"Update sync job","path":"/api/v1/edit/syncjob","pathTemplate":"/api/v1/edit/syncjob","slug":"post~api~v1~edit~syncjob","method":"post","description":"\nYou can update one or more sync jobs per request. You can also send just attributes you want to change.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of aliases you want update","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"1\"\n ],\n \"attr\":{\n \"delete2duplicates\":\"1\",\n \"delete1\":\"0\",\n \"delete2\":\"0\",\n \"automap\":\"1\",\n \"skipcrossduplicates\":\"0\",\n \"active\":\"1\",\n \"subscribeall\":\"1\",\n \"host1\":\"imap.server.tld\",\n \"port1\":\"993\",\n \"user1\":\"username\",\n \"password1\":\"supersecret\",\n \"enc1\":\"SSL\",\n \"mins_interval\":\"20\",\n \"subfolder2\":\"External\",\n \"maxage\":\"0\",\n \"maxbytespersecond\":\"0\",\n \"timeout1\":\"600\",\n \"timeout2\":\"600\",\n \"exclude\":\"(?i)spam|(?i)junk\",\n \"custom_params\":\"\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"delete2duplicates\": {\n \"type\": \"boolean\"\n },\n \"delete1\": {\n \"type\": \"boolean\"\n },\n \"delete2\": {\n \"type\": \"boolean\"\n },\n \"automap\": {\n \"type\": \"boolean\"\n },\n \"skipcrossduplicates\": {\n \"type\": \"boolean\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"subscribeall\": {\n \"type\": \"boolean\"\n },\n \"host1\": {\n \"type\": \"string\"\n },\n \"port1\": {\n \"type\": \"string\"\n },\n \"user1\": {\n \"type\": \"string\"\n },\n \"password1\": {\n \"type\": \"string\"\n },\n \"enc1\": {\n \"enum\": [\n \"TLS\",\n \"SSL\",\n \"PLAIN\"\n ]\n },\n \"mins_interval\": {\n \"type\": \"number\"\n },\n \"subfolder2\": {\n \"type\": \"string\"\n },\n \"maxage\": {\n \"type\": \"number\"\n },\n \"maxbytespersecond\": {\n \"type\": \"number\"\n },\n \"timeout1\": {\n \"type\": \"number\"\n },\n \"timeout2\": {\n \"type\": \"number\"\n },\n \"exclude\": {\n \"type\": \"string\"\n },\n \"custom_params\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"{\n \"type\": \"success\",\n \"log\": [\n \"entity\",\n \"action\",\n \"object\",\n {}\n ],\n \"msg\": [\n \"message\",\n \"entity name\"\n ]\n}","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Sync jobs","Update sync job"]},{"title":"Delete sync job","path":"/api/v1/delete/syncjob","pathTemplate":"/api/v1/delete/syncjob","slug":"post~api~v1~delete~syncjob","method":"post","description":"\nYou can delete one or more sync jobs.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of aliases you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"6\",\n \"9\"\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"{\n \"type\": \"success\",\n \"log\": [\n \"entity\",\n \"action\",\n \"object\",\n {}\n ],\n \"msg\": [\n \"message\",\n \"entity name\"\n ]\n}","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Sync jobs","Delete sync job"]},{"title":"Get Forwarding Hosts","path":"/api/v1/get/fwdhost/all","pathTemplate":"/api/v1/get/fwdhost/all","slug":"get~api~v1~get~fwdhost~all","method":"get","description":"\nYou can list all Forwarding Hosts in your system.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"host\": \"5.1.76.202\",\n \"source\": \"hosted.mailcow.de\",\n \"keep_spam\": \"yes\"\n },\n {\n \"host\": \"2a00:f820:417::202\",\n \"source\": \"hosted.mailcow.de\",\n \"keep_spam\": \"yes\"\n }\n]\n","schema":""}}],"tags":["Fordwarding Hosts","Get Forwarding Hosts"]},{"title":"Add Forward Host","path":"/api/v1/add/fwdhost","pathTemplate":"/api/v1/add/fwdhost","slug":"post~api~v1~add~fwdhost","method":"post","description":"\nAdd a new Forwarding host to mailcow. You can chose to enable or disable spam filtering of incoming emails by specifing `filter_spam` 0 = inactive, 1 = active.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"hostname","description":"contains the hostname you want to add","required":false,"members":[],"schema":{"type":"string"}},{"key":"filter_spam","description":"1 to enable spam filter, 0 to disable spam filter","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"hostname\": \"hosted.mailcow.de\",\n \"filter_spam\": \"0\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"hostname\": {\n \"type\": \"string\"\n },\n \"filter_spam\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"fwdhost\",\n \"add\",\n {\n \"hostname\": \"hosted.mailcow.de\",\n \"filter_spam\": \"0\"\n }\n ],\n \"msg\": [\n \"forwarding_host_added\",\n \"5.1.76.202, 2a00:f820:417::202\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Fordwarding Hosts","Add Forward Host"]},{"title":"Get Postfix logs","path":"/api/v1/get/logs/postfix/{count}","pathTemplate":"/api/v1/get/logs/postfix/{count}","slug":"get~api~v1~get~logs~postfix~count","method":"get","description":"\nThis Api endpoint lists all Postfix logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569937433\",\n \"program\": \"postfix/qmgr\",\n \"priority\": \"info\",\n \"message\": \"EF1711500458: removed\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Postfix logs"]},{"title":"Get Rspamd logs","path":"/api/v1/get/logs/rspamd-history/{count}","pathTemplate":"/api/v1/get/logs/rspamd-history/{count}","slug":"get~api~v1~get~logs~rspamd-history~count","method":"get","description":"\nThis Api endpoint lists all Rspamd logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n {\n \"time_virtual\": 0.235653,\n \"rcpt_mime\": [\n \"github@mailcow.tld\"\n ],\n \"message-id\": \"cm.0521259281087.phrkjuk.wdljulyl.i@cmail20.com\",\n \"ip\": \"1.1.1.1\",\n \"rcpt_smtp\": [\n \"github@mailcow.tld\"\n ],\n \"action\": \"soft reject\",\n \"time_real\": 2.856102,\n \"score\": 11.59,\n \"is_skipped\": false,\n \"size\": 35513,\n \"user\": \"unknown\",\n \"sender_mime\": \"noreply@github.com\",\n \"symbols\": {\n \"FROM_NEQ_ENVFROM\": {\n \"metric_score\": 0,\n \"options\": [\n \"noreply@github.com\",\n \"GitHub-phrkjuk1wdljulyl1i@cmail20.com\"\n ],\n \"score\": 0,\n \"name\": \"FROM_NEQ_ENVFROM\",\n \"description\": \"From address is different to the envelope\"\n },\n \"FORGED_SENDER\": {\n \"metric_score\": 0.3,\n \"options\": [\n \"noreply@github.com\",\n \"GitHub-phrkjuk1wdljulyl1i@cmail20.com\"\n ],\n \"score\": 0.3,\n \"name\": \"FORGED_SENDER\",\n \"description\": \"Sender is forged (different From: header and smtp MAIL FROM: addresses)\"\n },\n \"RWL_MAILSPIKE_NEUTRAL\": {\n \"metric_score\": 0,\n \"options\": [\n \"17.21.55.203.rep.mailspike.net : 127.0.0.13\"\n ],\n \"score\": 0,\n \"name\": \"RWL_MAILSPIKE_NEUTRAL\",\n \"description\": \"Neutral result from Mailspike\"\n },\n \"HAS_LIST_UNSUB\": {\n \"metric_score\": -0.01,\n \"score\": -0.01,\n \"name\": \"HAS_LIST_UNSUB\",\n \"description\": \"Has List-Unsubscribe header\"\n },\n \"URI_COUNT_ODD\": {\n \"metric_score\": 1,\n \"options\": [\n \"25\"\n ],\n \"score\": 1,\n \"name\": \"URI_COUNT_ODD\",\n \"description\": \"Odd number of URIs in multipart\\/alternative message\"\n },\n \"MIME_TRACE\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"MIME_TRACE\",\n \"options\": [\n \"0:+\",\n \"1:+\",\n \"2:~\"\n ]\n },\n \"R_DKIM_ALLOW\": {\n \"metric_score\": -0.2,\n \"options\": [\n \"github.com:s=cm\",\n \"cmail2.com:s=cs2013\"\n ],\n \"score\": 0,\n \"name\": \"R_DKIM_ALLOW\",\n \"description\": \"DKIM verification succeed\"\n },\n \"FROM_HAS_DN\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"FROM_HAS_DN\",\n \"description\": \"From header has a display name\"\n },\n \"MIME_GOOD\": {\n \"metric_score\": -0.1,\n \"options\": [\n \"multipart\\/alternative\",\n \"text\\/plain\"\n ],\n \"score\": -0.1,\n \"name\": \"MIME_GOOD\",\n \"description\": \"Known content-type\"\n },\n \"REPLYTO_ADDR_EQ_FROM\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"REPLYTO_ADDR_EQ_FROM\",\n \"description\": \"Reply-To header is identical to SMTP From\"\n },\n \"TO_MATCH_ENVRCPT_ALL\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"TO_MATCH_ENVRCPT_ALL\",\n \"description\": \"All of the recipients match the envelope\"\n },\n \"ASN\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"ASN\",\n \"options\": [\n \"asn:55819, ipnet:203.55.21.0\\/24, country:AU\"\n ]\n },\n \"HTML_SHORT_LINK_IMG_1\": {\n \"metric_score\": 2,\n \"score\": 2,\n \"name\": \"HTML_SHORT_LINK_IMG_1\",\n \"description\": \"Short html part (0..1K) with a link to an image\"\n },\n \"SCHAALIT_URI_823\": {\n \"metric_score\": 5,\n \"score\": 5,\n \"name\": \"SCHAALIT_URI_823\",\n \"options\": [\n \"SCHAALIT_URI_823\"\n ]\n },\n \"DMARC_POLICY_ALLOW\": {\n \"metric_score\": -0.5,\n \"options\": [\n \"github.com\",\n \"none\"\n ],\n \"score\": 0,\n \"name\": \"DMARC_POLICY_ALLOW\",\n \"description\": \"DMARC permit policy\"\n },\n \"MANY_INVISIBLE_PARTS\": {\n \"metric_score\": 1,\n \"options\": [\n \"4\"\n ],\n \"score\": 0.3,\n \"name\": \"MANY_INVISIBLE_PARTS\",\n \"description\": \"Many parts are visually hidden\"\n },\n \"DKIM_TRACE\": {\n \"metric_score\": 0,\n \"options\": [\n \"github.com:+\",\n \"cmail2.com:+\"\n ],\n \"score\": 0,\n \"name\": \"DKIM_TRACE\",\n \"description\": \"DKIM trace symbol\"\n },\n \"MX_GOOD\": {\n \"metric_score\": -0.01,\n \"options\": [\n \"mx20.inbound.createsend.com\",\n \"mx21.inbound.createsend.com\"\n ],\n \"score\": -0.01,\n \"name\": \"MX_GOOD\",\n \"description\": \"MX was ok\"\n },\n \"TO_DN_ALL\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"TO_DN_ALL\",\n \"description\": \"All the recipients have display names\"\n },\n \"RCPT_MAILCOW_DOMAIN\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"RCPT_MAILCOW_DOMAIN\",\n \"options\": [\n \"gc-mc.de\"\n ]\n },\n \"XM_UA_NO_VERSION\": {\n \"metric_score\": 0.01,\n \"score\": 0.01,\n \"name\": \"XM_UA_NO_VERSION\",\n \"description\": \"X-Mailer\\/User-Agent has no version\"\n },\n \"HAS_REPLYTO\": {\n \"metric_score\": 0,\n \"options\": [\n \"noreply@github.com\"\n ],\n \"score\": 0,\n \"name\": \"HAS_REPLYTO\",\n \"description\": \"Has Reply-To header\"\n },\n \"R_SPF_ALLOW\": {\n \"metric_score\": -0.2,\n \"options\": [\n \"+ip4:203.55.21.0\\/24\"\n ],\n \"score\": 0,\n \"name\": \"R_SPF_ALLOW\",\n \"description\": \"SPF verification allows sending\"\n },\n \"URIBL_GREY\": {\n \"metric_score\": 1.5,\n \"options\": [\n \"cmail2.com.multi.uribl.com\",\n \"cmail20.com.multi.uribl.com\",\n \"updatemyprofile.com.multi.uribl.com\"\n ],\n \"score\": 1.5,\n \"name\": \"URIBL_GREY\",\n \"description\": \"uribl.com grey url\"\n },\n \"CLAM_VIRUS_FAIL\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"CLAM_VIRUS_FAIL\",\n \"options\": [\n \"failed to scan and retransmits exceed\"\n ]\n },\n \"GREYLIST\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"GREYLIST\",\n \"options\": [\n \"greylisted\",\n \"Wed, 25 Sep 2019 19:27:10 GMT\",\n \"new record\"\n ]\n },\n \"ARC_NA\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"ARC_NA\",\n \"description\": \"ARC signature absent\"\n },\n \"RCVD_COUNT_ZERO\": {\n \"metric_score\": 0,\n \"options\": [\n \"0\"\n ],\n \"score\": 0,\n \"name\": \"RCVD_COUNT_ZERO\",\n \"description\": \"Message has no Received headers\"\n },\n \"BAD_REP_POLICIES\": {\n \"metric_score\": 0.1,\n \"score\": 0.1,\n \"name\": \"BAD_REP_POLICIES\",\n \"description\": \"Contains valid policies but are also marked by fuzzy\\/bayes\\/surbl\\/rbl\"\n },\n \"RCPT_COUNT_ONE\": {\n \"metric_score\": 0,\n \"options\": [\n \"1\"\n ],\n \"score\": 0,\n \"name\": \"RCPT_COUNT_ONE\",\n \"description\": \"One recipient\"\n },\n \"RBL_UCEPROTECT_LEVEL1\": {\n \"metric_score\": 3.5,\n \"score\": 3.5,\n \"name\": \"RBL_UCEPROTECT_LEVEL1\",\n \"options\": [\n \"17.21.55.203.dnsbl-1.uceprotect.net\"\n ]\n },\n \"DWL_DNSWL_HI\": {\n \"metric_score\": -3.5,\n \"options\": [\n \"github.com.dwl.dnswl.org : 127.0.9.3\"\n ],\n \"score\": -3.5,\n \"name\": \"DWL_DNSWL_HI\",\n \"description\": \"Message has a valid dkim signature originated from domain listed at https:\\/\\/www.dnswl.org, high trust\"\n },\n \"RCVD_IN_DNSWL_NONE\": {\n \"metric_score\": 0,\n \"options\": [\n \"17.21.55.203.list.dnswl.org : 127.0.15.0\"\n ],\n \"score\": 0,\n \"name\": \"RCVD_IN_DNSWL_NONE\",\n \"description\": \"Sender listed at https:\\/\\/www.dnswl.org, no trust\"\n },\n \"RBL_UCEPROTECT_LEVEL2\": {\n \"metric_score\": 1.5,\n \"score\": 1.5,\n \"name\": \"RBL_UCEPROTECT_LEVEL2\",\n \"options\": [\n \"17.21.55.203.dnsbl-2.uceprotect.net\"\n ]\n }\n },\n \"subject\": \"[mailcow/mailcow-dockerized] Unable to change name of alias email address (#2997)\",\n \"required_score\": 15,\n \"unix_time\": 1569439327,\n \"sender_smtp\": \"GitHub-phrkjuk1wdljulyl1i@cmail20.com\"\n }\n}\n","schema":""}}],"tags":["Logs","Get Rspamd logs"]},{"title":"Get Dovecot logs","path":"/api/v1/get/logs/dovecot/{count}","pathTemplate":"/api/v1/get/logs/dovecot/{count}","slug":"get~api~v1~get~logs~dovecot~count","method":"get","description":"\nThis Api endpoint lists all Dovecot logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569938740\",\n \"program\": \"dovecot\",\n \"priority\": \"info\",\n \"message\": \"managesieve-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=172.22.1.3, lip=172.22.1.250\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Dovecot logs"]},{"title":"Get ACME logs","path":"/api/v1/get/logs/acme/{count}","pathTemplate":"/api/v1/get/logs/acme/{count}","slug":"get~api~v1~get~logs~acme~count","method":"get","description":"\nThis Api endpoint lists all ACME logs from issued Lets Enctypts certificates. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569927728\",\n \"message\": \"Certificate validation done, neither changed nor due for renewal, sleeping for another day.\"\n }\n]\n","schema":""}}],"tags":["Logs","Get ACME logs"]},{"title":"Get SOGo logs","path":"/api/v1/get/logs/sogo/{count}","pathTemplate":"/api/v1/get/logs/sogo/{count}","slug":"get~api~v1~get~logs~sogo~count","method":"get","description":"\nThis Api endpoint lists all SOGo logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569938874\",\n \"program\": \"sogod\",\n \"priority\": \"notice\",\n \"message\": \"[109]: mailcowdockerized_watchdog-mailcow_1.mailcowdockerized_mailcow-network \\\"GET \\/SOGo.index\\/ HTTP\\/1.1\\\" 200 2531\\/0 0.005 - - 0\"\n }\n]\n","schema":""}}],"tags":["Logs","Get SOGo logs"]},{"title":"Get Watchdog logs","path":"/api/v1/get/logs/watchdog/{count}","pathTemplate":"/api/v1/get/logs/watchdog/{count}","slug":"get~api~v1~get~logs~watchdog~count","method":"get","description":"\nThis Api endpoint lists all Watchdog logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569938958\",\n \"service\": \"Fail2ban\",\n \"lvl\": \"100\",\n \"hpnow\": \"1\",\n \"hptotal\": \"1\",\n \"hpdiff\": \"0\"\n },\n {\n \"time\": \"1569938956\",\n \"service\": \"Rspamd\",\n \"lvl\": \"100\",\n \"hpnow\": \"5\",\n \"hptotal\": \"5\",\n \"hpdiff\": \"0\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Watchdog logs"]},{"title":"Get Api logs","path":"/api/v1/get/logs/api/{count}","pathTemplate":"/api/v1/get/logs/api/{count}","slug":"get~api~v1~get~logs~api~count","method":"get","description":"\nThis Api endpoint lists all Api logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": 1569939001,\n \"uri\": \"\\/api\\/v1\\/get\\/logs\\/api\\/2\",\n \"method\": \"GET\",\n \"remote\": \"1.1.1.1\",\n \"data\": \"\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Api logs"]},{"title":"Get Ratelimit logs","path":"/api/v1/get/logs/ratelimited/{count}","pathTemplate":"/api/v1/get/logs/ratelimited/{count}","slug":"get~api~v1~get~logs~ratelimited~count","method":"get","description":"\nThis Api endpoint lists all Ratelimit logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": 1569269003,\n \"rcpt\": \"hello@mailcow.email\",\n \"from\": \"awesome@mailcow.email\",\n \"user\": \"awesome@mailcow.email\",\n \"rl_info\": \"mailcow(RLsdz3tuabozgd4oacbdh8kc78)\",\n \"rl_name\": \"mailcow\",\n \"rl_hash\": \"RLsdz3tuabozgd4oacbdh8kc78\",\n \"qid\": \"E3CF91500458\",\n \"ip\": \"172.22.1.248\",\n \"message_id\": \"6a-5d892500-7-240abd80@90879116\",\n \"header_subject\": \"Mailcow is amazing\",\n \"header_from\": \"\\\"Awesome\\\" \"\n }\n]\n","schema":""}}],"tags":["Logs","Get Ratelimit logs"]},{"title":"Get Netfilter logs","path":"/api/v1/get/logs/netfilter/{count}","pathTemplate":"/api/v1/get/logs/netfilter/{count}","slug":"get~api~v1~get~logs~netfilter~count","method":"get","description":"\nThis Api endpoint lists all Netfilter logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": 1569754911,\n \"priority\": \"info\",\n \"message\": \"Whitelist was changed, it has 1 entries\"\n },\n {\n \"time\": 1569754911,\n \"priority\": \"crit\",\n \"message\": \"Add host\\/network 1.1.1.1\\/32 to blacklist\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Netfilter logs"]},{"title":"Get Autodiscover logs","path":"/api/v1/get/logs/autodiscover/{count}","pathTemplate":"/api/v1/get/logs/autodiscover/{count}","slug":"get~api~v1~get~logs~autodiscover~count","method":"get","description":"\nThis Api endpoint lists all Autodiscover logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": 1569684212,\n \"ua\": \"Microsoft Office\\/16.0 (Windows NT 6.2; MAPICPL 16.0.11328; Pro)\",\n \"user\": \"awesome@mailcow.de\",\n \"service\": \"activesync\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Autodiscover logs"]},{"title":"Get Queue","path":"/api/v1/get/mailq/all","pathTemplate":"/api/v1/get/mailq/all","slug":"get~api~v1~get~mailq~all","method":"get","description":"\nGet the current mail queue and everything it contains.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"queue_name\": \"incoming\",\n \"queue_id\": \"B98C6260CA1\",\n \"arrival_time\": 1570091234,\n \"message_size\": 1848,\n \"sender\": \"sender@mailcow.tld\",\n \"recipients\": [\n \"recipient@awesomecow.tld\"\n ]\n }\n]\n","schema":""}}],"tags":["Queue Manager","Get Queue"]},{"title":"Flush Queue","path":"/api/v1/edit/mailq","pathTemplate":"/api/v1/edit/mailq","slug":"post~api~v1~edit~mailq","method":"post","description":"\nUsing this API you can flush the current mail queue. This will try to deliver all mails currently in it.\nThis API uses the command: `postqueue -f`","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"action","description":"use flush to flush the mail queue","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{ \n \"action\":\"flush\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"type\": \"success\",\n \"msg\": \"Task completed\"\n}\n","schema":""}}],"tags":["Queue Manager","Flush Queue"]},{"title":"Delete Queue","path":"/api/v1/delete/mailq","pathTemplate":"/api/v1/delete/mailq","slug":"post~api~v1~delete~mailq","method":"post","description":"\nUsing this API you can delete the current mail queue. This will delete all mails in it.\nThis API uses the command: `postsuper -d`","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"action","description":"use super_delete to delete the mail queue","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"action\":\"super_delete\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"type\": \"success\",\n \"msg\": \"Task completed\"\n}\n","schema":""}}],"tags":["Queue Manager","Delete Queue"]},{"title":"Get mails in Quarantine","path":"/api/v1/get/quarantine/all","pathTemplate":"/api/v1/get/quarantine/all","slug":"get~api~v1~get~quarantine~all","method":"get","description":"\nGet all mails that are currently in Quarantine.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"id\": 33,\n \"qid\": \"8224615004C1\",\n \"subject\": \"mailcow is awesome\",\n \"virus_flag\": 0,\n \"score\": 15.48,\n \"rcpt\": \"admin@domain.tld\",\n \"sender\": \"bounces@send.domain.tld\",\n \"created\": 1572688831,\n \"notified\": 1\n}\n","schema":""}}],"tags":["Quarantine","Get mails in Quarantine"]},{"title":"Delete mails in Quarantine","path":"/api/v1/delete/qitem","pathTemplate":"/api/v1/delete/qitem","slug":"post~api~v1~delete~qitem","method":"post","description":"\nUsing this endpoint you can delete a email from quarantine, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of emails you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"33\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"quarantine\",\n \"delete\",\n {\n \"id\": [\n \"33\"\n ]\n }\n ],\n \"msg\": [\n \"item_deleted\",\n \"33\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Quarantine","Delete mails in Quarantine"]},{"title":"Get Fail2Ban Config","path":"/api/v1/get/fail2ban","pathTemplate":"/api/v1/get/fail2ban","slug":"get~api~v1~get~fail2ban","method":"get","description":"\nGets the current Fail2Ban configuration.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"ban_time\": 604800,\n \"netban_ipv4\": 32,\n \"netban_ipv6\": 128,\n \"max_attempts\": 1,\n \"retry_window\": 7200,\n \"whitelist\": \"1.1.1.1\",\n \"blacklist\": \"45.82.153.37\\/32\\n92.118.38.52\\/32\",\n \"perm_bans\": [\n \"45.82.153.37\\/32\",\n \"92.118.38.52\\/32\"\n ]\n}\n","schema":""}}],"tags":["Fail2Ban","Get Fail2Ban Config"]},{"title":"Edit Fail2Ban","path":"/api/v1/edit/fail2ban","pathTemplate":"/api/v1/edit/fail2ban","slug":"post~api~v1~edit~fail2ban","method":"post","description":"\nUsing this endpoint you can edit the Fail2Ban config and black or whitelist new ips.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":[],"description":"has to be none","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"description":"array containing the fail2ban settings","required":false,"members":[],"schema":{"type":"object"}}]},"example":"{ \n \"items\":[\n \"none\"\n ],\n \"attr\": {\n \"ban_time\": \"86400\",\n \"max_attempts\": \"5\",\n \"retry_window\": \"600\",\n \"netban_ipv4\": \"24\",\n \"netban_ipv6\": \"64\",\n \"whitelist\": \"mailcow.tld\",\n \"blacklist\": \"10.100.6.5/32,10.100.8.4/32\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"ban_time\": {\n \"type\": \"number\"\n },\n \"max_attempts\": {\n \"type\": \"number\"\n },\n \"retry_window\": {\n \"type\": \"number\"\n },\n \"netban_ipv4\": {\n \"type\": \"number\"\n },\n \"netban_ipv6\": {\n \"type\": \"number\"\n },\n \"whitelist\": {\n \"type\": \"string\"\n },\n \"backlist\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"type\": \"success\",\n \"log\": [\n \"fail2ban\",\n \"edit\",\n {\n \"network\": [\n \"none\"\n ],\n \"ban_time\": \"86400\",\n \"max_attempts\": \"5\",\n \"retry_window\": \"600\",\n \"netban_ipv4\": \"24\",\n \"netban_ipv6\": \"64\",\n \"whitelist\": \"mailcow.tld\",\n \"blacklist\": \"10.100.6.5/32,10.100.8.4/32\"\n }\n ],\n \"msg\": \"f2b_modified\"\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Fail2Ban","Edit Fail2Ban"]},{"title":"Get DKIM Key","path":"/api/v1/get/dkim/{domain}","pathTemplate":"/api/v1/get/dkim/{domain}","slug":"get~api~v1~get~dkim~domain","method":"get","description":"\nUsing this endpoint you can get the DKIM public key for a specific domain.","parameters":[{"location":"path","name":"domain","description":"name of domain","required":true,"schema":{"type":"string"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"pubkey\": \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA21tUSjyasQy/hJmVjPnlRGfzx6TPhYj8mXY9DVOzSAE64Gddw/GnE/GcCR6WXNT23u9q4zPnz1IPoNt5kFOps8vg/iNqrcH++494noaZuYyFPPFnebkfryO4EvEyxC/c66qts+gnOUml+M8uv5WObBJld2gG12jLwFM0263J/N6J8LuUsaXOB2uCIfx8Nf4zjuJ6Ieez2uyHNK5dXjDLfKA4mTr+EEK6W6e34M4KN1liWM6r9Oy5S1FlLrD42VpURxxBZtBiEtaJPEKSQuk6GQz8ihu7W20Yr53tyCdaORu8dhxXVUWVf+GjuuMEdAmQCjYkarXdYCrt56Psw703kwIDAQAB\",\n \"length\": \"2048\",\n \"dkim_txt\": \"v=DKIM1;k=rsa;t=s;s=email;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA21tUSjyasQy/hJmVjPnlRGfzx6TPhYj8mXY9DVOzSAE64Gddw/GnE/GcCR6WXNT23u9q4zPnz1IPoNt5kFOps8vg/iNqrcH++494noaZuYyFPPFnebkfryO4EvEyxC/c66qts+gnOUml+M8uv5WObBJld2gG12jLwFM0263J/N6J8LuUsaXOB2uCIfx8Nf4zjuJ6Ieez2uyHNK5dXjDLfKA4mTr+EEK6W6e34M4KN1liWM6r9Oy5S1FlLrD42VpURxxBZtBiEtaJPEKSQuk6GQz8ihu7W20Yr53tyCdaORu8dhxXVUWVf+GjuuMEdAmQCjYkarXdYCrt56Psw703kwIDAQAB\",\n \"dkim_selector\": \"dkim\",\n \"privkey\": \"\"\n}\n","schema":""}}],"tags":["DKIM","Get DKIM Key"]},{"title":"Generate DKIM Key","path":"/api/v1/add/dkim","pathTemplate":"/api/v1/add/dkim","slug":"post~api~v1~add~dkim","method":"post","description":"\nUsing this endpoint you can generate new DKIM keys.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"domain","description":"the domain which a key should be generated for","required":false,"members":[],"schema":{"type":"string"}},{"key":"dkim_selector","description":"the DKIM selector default dkim","required":false,"members":[],"schema":{"type":"string"}},{"key":"key_size","description":"the key size (1024 or 2048)","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"domains\":\"mailcow.tld\",\n \"dkim_selector\":\"dkim\",\n \"key_size\":\"2048\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"domain\": {\n \"type\": \"string\"\n },\n \"dkim_selector\": {\n \"type\": \"string\"\n },\n \"key_size\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"dkim\",\n \"add\",\n {\n \"domains\": \"hanspeterlol.de\",\n \"dkim_selector\": \"dkim\",\n \"key_size\": \"2048\"\n }\n ],\n \"msg\": [\n \"dkim_added\",\n \"hanspeterlol.de\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["DKIM","Generate DKIM Key"]},{"title":"Duplicate DKIM Key","path":"/api/v1/add/dkim_duplicate","pathTemplate":"/api/v1/add/dkim_duplicate","slug":"post~api~v1~add~dkim~duplicate","method":"post","description":"\nUsing this endpoint you can duplicate the DKIM Key of one domain.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"fron_domain","description":"the domain where the dkim key should be copied from","required":false,"members":[],"schema":{"type":"string"}},{"key":"to_domain","description":"the domain where the dkim key should be copied to","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"from_domain\":\"mailcow.tld\",\n \"to_domain\":\"awesomecow.tld\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"fron_domain\": {\n \"type\": \"string\"\n },\n \"to_domain\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"dkim\",\n \"duplicate\",\n {\n \"from_domain\": \"mailcow.tld\",\n \"to_domain\": \"awesomecow.tld\"\n }\n ],\n \"msg\": [\n \"dkim_duplicated\",\n \"mailcow.tld\",\n \"awesomecow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["DKIM","Duplicate DKIM Key"]},{"title":"Delete DKIM Key","path":"/api/v1/delete/dkim","pathTemplate":"/api/v1/delete/dkim","slug":"post~api~v1~delete~dkim","method":"post","description":"\nUsing this endpoint a existing DKIM Key can be deleted","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"[\"mailcow.tld\"]\n","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"dkim\",\n \"delete\",\n {\n \"domains\": [\n \"mailcow.tld\"\n ]\n }\n ],\n \"msg\": [\n \"dkim_removed\",\n \"mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["DKIM","Delete DKIM Key"]},{"title":"Get Domain Admins","path":"/api/v1/get/domain-admin/all","pathTemplate":"/api/v1/get/domain-admin/all","slug":"get~api~v1~get~domain-admin~all","method":"get","description":"\n","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"username\": \"testadmin\",\n \"tfa_active\": \"✕\",\n \"active\": \"✓\",\n \"tfa_active_int\": null,\n \"active_int\": 1,\n \"created\": \"2019-10-02 10:29:41\",\n \"selected_domains\": [\n \"mailcow.tld\"\n ],\n \"unselected_domains\": [\n \"awesomemailcow.de\",\n \"mailcowisgreat.de\"\n ]\n }\n]\n","schema":""}}],"tags":["Domain admin","Get Domain Admins"]},{"title":"Create Domain Admin user","path":"/api/v1/add/domain-admin","pathTemplate":"/api/v1/add/domain-admin","slug":"post~api~v1~add~domain-admin","method":"post","description":"\nUsing this endpoint you can create a new Domain Admin user. This user has full control over a domain, and can create new mailboxes and aliases.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"username","description":"the username for the admin user","required":false,"members":[],"schema":{"type":"string"}},{"key":"domains","description":"the domains the user should be a admin of","required":false,"members":[],"schema":{"type":"string"}},{"key":"password","description":"domain admin user password","required":false,"members":[],"schema":{"type":"string"}},{"key":"password2","description":"domain admin user password","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active user account 0 for a disabled user account","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"username\": \"testadmin\",\n \"domains\": \"mailcow.tld\",\n \"password\": \"supersecurepw\",\n \"password2\": \"supersecurepw\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"username\": {\n \"type\": \"string\"\n },\n \"domains\": {\n \"type\": \"string\"\n },\n \"password\": {\n \"type\": \"string\"\n },\n \"password2\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"domain_admin\",\n \"add\",\n {\n \"username\": \"testadmin\",\n \"domains\": \"mailcow.tld\",\n \"password\": \"*\",\n \"password2\": \"*\",\n \"active\": \"1\"\n }\n ],\n \"msg\": [\n \"domain_admin_added\",\n \"testadmin\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domain admin","Create Domain Admin user"]},{"title":"Delete Domain Admin","path":"/api/v1/delete/domain-admin","pathTemplate":"/api/v1/delete/domain-admin","slug":"post~api~v1~delete~domain-admin","method":"post","description":"\nUsing this endpoint a existing Domain Admin user can be deleted.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["username"],"description":"contains list of usernames of the users you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"testadmin\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"domain_admin\",\n \"delete\",\n {\n \"username\": [\n \"testadmin\"\n ]\n }\n ],\n \"msg\": [\n \"domain_admin_removed\",\n \"testadmin\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domain admin","Delete Domain Admin"]},{"title":"Get BCC Map","path":"/api/v1/get/bcc/{id}","pathTemplate":"/api/v1/get/bcc/{id}","slug":"get~api~v1~get~bcc~id","method":"get","description":"\nUsing this endpoint you can get all BCC maps.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 3,\n \"local_dest\": \"@mailcow.tld\",\n \"bcc_dest\": \"bcc@awesomecow.tld\",\n \"active_int\": 1,\n \"active\": \"✓\",\n \"type\": \"sender\",\n \"created\": \"2019-10-02 21:44:34\",\n \"domain\": \"mailcow.tld\",\n \"modified\": null\n }\n]\n","schema":""}}],"tags":["Address Rewriting","Get BCC Map"]},{"title":"Create BCC Map","path":"/api/v1/add/bcc","pathTemplate":"/api/v1/add/bcc","slug":"post~api~v1~add~bcc","method":"post","description":"\nUsing this endpoint you can create a BCC map to forward all mails via a bcc for a given domain.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"local_dest","description":"the domain which emails should be forwarded","required":false,"members":[],"schema":{"type":"string"}},{"key":"type","description":"the type of bcc map can be `sender` or `recipient`","required":false,"members":[],"schema":{"type":"string"}},{"key":"bcc_dest","description":"the email address where all mails should be send to","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active user account 0 for a disabled user account","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"local_dest\": \"mailcow.tld\",\n \"type\": \"sender\",\n \"bcc_dest\": \"bcc@awesomecow.tld\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"local_dest\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\"\n },\n \"bcc_dest\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"bcc\",\n \"add\",\n {\n \"local_dest\": \"mailcow.tld\",\n \"type\": \"sender\",\n \"bcc_dest\": \"bcc@awesomecow.tld\",\n \"active\": \"1\"\n },\n null\n ],\n \"msg\": \"bcc_saved\"\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Address Rewriting","Create BCC Map"]},{"title":"Delete BCC Map","path":"/api/v1/delete/bcc","pathTemplate":"/api/v1/delete/bcc","slug":"post~api~v1~delete~bcc","method":"post","description":"\nUsing this endpoint you can delete a BCC map, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of bcc maps you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"3\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"bcc\",\n \"delete\",\n {\n \"id\": [\n \"4\"\n ]\n },\n null\n ],\n \"msg\": [\n \"bcc_deleted\",\n \"4\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Address Rewriting","Delete BCC Map"]},{"title":"Get Recipient Map","path":"/api/v1/get/recipient_map/{id}","pathTemplate":"/api/v1/get/recipient_map/{id}","slug":"get~api~v1~get~recipient~map~id","method":"get","description":"\nUsing this endpoint you can get all recipient maps.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 3,\n \"recipient_map_old\": \"recipient@mailcow.tld\",\n \"recipient_map_new\": \"target@mailcow.tld\",\n \"active_int\": 1,\n \"active\": \"✓\",\n \"created\": \"2019-10-02 22:06:29\",\n \"modified\": null\n }\n]\n","schema":""}}],"tags":["Address Rewriting","Get Recipient Map"]},{"title":"Create Recipient Map","path":"/api/v1/add/recipient_map","pathTemplate":"/api/v1/add/recipient_map","slug":"post~api~v1~add~recipient~map","method":"post","description":"\nUsing this endpoint you can create a recipient map to forward all mails from one email address to another.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"recipient_map_old","description":"the email address which emails should be forwarded","required":false,"members":[],"schema":{"type":"string"}},{"key":"recipient_map_new","description":"the email address that should receive the forwarded emails","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active user account 0 for a disabled user account","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"recipient_map_old\": \"recipient@mailcow.tld\",\n \"recipient_map_new\": \"target@mailcow.tld\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"recipient_map_old\": {\n \"type\": \"string\"\n },\n \"recipient_map_new\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"recipient_map\",\n \"add\",\n {\n \"recipient_map_old\": \"recipient@mailcow.tld\",\n \"recipient_map_new\": \"target@mailcow.tld\",\n \"active\": \"1\"\n },\n null\n ],\n \"msg\": [\n \"recipient_map_entry_saved\",\n \"recipient@mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Address Rewriting","Create Recipient Map"]},{"title":"Delete Recipient Map","path":"/api/v1/delete/recipient_map","pathTemplate":"/api/v1/delete/recipient_map","slug":"post~api~v1~delete~recipient~map","method":"post","description":"\nUsing this endpoint you can delete a recipient map, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of recipient maps you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"1\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"recipient_map\",\n \"delete\",\n {\n \"id\": [\n \"1\"\n ]\n },\n null\n ],\n \"msg\": [\n \"recipient_map_entry_deleted\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Address Rewriting","Delete Recipient Map"]},{"title":"Get TLS Policy Map","path":"/api/v1/get/tls-policy-map/{id}","pathTemplate":"/api/v1/get/tls-policy-map/{id}","slug":"get~api~v1~get~tls-policy-map~id","method":"get","description":"\nUsing this endpoint you can get all TLS policy map override maps.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"dest\": \"mailcow.tld\",\n \"policy\": \"encrypt\",\n \"parameters\": \"\",\n \"active_int\": 1,\n \"active\": \"✓\",\n \"created\": \"2019-10-03 08:42:12\",\n \"modified\": null\n }\n]\n","schema":""}}],"tags":["Outgoing TLS Policy Map Overrides","Get TLS Policy Map"]},{"title":"Create TLS Policy Map","path":"/api/v1/add/tls-policy-map","pathTemplate":"/api/v1/add/tls-policy-map","slug":"post~api~v1~add~tls-policy-map","method":"post","description":"\nUsing this endpoint you can create a TLS policy map override.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"dest","description":"the target domain or email address","required":false,"members":[],"schema":{"type":"string"}},{"key":"policy","description":"the policy","required":false,"members":[],"schema":{"type":"enum"}},{"key":"parameters","description":"custom parameters you find out more about them [here](http://www.postfix.org/postconf.5.html#smtp_tls_policy_maps)","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active user account 0 for a disabled user account","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"dest\": \"mailcow.tld\",\n \"policy\": \"encrypt\",\n \"parameters\": \"\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"dest\": {\n \"type\": \"string\"\n },\n \"policy\": {\n \"enum\": [\n \"none\",\n \"may\",\n \"encrypt\",\n \"dane\",\n \"fingerprint\",\n \"verify\",\n \"secure\"\n ]\n },\n \"parameters\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"tls_policy_maps\",\n \"add\",\n {\n \"dest\": \"mailcow.tld\",\n \"policy\": \"encrypt\",\n \"parameters\": \"\",\n \"active\": \"1\"\n },\n null\n ],\n \"msg\": [\n \"tls_policy_map_entry_saved\",\n \"mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Outgoing TLS Policy Map Overrides","Create TLS Policy Map"]},{"title":"Delete TLS Policy Map","path":"/api/v1/delete/tls-policy-map","pathTemplate":"/api/v1/delete/tls-policy-map","slug":"post~api~v1~delete~tls-policy-map","method":"post","description":"\nUsing this endpoint you can delete a TLS Policy Map, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of tls policy maps you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"3\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"tls_policy_maps\",\n \"delete\",\n {\n \"id\": [\n \"1\"\n ]\n },\n null\n ],\n \"msg\": [\n \"tls_policy_map_entry_deleted\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Outgoing TLS Policy Map Overrides","Delete TLS Policy Map"]},{"title":"Get oAuth Clients","path":"/api/v1/get/oauth2-client/{id}","pathTemplate":"/api/v1/get/oauth2-client/{id}","slug":"get~api~v1~get~oauth2-client~id","method":"get","description":"\nUsing this endpoint you can get all oAuth clients.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"client_id\": \"17c76aaa88c0\",\n \"client_secret\": \"73fc668a88147e32a31ff80c\",\n \"redirect_uri\": \"https:\\/\\/mailcow.tld\",\n \"grant_types\": null,\n \"scope\": \"profile\",\n \"user_id\": null\n }\n]\n","schema":""}}],"tags":["oAuth Clients","Get oAuth Clients"]},{"title":"Create oAuth Client","path":"/api/v1/add/oauth2-client","pathTemplate":"/api/v1/add/oauth2-client","slug":"post~api~v1~add~oauth2-client","method":"post","description":"\nUsing this endpoint you can create a oAuth clients.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"redirect_uri","description":"the uri where you should be redirected after oAuth","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"redirect_uri\":\"https://mailcow.tld\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"redirect_uri\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"oauth2\",\n \"add\",\n \"client\",\n {\n \"redirect_uri\": \"https:\\/\\/mailcow.tld\"\n }\n ],\n \"msg\": \"Added client access\"\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["oAuth Clients","Create oAuth Client"]},{"title":"Delete oAuth Client","path":"/api/v1/delete/oauth2-client","pathTemplate":"/api/v1/delete/oauth2-client","slug":"post~api~v1~delete~oauth2-client","method":"post","description":"\nUsing this endpoint you can delete a oAuth client, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of oAuth clients you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"3\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"oauth2\",\n \"delete\",\n \"client\",\n {\n \"id\": [\n \"1\"\n ]\n }\n ],\n \"msg\": [\n \"items_deleted\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["oAuth Clients","Delete oAuth Client"]},{"title":"Get Sender-Dependent Transports","path":"/api/v1/get/relayhost/{id}","pathTemplate":"/api/v1/get/relayhost/{id}","slug":"get~api~v1~get~relayhost~id","method":"get","description":"\nUsing this endpoint you can get all Sender-Dependent Transports.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"hostname\": \"mailcow.tld:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepassword\",\n \"active_int\": 1,\n \"password_short\": \"tes...\",\n \"active\": \"✓\",\n \"used_by_domains\": \"\"\n }\n]\n","schema":""}}],"tags":["Routing","Get Sender-Dependent Transports"]},{"title":"Create Sender-Dependent Transports","path":"/api/v1/add/relayhost","pathTemplate":"/api/v1/add/relayhost","slug":"post~api~v1~add~relayhost","method":"post","description":"\nUsing this endpoint you can create Sender-Dependent Transports.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"hostname","description":"the hostname of the smtp server with port","required":false,"members":[],"schema":{"type":"string"}},{"key":"username","description":"the username used to authenticate","required":false,"members":[],"schema":{"type":"string"}},{"key":"password","description":"the password for the smtp user","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"hostname\": \"mailcow.tld:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepassword\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"hostname\": {\n \"type\": \"string\"\n },\n \"username\": {\n \"type\": \"string\"\n },\n \"password\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"relayhost\",\n \"add\",\n {\n \"hostname\": \"mailcow.tld:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepassword\"\n }\n ],\n \"msg\": [\n \"relayhost_added\",\n \"\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Routing","Create Sender-Dependent Transports"]},{"title":"Delete Sender-Dependent Transports","path":"/api/v1/delete/relayhost","pathTemplate":"/api/v1/delete/relayhost","slug":"post~api~v1~delete~relayhost","method":"post","description":"\nUsing this endpoint you can delete a Sender-Dependent Transport, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of Sender-Dependent Transport you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"1\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"relayhost\",\n \"delete\",\n {\n \"id\": [\n \"1\"\n ]\n }\n ],\n \"msg\": [\n \"relayhost_removed\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Routing","Delete Sender-Dependent Transports"]},{"title":"Get Transport Maps","path":"/api/v1/get/transport/{id}","pathTemplate":"/api/v1/get/transport/{id}","slug":"get~api~v1~get~transport~id","method":"get","description":"\nUsing this endpoint you can get all Transport Maps.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"destination\": \"example.org\",\n \"nexthop\": \"host:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepw\",\n \"active_int\": 1,\n \"lookup_mx_int\": 0,\n \"password_short\": \"sup...\",\n \"active\": \"✓\",\n \"lookup_mx\": \"✕\"\n }\n]\n","schema":""}}],"tags":["Routing","Get Transport Maps"]},{"title":"Create Transport Maps","path":"/api/v1/add/transport/all","pathTemplate":"/api/v1/add/transport/all","slug":"post~api~v1~add~transport~all","method":"post","description":"\nUsing this endpoint you can create Sender-Dependent Transports.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"destination","required":false,"members":[],"schema":{"type":"string"}},{"key":"nexthop","required":false,"members":[],"schema":{"type":"string"}},{"key":"username","description":"the username used to authenticate","required":false,"members":[],"schema":{"type":"string"}},{"key":"password","description":"the password for the smtp user","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active transport map 0 for a disabled transport map","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"destination\": \"example.org\",\n \"nexthop\": \"host:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepw\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"destination\": {\n \"type\": \"string\"\n },\n \"nexthop\": {\n \"type\": \"string\"\n },\n \"username\": {\n \"type\": \"string\"\n },\n \"password\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"transport\",\n \"add\",\n {\n \"destination\": \"example2.org\",\n \"nexthop\": \"host:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepw\",\n \"active\": \"1\"\n }\n ],\n \"msg\": [\n \"relayhost_added\",\n \"\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Routing","Create Transport Maps"]},{"title":"Delete Transport Maps","path":"/api/v1/delete/transport","pathTemplate":"/api/v1/delete/transport","slug":"post~api~v1~delete~transport","method":"post","description":"\nUsing this endpoint you can delete a Transport Maps, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of transport maps you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"1\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"transport\",\n \"delete\",\n {\n \"id\": [\n \"1\"\n ]\n }\n ],\n \"msg\": [\n \"relayhost_removed\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Routing","Delete Transport Maps"]},{"title":"Get Resources","path":"/api/v1/get/resource/all","pathTemplate":"/api/v1/get/resource/all","slug":"get~api~v1~get~resource~all","method":"get","description":"\nUsing this endpoint you can get all Resources.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"name\": \"test@mailcow.tld\",\n \"kind\": \"location\",\n \"multiple_bookings\": 0,\n \"description\": \"test\",\n \"active\": \"✓\",\n \"active_int\": 1,\n \"domain\": \"mailcow.tld\",\n \"local_part\": \"test\"\n }\n]\n","schema":""}}],"tags":["Resources","Get Resources"]},{"title":"Create Resources","path":"/api/v1/add/resource","pathTemplate":"/api/v1/add/resource","slug":"post~api~v1~add~resource","method":"post","description":"\nUsing this endpoint you can create Resources.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"description","description":"a description of the resource","required":false,"members":[],"schema":{"type":"string"}},{"key":"domain","description":"the domain for which the resource should be","required":false,"members":[],"schema":{"type":"string"}},{"key":"kind","description":"the kind of recouse","required":false,"members":[],"schema":{"type":"enum"}},{"key":"multiple_bookings_select","required":false,"members":[],"schema":{"type":"enum"}},{"key":"multiple_bookings_custom","description":"always empty","required":false,"members":[],"schema":{"type":"number"}},{"key":"multiple_bookings","required":false,"members":[],"schema":{"type":"enum"}},{"key":"active","description":"1 for a active transport map 0 for a disabled transport map","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"description\": \"test\",\n \"domain\": \"mailcow.tld\",\n \"kind\": \"location\",\n \"multiple_bookings_select\": \"0\",\n \"multiple_bookings_custom\": \"\",\n \"multiple_bookings\": \"0\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"description\": {\n \"type\": \"string\"\n },\n \"domain\": {\n \"type\": \"string\"\n },\n \"kind\": {\n \"enum\": [\n \"location\",\n \"group\",\n \"thing\"\n ]\n },\n \"multiple_bookings_select\": {\n \"enum\": [\n \"-1\",\n \"1\",\n \"custom\"\n ]\n },\n \"multiple_bookings_custom\": {\n \"type\": \"number\"\n },\n \"multiple_bookings\": {\n \"enum\": [\n \"-1\",\n \"1\",\n \"custom\"\n ]\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"mailbox\",\n \"add\",\n \"resource\",\n {\n \"description\": \"test\",\n \"domain\": \"mailcow.tld\",\n \"kind\": \"location\",\n \"multiple_bookings_select\": \"0\",\n \"multiple_bookings_custom\": \"\",\n \"multiple_bookings\": \"0\",\n \"active\": \"1\"\n },\n null\n ],\n \"msg\": [\n \"resource_added\",\n \"mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Resources","Create Resources"]},{"title":"Delete Resources","path":"/api/v1/delete/resource","pathTemplate":"/api/v1/delete/resource","slug":"post~api~v1~delete~resource","method":"post","description":"\nUsing this endpoint you can delete a Resources, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["description@domain"],"description":"contains list of Resources you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"test@mailcow.tld\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"mailbox\",\n \"delete\",\n \"resource\",\n {\n \"name\": [\n \"test@mailcow.tld\"\n ]\n },\n null\n ],\n \"msg\": [\n \"resource_removed\",\n \"test@mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Resources","Delete Resources"]},{"title":"Get App Password","path":"/api/v1/get/app-passwd/all/{mailbox}","pathTemplate":"/api/v1/get/app-passwd/all/{mailbox}","slug":"get~api~v1~get~app-passwd~all~mailbox","method":"get","description":"\nUsing this endpoint you can get all app passwords from a specific mailbox.","parameters":[{"location":"path","name":"mailbox","description":"mailbox of entry you want to get","required":true,"example":"hello@mailcow.email","schema":{"type":"string","enum":["hello@mailcow.email"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 2,\n \"name\": \"emclient\",\n \"mailbox\": \"hello@mailcow.email\",\n \"domain\": \"mailcow.email\",\n \"created\": \"2019-12-21 16:04:55\",\n \"modified\": null,\n \"active_int\": 1,\n \"active\": \"✓\"\n }\n]\n","schema":""}}],"tags":["App Passwords","Get App Password"]},{"title":"Create App Password","path":"/api/v1/add/app-passwd","pathTemplate":"/api/v1/add/app-passwd","slug":"post~api~v1~add~app-passwd","method":"post","description":"\nUsing this endpoint you can create a new app password for a specific mailbox.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"username","description":"the username user@domain.tld","required":false,"members":[],"schema":{"type":"string"}},{"key":"app_name","description":"name of the app password","required":false,"members":[],"schema":{"type":"string"}},{"key":"app_passwd","description":"the password","required":false,"members":[],"schema":{"type":"string"}},{"key":"app_passwd2","description":"the password for confirmation","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active transport map 0 for a disabled transport map","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"username\": \"hello@mailcow.email\"\n \"app_name\": \"emclient\",\n \"app_passwd\": \"keyleudecticidechothistishownsan31\",\n \"app_passwd2\": \"keyleudecticidechothistishownsan31\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"username\": {\n \"type\": \"string\"\n },\n \"app_name\": {\n \"type\": \"string\"\n },\n \"app_passwd\": {\n \"type\": \"string\"\n },\n \"app_passwd2\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"app_passwd\",\n \"add\",\n {\n \"username\": \"hello@mailcow.email\",\n \"app_name\": \"emclient\",\n \"app_passwd\": \"keyleudecticidechothistishownsan31\",\n \"app_passwd2\": \"keyleudecticidechothistishownsan31\",\n \"active\": \"1\"\n }\n ],\n \"msg\": \"app_passwd_added\"\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["App Passwords","Create App Password"]},{"title":"Delete App Password","path":"/api/v1/delete/app-passwd","pathTemplate":"/api/v1/delete/app-passwd","slug":"post~api~v1~delete~app-passwd","method":"post","description":"\nUsing this endpoint you can delete a single app password.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of app passwords you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"1\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"app_passwd\",\n \"delete\",\n {\n \"id\": [\n \"2\"\n ]\n }\n ],\n \"msg\": [\n \"app_passwd_removed\",\n \"2\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["App Passwords","Delete App Password"]},{"title":"Get container status","path":"/api/v1/get/status/containers","pathTemplate":"/api/v1/get/status/containers","slug":"get~api~v1~get~status~containers","method":"get","description":"\nUsing this endpoint you can get the status of all containers and when hey where started and a few other details.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"ipv6nat-mailcow\": {\n \"type\": \"info\",\n \"container\": \"ipv6nat-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:06:37.273225445Z\",\n \"image\": \"robbertkl/ipv6nat\"\n },\n \"netfilter-mailcow\": {\n \"type\": \"info\",\n \"container\": \"netfilter-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:09.851559297Z\",\n \"image\": \"mailcow/netfilter:1.31\"\n },\n \"rspamd-mailcow\": {\n \"type\": \"info\",\n \"container\": \"rspamd-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:12.456075355Z\",\n \"image\": \"mailcow/rspamd:1.56\"\n },\n \"acme-mailcow\": {\n \"type\": \"info\",\n \"container\": \"acme-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:08.270660275Z\",\n \"image\": \"mailcow/acme:1.63\"\n },\n \"dovecot-mailcow\": {\n \"type\": \"info\",\n \"container\": \"dovecot-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:08.988680259Z\",\n \"image\": \"mailcow/dovecot:1.104\"\n },\n \"postfix-mailcow\": {\n \"type\": \"info\",\n \"container\": \"postfix-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:07.186717617Z\",\n \"image\": \"mailcow/postfix:1.44\"\n },\n \"nginx-mailcow\": {\n \"type\": \"info\",\n \"container\": \"nginx-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:12.9843038Z\",\n \"image\": \"nginx:mainline-alpine\"\n },\n \"mysql-mailcow\": {\n \"type\": \"info\",\n \"container\": \"mysql-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:02.201937528Z\",\n \"image\": \"mariadb:10.3\"\n },\n \"php-fpm-mailcow\": {\n \"type\": \"info\",\n \"container\": \"php-fpm-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:00.955808957Z\",\n \"image\": \"mailcow/phpfpm:1.55\"\n },\n \"clamd-mailcow\": {\n \"type\": \"info\",\n \"container\": \"clamd-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:01.622856172Z\",\n \"image\": \"mailcow/clamd:1.35\"\n },\n \"memcached-mailcow\": {\n \"type\": \"info\",\n \"container\": \"memcached-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T20:59:58.0907785Z\",\n \"image\": \"memcached:alpine\"\n },\n \"solr-mailcow\": {\n \"type\": \"info\",\n \"container\": \"solr-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T20:59:59.635413798Z\",\n \"image\": \"mailcow/solr:1.7\"\n },\n \"olefy-mailcow\": {\n \"type\": \"info\",\n \"container\": \"olefy-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T20:59:59.676259274Z\",\n \"image\": \"mailcow/olefy:1.2\"\n },\n \"sogo-mailcow\": {\n \"type\": \"info\",\n \"container\": \"sogo-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T20:59:58.382274592Z\",\n \"image\": \"mailcow/sogo:1.65\"\n },\n \"unbound-mailcow\": {\n \"type\": \"info\",\n \"container\": \"unbound-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T20:59:58.760595825Z\",\n \"image\": \"mailcow/unbound:1.10\"\n },\n \"dockerapi-mailcow\": {\n \"type\": \"info\",\n \"container\": \"dockerapi-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T20:59:59.984797808Z\",\n \"image\": \"mailcow/dockerapi:1.36\"\n },\n \"redis-mailcow\": {\n \"type\": \"info\",\n \"container\": \"redis-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T20:59:56.827166834Z\",\n \"image\": \"redis:5-alpine\"\n },\n \"watchdog-mailcow\": {\n \"type\": \"info\",\n \"container\": \"watchdog-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T20:59:56.028660382Z\",\n \"image\": \"mailcow/watchdog:1.65\"\n }\n}\n","schema":""}}],"tags":["status","Get container status"]},{"title":"Get vmail status","path":"/api/v1/get/status/vmail","pathTemplate":"/api/v1/get/status/vmail","slug":"get~api~v1~get~status~vmail","method":"get","description":"\nUsing this endpoint you can get the status of the vmail and the amount of used storage.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"type\": \"info\",\n \"disk\": \"/dev/mapper/mail--vg-root\",\n \"used\": \"11G\",\n \"total\": \"41G\",\n \"used_percent\": \"28%\"\n}\n","schema":""}}],"tags":["status","Get vmail status"]},{"title":"Get solr status","path":"/api/v1/get/status/solr","pathTemplate":"/api/v1/get/status/solr","slug":"get~api~v1~get~status~solr","method":"get","description":"\nUsing this endpoint you can get the status of all containers and when hey where started and a few other details.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"type\": \"info\",\n \"solr_enabled\": false,\n \"solr_size\": null,\n \"solr_documents\": null\n}\n","schema":""}}],"tags":["status","Get solr status"]}],"tagActions":[{"title":"Domains","children":[{"title":"Get domains","actions":[{"title":"Get domains","method":"get","path":"/api/v1/get/domain/{id}","slug":"get~api~v1~get~domain~id"}]},{"title":"Create domain","actions":[{"title":"Create domain","method":"post","path":"/api/v1/add/domain","slug":"post~api~v1~add~domain"}]},{"title":"Update domain","actions":[{"title":"Update domain","method":"post","path":"/api/v1/edit/domain","slug":"post~api~v1~edit~domain"}]},{"title":"Delete domain","actions":[{"title":"Delete domain","method":"post","path":"/api/v1/delete/domain","slug":"post~api~v1~delete~domain"}]}]},{"title":"Domain antispam policies","children":[{"title":"List whitelist domain policy","actions":[{"title":"List whitelist domain policy","method":"get","path":"/api/v1/get/policy_wl_domain/{domain}","slug":"get~api~v1~get~policy~wl~domain~domain"}]},{"title":"List blacklist domain policy","actions":[{"title":"List blacklist domain policy","method":"get","path":"/api/v1/get/policy_bl_domain/{domain}","slug":"get~api~v1~get~policy~bl~domain~domain"}]},{"title":"Create domain policy","actions":[{"title":"Create domain policy","method":"post","path":"/api/v1/add/domain-policy","slug":"post~api~v1~add~domain-policy"}]},{"title":"Delete domain policy","actions":[{"title":"Delete domain policy","method":"post","path":"/api/v1/delete/domain-policy","slug":"post~api~v1~delete~domain-policy"}]}]},{"title":"Mailboxes","children":[{"title":"Get mailboxes","actions":[{"title":"Get mailboxes","method":"get","path":"/api/v1/get/mailbox/{id}","slug":"get~api~v1~get~mailbox~id"}]},{"title":"Create mailbox","actions":[{"title":"Create mailbox","method":"post","path":"/api/v1/add/mailbox","slug":"post~api~v1~add~mailbox"}]},{"title":"Update mailbox","actions":[{"title":"Update mailbox","method":"post","path":"/api/v1/edit/mailbox","slug":"post~api~v1~edit~mailbox"}]},{"title":"Delete mailbox","actions":[{"title":"Delete mailbox","method":"post","path":"/api/v1/delete/mailbox","slug":"post~api~v1~delete~mailbox"}]},{"title":"Quarantine Notifications","actions":[{"title":"Quarantine Notifications","method":"post","path":"/api/v1/edit/quarantine_notification","slug":"post~api~v1~edit~quarantine~notification"}]}]},{"title":"Aliases","children":[{"title":"Get aliases","actions":[{"title":"Get aliases","method":"get","path":"/api/v1/get/alias/{id}","slug":"get~api~v1~get~alias~id"}]},{"title":"Create alias","actions":[{"title":"Create alias","method":"post","path":"/api/v1/add/alias","slug":"post~api~v1~add~alias"}]},{"title":"Update alias","actions":[{"title":"Update alias","method":"post","path":"/api/v1/edit/alias","slug":"post~api~v1~edit~alias"}]},{"title":"Delete alias","actions":[{"title":"Delete alias","method":"post","path":"/api/v1/delete/alias","slug":"post~api~v1~delete~alias"}]}]},{"title":"Sync jobs","children":[{"title":"Get sync jobs","actions":[{"title":"Get sync jobs","method":"get","path":"/api/v1/get/syncjobs/all/no_log","slug":"get~api~v1~get~syncjobs~all~no~log"}]},{"title":"Create sync job","actions":[{"title":"Create sync job","method":"post","path":"/api/v1/add/syncjob","slug":"post~api~v1~add~syncjob"}]},{"title":"Update sync job","actions":[{"title":"Update sync job","method":"post","path":"/api/v1/edit/syncjob","slug":"post~api~v1~edit~syncjob"}]},{"title":"Delete sync job","actions":[{"title":"Delete sync job","method":"post","path":"/api/v1/delete/syncjob","slug":"post~api~v1~delete~syncjob"}]}]},{"title":"Fordwarding Hosts","children":[{"title":"Get Forwarding Hosts","actions":[{"title":"Get Forwarding Hosts","method":"get","path":"/api/v1/get/fwdhost/all","slug":"get~api~v1~get~fwdhost~all"}]},{"title":"Add Forward Host","actions":[{"title":"Add Forward Host","method":"post","path":"/api/v1/add/fwdhost","slug":"post~api~v1~add~fwdhost"}]}]},{"title":"Logs","children":[{"title":"Get Postfix logs","actions":[{"title":"Get Postfix logs","method":"get","path":"/api/v1/get/logs/postfix/{count}","slug":"get~api~v1~get~logs~postfix~count"}]},{"title":"Get Rspamd logs","actions":[{"title":"Get Rspamd logs","method":"get","path":"/api/v1/get/logs/rspamd-history/{count}","slug":"get~api~v1~get~logs~rspamd-history~count"}]},{"title":"Get Dovecot logs","actions":[{"title":"Get Dovecot logs","method":"get","path":"/api/v1/get/logs/dovecot/{count}","slug":"get~api~v1~get~logs~dovecot~count"}]},{"title":"Get ACME logs","actions":[{"title":"Get ACME logs","method":"get","path":"/api/v1/get/logs/acme/{count}","slug":"get~api~v1~get~logs~acme~count"}]},{"title":"Get SOGo logs","actions":[{"title":"Get SOGo logs","method":"get","path":"/api/v1/get/logs/sogo/{count}","slug":"get~api~v1~get~logs~sogo~count"}]},{"title":"Get Watchdog logs","actions":[{"title":"Get Watchdog logs","method":"get","path":"/api/v1/get/logs/watchdog/{count}","slug":"get~api~v1~get~logs~watchdog~count"}]},{"title":"Get Api logs","actions":[{"title":"Get Api logs","method":"get","path":"/api/v1/get/logs/api/{count}","slug":"get~api~v1~get~logs~api~count"}]},{"title":"Get Ratelimit logs","actions":[{"title":"Get Ratelimit logs","method":"get","path":"/api/v1/get/logs/ratelimited/{count}","slug":"get~api~v1~get~logs~ratelimited~count"}]},{"title":"Get Netfilter logs","actions":[{"title":"Get Netfilter logs","method":"get","path":"/api/v1/get/logs/netfilter/{count}","slug":"get~api~v1~get~logs~netfilter~count"}]},{"title":"Get Autodiscover logs","actions":[{"title":"Get Autodiscover logs","method":"get","path":"/api/v1/get/logs/autodiscover/{count}","slug":"get~api~v1~get~logs~autodiscover~count"}]}]},{"title":"Queue Manager","children":[{"title":"Get Queue","actions":[{"title":"Get Queue","method":"get","path":"/api/v1/get/mailq/all","slug":"get~api~v1~get~mailq~all"}]},{"title":"Flush Queue","actions":[{"title":"Flush Queue","method":"post","path":"/api/v1/edit/mailq","slug":"post~api~v1~edit~mailq"}]},{"title":"Delete Queue","actions":[{"title":"Delete Queue","method":"post","path":"/api/v1/delete/mailq","slug":"post~api~v1~delete~mailq"}]}]},{"title":"Quarantine","children":[{"title":"Get mails in Quarantine","actions":[{"title":"Get mails in Quarantine","method":"get","path":"/api/v1/get/quarantine/all","slug":"get~api~v1~get~quarantine~all"}]},{"title":"Delete mails in Quarantine","actions":[{"title":"Delete mails in Quarantine","method":"post","path":"/api/v1/delete/qitem","slug":"post~api~v1~delete~qitem"}]}]},{"title":"Fail2Ban","children":[{"title":"Get Fail2Ban Config","actions":[{"title":"Get Fail2Ban Config","method":"get","path":"/api/v1/get/fail2ban","slug":"get~api~v1~get~fail2ban"}]},{"title":"Edit Fail2Ban","actions":[{"title":"Edit Fail2Ban","method":"post","path":"/api/v1/edit/fail2ban","slug":"post~api~v1~edit~fail2ban"}]}]},{"title":"DKIM","children":[{"title":"Get DKIM Key","actions":[{"title":"Get DKIM Key","method":"get","path":"/api/v1/get/dkim/{domain}","slug":"get~api~v1~get~dkim~domain"}]},{"title":"Generate DKIM Key","actions":[{"title":"Generate DKIM Key","method":"post","path":"/api/v1/add/dkim","slug":"post~api~v1~add~dkim"}]},{"title":"Duplicate DKIM Key","actions":[{"title":"Duplicate DKIM Key","method":"post","path":"/api/v1/add/dkim_duplicate","slug":"post~api~v1~add~dkim~duplicate"}]},{"title":"Delete DKIM Key","actions":[{"title":"Delete DKIM Key","method":"post","path":"/api/v1/delete/dkim","slug":"post~api~v1~delete~dkim"}]}]},{"title":"Domain admin","children":[{"title":"Get Domain Admins","actions":[{"title":"Get Domain Admins","method":"get","path":"/api/v1/get/domain-admin/all","slug":"get~api~v1~get~domain-admin~all"}]},{"title":"Create Domain Admin user","actions":[{"title":"Create Domain Admin user","method":"post","path":"/api/v1/add/domain-admin","slug":"post~api~v1~add~domain-admin"}]},{"title":"Delete Domain Admin","actions":[{"title":"Delete Domain Admin","method":"post","path":"/api/v1/delete/domain-admin","slug":"post~api~v1~delete~domain-admin"}]}]},{"title":"Address Rewriting","children":[{"title":"Get BCC Map","actions":[{"title":"Get BCC Map","method":"get","path":"/api/v1/get/bcc/{id}","slug":"get~api~v1~get~bcc~id"}]},{"title":"Create BCC Map","actions":[{"title":"Create BCC Map","method":"post","path":"/api/v1/add/bcc","slug":"post~api~v1~add~bcc"}]},{"title":"Delete BCC Map","actions":[{"title":"Delete BCC Map","method":"post","path":"/api/v1/delete/bcc","slug":"post~api~v1~delete~bcc"}]},{"title":"Get Recipient Map","actions":[{"title":"Get Recipient Map","method":"get","path":"/api/v1/get/recipient_map/{id}","slug":"get~api~v1~get~recipient~map~id"}]},{"title":"Create Recipient Map","actions":[{"title":"Create Recipient Map","method":"post","path":"/api/v1/add/recipient_map","slug":"post~api~v1~add~recipient~map"}]},{"title":"Delete Recipient Map","actions":[{"title":"Delete Recipient Map","method":"post","path":"/api/v1/delete/recipient_map","slug":"post~api~v1~delete~recipient~map"}]}]},{"title":"Outgoing TLS Policy Map Overrides","children":[{"title":"Get TLS Policy Map","actions":[{"title":"Get TLS Policy Map","method":"get","path":"/api/v1/get/tls-policy-map/{id}","slug":"get~api~v1~get~tls-policy-map~id"}]},{"title":"Create TLS Policy Map","actions":[{"title":"Create TLS Policy Map","method":"post","path":"/api/v1/add/tls-policy-map","slug":"post~api~v1~add~tls-policy-map"}]},{"title":"Delete TLS Policy Map","actions":[{"title":"Delete TLS Policy Map","method":"post","path":"/api/v1/delete/tls-policy-map","slug":"post~api~v1~delete~tls-policy-map"}]}]},{"title":"oAuth Clients","children":[{"title":"Get oAuth Clients","actions":[{"title":"Get oAuth Clients","method":"get","path":"/api/v1/get/oauth2-client/{id}","slug":"get~api~v1~get~oauth2-client~id"}]},{"title":"Create oAuth Client","actions":[{"title":"Create oAuth Client","method":"post","path":"/api/v1/add/oauth2-client","slug":"post~api~v1~add~oauth2-client"}]},{"title":"Delete oAuth Client","actions":[{"title":"Delete oAuth Client","method":"post","path":"/api/v1/delete/oauth2-client","slug":"post~api~v1~delete~oauth2-client"}]}]},{"title":"Routing","children":[{"title":"Get Sender-Dependent Transports","actions":[{"title":"Get Sender-Dependent Transports","method":"get","path":"/api/v1/get/relayhost/{id}","slug":"get~api~v1~get~relayhost~id"}]},{"title":"Create Sender-Dependent Transports","actions":[{"title":"Create Sender-Dependent Transports","method":"post","path":"/api/v1/add/relayhost","slug":"post~api~v1~add~relayhost"}]},{"title":"Delete Sender-Dependent Transports","actions":[{"title":"Delete Sender-Dependent Transports","method":"post","path":"/api/v1/delete/relayhost","slug":"post~api~v1~delete~relayhost"}]},{"title":"Get Transport Maps","actions":[{"title":"Get Transport Maps","method":"get","path":"/api/v1/get/transport/{id}","slug":"get~api~v1~get~transport~id"}]},{"title":"Create Transport Maps","actions":[{"title":"Create Transport Maps","method":"post","path":"/api/v1/add/transport/all","slug":"post~api~v1~add~transport~all"}]},{"title":"Delete Transport Maps","actions":[{"title":"Delete Transport Maps","method":"post","path":"/api/v1/delete/transport","slug":"post~api~v1~delete~transport"}]}]},{"title":"Resources","children":[{"title":"Get Resources","actions":[{"title":"Get Resources","method":"get","path":"/api/v1/get/resource/all","slug":"get~api~v1~get~resource~all"}]},{"title":"Create Resources","actions":[{"title":"Create Resources","method":"post","path":"/api/v1/add/resource","slug":"post~api~v1~add~resource"}]},{"title":"Delete Resources","actions":[{"title":"Delete Resources","method":"post","path":"/api/v1/delete/resource","slug":"post~api~v1~delete~resource"}]}]},{"title":"App Passwords","children":[{"title":"Get App Password","actions":[{"title":"Get App Password","method":"get","path":"/api/v1/get/app-passwd/all/{mailbox}","slug":"get~api~v1~get~app-passwd~all~mailbox"}]},{"title":"Create App Password","actions":[{"title":"Create App Password","method":"post","path":"/api/v1/add/app-passwd","slug":"post~api~v1~add~app-passwd"}]},{"title":"Delete App Password","actions":[{"title":"Delete App Password","method":"post","path":"/api/v1/delete/app-passwd","slug":"post~api~v1~delete~app-passwd"}]}]},{"title":"status","children":[{"title":"Get container status","actions":[{"title":"Get container status","method":"get","path":"/api/v1/get/status/containers","slug":"get~api~v1~get~status~containers"}]},{"title":"Get vmail status","actions":[{"title":"Get vmail status","method":"get","path":"/api/v1/get/status/vmail","slug":"get~api~v1~get~status~vmail"}]},{"title":"Get solr status","actions":[{"title":"Get solr status","method":"get","path":"/api/v1/get/status/solr","slug":"get~api~v1~get~status~solr"}]}]}],"config":{"playground":{"enabled":true,"env":"easy","environments":{"easy":{"playground":false,"url":"/"},"advanced":{"url":"/"}}},"sidebar":{"groupOrder":"auto"},"basePath":"/","stylesheets":[]}}
+ props: {"title":"mailcow API","description":"mailcow is complete e-mailing solution with advanced antispam, antivirus, nice UI and API.\n\nIn order to use this API you have to create a API key and add your IP address to the whitelist of allowed IPs this can be done by logging into the Mailcow UI using your admin account, then go to Configuration > Access > Edit administrator details > API. There you will find a collapsed API menu.\n\n**This documentation is in Work In Progress status. It contains only few endpoints.**","version":"","servers":[{"url":"https://mailcow.host/"}],"tags":[{"title":"Domains","description":"","children":[{"title":"Get domains","description":"","children":[]},{"title":"Create domain","description":"","children":[]},{"title":"Update domain","description":"","children":[]},{"title":"Delete domain","description":"","children":[]}]},{"title":"Domain antispam policies","description":"You can create antispam whitelist and blacklist policies","children":[{"title":"List whitelist domain policy","description":"","children":[]},{"title":"List blacklist domain policy","description":"","children":[]},{"title":"Create domain policy","description":"","children":[]},{"title":"Delete domain policy","description":"","children":[]}]},{"title":"Mailboxes","description":"","children":[{"title":"Get mailboxes","description":"","children":[]},{"title":"Create mailbox","description":"","children":[]},{"title":"Update mailbox","description":"","children":[]},{"title":"Update mailbox ACL","description":"","children":[]},{"title":"Update Pushover settings","description":"","children":[]},{"title":"Delete mailbox","description":"","children":[]},{"title":"Quarantine Notifications","description":"","children":[]}]},{"title":"Aliases","description":"","children":[{"title":"Get aliases","description":"","children":[]},{"title":"Create alias","description":"","children":[]},{"title":"Update alias","description":"","children":[]},{"title":"Delete alias","description":"","children":[]}]},{"title":"Sync jobs","description":"","children":[{"title":"Get sync jobs","description":"","children":[]},{"title":"Create sync job","description":"","children":[]},{"title":"Update sync job","description":"","children":[]},{"title":"Delete sync job","description":"","children":[]}]},{"title":"Fordwarding Hosts","description":"","children":[{"title":"Get Forwarding Hosts","description":"","children":[]},{"title":"Add Forward Host","description":"","children":[]},{"title":"Delete Forward Host","description":"","children":[]}]},{"title":"Logs","description":"","children":[{"title":"Get Postfix logs","description":"","children":[]},{"title":"Get Rspamd logs","description":"","children":[]},{"title":"Get Dovecot logs","description":"","children":[]},{"title":"Get ACME logs","description":"","children":[]},{"title":"Get SOGo logs","description":"","children":[]},{"title":"Get Watchdog logs","description":"","children":[]},{"title":"Get Api logs","description":"","children":[]},{"title":"Get Ratelimit logs","description":"","children":[]},{"title":"Get Netfilter logs","description":"","children":[]},{"title":"Get Autodiscover logs","description":"","children":[]}]},{"title":"Queue Manager","description":"","children":[{"title":"Get Queue","description":"","children":[]},{"title":"Flush Queue","description":"","children":[]},{"title":"Delete Queue","description":"","children":[]}]},{"title":"Quarantine","description":"","children":[{"title":"Get mails in Quarantine","description":"","children":[]},{"title":"Delete mails in Quarantine","description":"","children":[]}]},{"title":"Fail2Ban","description":"","children":[{"title":"Get Fail2Ban Config","description":"","children":[]},{"title":"Edit Fail2Ban","description":"","children":[]}]},{"title":"DKIM","description":"","children":[{"title":"Get DKIM Key","description":"","children":[]},{"title":"Generate DKIM Key","description":"","children":[]},{"title":"Duplicate DKIM Key","description":"","children":[]},{"title":"Delete DKIM Key","description":"","children":[]}]},{"title":"Domain admin","description":"","children":[{"title":"Get Domain Admins","description":"","children":[]},{"title":"Create Domain Admin user","description":"","children":[]},{"title":"Delete Domain Admin","description":"","children":[]}]},{"title":"Address Rewriting","description":"","children":[{"title":"Get BCC Map","description":"","children":[]},{"title":"Create BCC Map","description":"","children":[]},{"title":"Delete BCC Map","description":"","children":[]},{"title":"Get Recipient Map","description":"","children":[]},{"title":"Create Recipient Map","description":"","children":[]},{"title":"Delete Recipient Map","description":"","children":[]}]},{"title":"Outgoing TLS Policy Map Overrides","description":"","children":[{"title":"Get TLS Policy Map","description":"","children":[]},{"title":"Create TLS Policy Map","description":"","children":[]},{"title":"Delete TLS Policy Map","description":"","children":[]}]},{"title":"oAuth Clients","description":"","children":[{"title":"Get oAuth Clients","description":"","children":[]},{"title":"Create oAuth Client","description":"","children":[]},{"title":"Delete oAuth Client","description":"","children":[]}]},{"title":"Routing","description":"","children":[{"title":"Get Sender-Dependent Transports","description":"","children":[]},{"title":"Create Sender-Dependent Transports","description":"","children":[]},{"title":"Delete Sender-Dependent Transports","description":"","children":[]},{"title":"Get Transport Maps","description":"","children":[]},{"title":"Create Transport Maps","description":"","children":[]},{"title":"Delete Transport Maps","description":"","children":[]}]},{"title":"Resources","description":"","children":[{"title":"Get Resources","description":"","children":[]},{"title":"Create Resources","description":"","children":[]},{"title":"Delete Resources","description":"","children":[]}]},{"title":"App Passwords","description":"","children":[{"title":"Get App Password","description":"","children":[]},{"title":"Create App Password","description":"","children":[]},{"title":"Delete App Password","description":"","children":[]}]},{"title":"status","description":"","children":[{"title":"Get container status","description":"","children":[]},{"title":"Get vmail status","description":"","children":[]},{"title":"Get solr status","description":"","children":[]}]},{"title":"Ratelimits","description":"","children":[{"title":"Get Ratelimits","description":"","children":[]}]}],"actions":[{"title":"Get domains","path":"/api/v1/get/domain/{id}","pathTemplate":"/api/v1/get/domain/{id}","slug":"get~api~v1~get~domain~id","method":"get","description":"\nYou can list all domains existing in system.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","mailcow.tld"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"max_new_mailbox_quota\": 10737418240,\n \"def_new_mailbox_quota\": 3221225472,\n \"quota_used_in_domain\": \"0\",\n \"bytes_total\": \"5076666944\",\n \"msgs_total\": \"172440\",\n \"mboxes_in_domain\": 0,\n \"mboxes_left\": 10,\n \"domain_name\": \"domain.tld\",\n \"description\": \"Some description\",\n \"max_num_aliases_for_domain\": 400,\n \"max_num_mboxes_for_domain\": 10,\n \"def_quota_for_mbox\": 3221225472,\n \"max_quota_for_mbox\": 10737418240,\n \"max_quota_for_domain\": 10737418240,\n \"relayhost\": \"0\",\n \"backupmx\": \"✘\",\n \"gal\": \"✘\",\n \"backupmx_int\": 0,\n \"gal_int\": 0,\n \"lang\": \"en\",\n \"rl\": false,\n \"active\": \"✔\",\n \"active_int\": 1,\n \"relay_all_recipients\": \"✘\",\n \"relay_all_recipients_int\": 0,\n \"aliases_in_domain\": 0,\n \"aliases_left\": 400\n },\n {\n \"max_new_mailbox_quota\": 10737418240,\n \"def_new_mailbox_quota\": 3221225472,\n \"quota_used_in_domain\": \"0\",\n \"bytes_total\": \"5076666944\",\n \"msgs_total\": \"172440\",\n \"mboxes_in_domain\": 0,\n \"mboxes_left\": 10,\n \"domain_name\": \"domain2.tld\",\n \"description\": \"domain description\",\n \"max_num_aliases_for_domain\": 400,\n \"max_num_mboxes_for_domain\": 10,\n \"def_quota_for_mbox\": 3221225472,\n \"max_quota_for_mbox\": 10737418240,\n \"max_quota_for_domain\": 10737418240,\n \"relayhost\": \"0\",\n \"backupmx\": \"✔\",\n \"gal\": \"✘\",\n \"backupmx_int\": 1,\n \"gal_int\": 0,\n \"lang\": \"cs\",\n \"rl\": false,\n \"active\": \"✔\",\n \"active_int\": 1,\n \"relay_all_recipients\": \"✘\",\n \"relay_all_recipients_int\": 0,\n \"aliases_in_domain\": 0,\n \"aliases_left\": 400\n }\n]\n","schema":""}}],"tags":["Domains","Get domains"]},{"title":"Create domain","path":"/api/v1/add/domain","pathTemplate":"/api/v1/add/domain","slug":"post~api~v1~add~domain","method":"post","description":"\nYou may create your own domain using this action. It takes a JSON object containing a domain informations.","parameters":[],"transactions":[{"request":{"title":"json","description":"You can also define rate limiting. If `rl_value` is not empty string, them ratelimit object is created and returned in response.","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"domain","description":"Fully qualified domain name","required":false,"members":[],"schema":{"type":"string"}},{"key":"description","description":"Description of domain","required":false,"members":[],"schema":{"type":"string"}},{"key":"aliases","description":"limit count of aliases associated with this domain","required":false,"members":[],"schema":{"type":"number"}},{"key":"mailboxes","description":"limit count of mailboxes associated with this domain","required":false,"members":[],"schema":{"type":"number"}},{"key":"defquota","description":"predefined mailbox quota in `add mailbox` form","required":false,"members":[],"schema":{"type":"number"}},{"key":"maxquota","description":"maximum quota per mailbox","required":false,"members":[],"schema":{"type":"number"}},{"key":"quota","description":"maximum quota for this domain (for all mailboxes in sum)","required":false,"members":[],"schema":{"type":"number"}},{"key":"active","description":"is domain active or not","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"rl_value","description":"rate limit value","required":false,"members":[],"schema":{"type":"number"}},{"key":"rl_frame","required":false,"members":[],"schema":{"type":"enum"}},{"key":"backupmx","description":"relay domain or not","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"relay_all_recipients","description":"if not, them you have to create \"dummy\" mailbox for each address to relay","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"lang","description":"language code","required":false,"members":[],"schema":{"type":"enum"}}]},"example":"{\n \"domain\":\"domain.tld\",\n \"description\":\"some decsription\",\n \"aliases\":\"400\",\n \"mailboxes\":\"10\",\n \"defquota\":\"3072\",\n \"maxquota\":\"10240\",\n \"quota\":\"10240\",\n \"active\":\"1\",\n \"rl_value\":\"10\",\n \"rl_frame\":\"s\",\n \"backupmx\":\"0\",\n \"relay_all_recipients\":\"0\",\n \"lang\":\"cs\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"domain\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"aliases\": {\n \"type\": \"number\"\n },\n \"mailboxes\": {\n \"type\": \"number\"\n },\n \"defquota\": {\n \"type\": \"number\"\n },\n \"maxquota\": {\n \"type\": \"number\"\n },\n \"quota\": {\n \"type\": \"number\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"rl_value\": {\n \"type\": \"number\"\n },\n \"rl_frame\": {\n \"enum\": [\n \"s\",\n \"m\",\n \"h\"\n ]\n },\n \"backupmx\": {\n \"type\": \"boolean\"\n },\n \"relay_all_recipients\": {\n \"type\": \"boolean\"\n },\n \"lang\": {\n \"enum\": [\n \"sk\",\n \"cs\",\n \"de\",\n \"en\",\n \"es\",\n \"fr\",\n \"lv\",\n \"nl\",\n \"pl\",\n \"pt\",\n \"ru\",\n \"it\",\n \"ca\"\n ]\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":" [\n {\n \"type\": \"success\",\n \"log\": [\n \"ratelimit\",\n \"edit\",\n \"domain\",\n {\n \"rl_value\": \"10\",\n \"rl_frame\": \"s\",\n \"object\": \"domain.tld\"\n }\n ],\n \"msg\": [\n \"rl_saved\",\n \"domain.tld\"\n ]\n },\n {\n \"type\": \"success\",\n \"log\": [\n \"mailbox\",\n \"add\",\n \"domain\",\n {\n \"domain\": \"domain.tld\",\n \"description\": \"some decsription\",\n \"aliases\": \"400\",\n \"mailboxes\": \"10\",\n \"defquota\": \"3072\",\n \"maxquota\": \"10240\",\n \"quota\": \"10240\",\n \"active\": \"1\",\n \"rl_value\": \"10\",\n \"rl_frame\": \"s\",\n \"backupmx\": \"0\",\n \"relay_all_recipients\": \"0\",\n \"lang\":\"cs\"\n },\n null\n ],\n \"msg\": [\n \"domain_added\",\n \"domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domains","Create domain"]},{"title":"Update domain","path":"/api/v1/edit/domain","pathTemplate":"/api/v1/edit/domain","slug":"post~api~v1~edit~domain","method":"post","description":"\nYou can update one or more domains per request. You can also send just attributes you want to change.\nExample: You can add domain names to items list and in attr object just include `\"active\": \"0\"` to deactivate domains.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["domain_name"],"description":"contains list of domain names you want update","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"domain.tld\"\n ],\n \"attr\":{\n \"description\":\"domain description\",\n \"aliases\":\"400\",\n \"mailboxes\":\"10\",\n \"defquota\":\"3072\",\n \"maxquota\":\"10240\",\n \"quota\":\"10240\",\n \"active\":\"1\",\n \"gal\":\"1\",\n \"relayhost\":\"2\",\n \"backupmx\":\"1\",\n \"relay_all_recipients\":\"0\",\n \"lang\":\"cs\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"description\": {\n \"type\": \"string\"\n },\n \"aliases\": {\n \"type\": \"number\"\n },\n \"mailboxes\": {\n \"type\": \"number\"\n },\n \"defquota\": {\n \"type\": \"number\"\n },\n \"maxquota\": {\n \"type\": \"number\"\n },\n \"quota\": {\n \"type\": \"number\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"gal\": {\n \"type\": \"boolean\"\n },\n \"relayhost\": {\n \"type\": \"number\"\n },\n \"backupmx\": {\n \"type\": \"boolean\"\n },\n \"relay_all_recipients\": {\n \"type\": \"boolean\"\n },\n \"lang\": {\n \"enum\": [\n \"sk\",\n \"cs\",\n \"de\",\n \"en\",\n \"es\",\n \"fr\",\n \"lv\",\n \"nl\",\n \"pl\",\n \"pt\",\n \"ru\",\n \"it\",\n \"ca\"\n ]\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"edit\",\n \"domain\",\n {\n \"domain\":[\n \"domain.tld\"\n ],\n \"description\":\"domain description\",\n \"aliases\":\"400\",\n \"mailboxes\":\"10\",\n \"defquota\":\"3072\",\n \"maxquota\":\"10240\",\n \"quota\":\"10240\",\n \"active\":\"1\",\n \"gal\":\"1\",\n \"relayhost\":\"2\",\n \"backupmx\":\"1\",\n \"relay_all_recipients\":\"0\",\n \"lang:\"cs\"\n },\n null\n ],\n \"msg\":[\n \"domain_modified\",\n \"domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domains","Update domain"]},{"title":"Delete domain","path":"/api/v1/delete/domain","pathTemplate":"/api/v1/delete/domain","slug":"post~api~v1~delete~domain","method":"post","description":"\nYou can delete one or more domains.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["domain_name"],"description":"contains list of domains you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"domain.tld\",\n \"domain2.tld\"\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"domain\",\n {\n \"domain\":[\n \"domain.tld\",\n \"domain2.tld\"\n ]\n },\n null\n ],\n \"msg\":[\n \"domain_removed\",\n \"domain.tld\"\n ]\n },\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"domain\",\n {\n \"domain\":[\n \"domain.tld\",\n \"domain2.tld\"\n ]\n },\n null\n ],\n \"msg\":[\n \"domain_removed\",\n \"domain2.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domains","Delete domain"]},{"title":"List whitelist domain policy","path":"/api/v1/get/policy_wl_domain/{domain}","pathTemplate":"/api/v1/get/policy_wl_domain/{domain}","slug":"get~api~v1~get~policy~wl~domain~domain","method":"get","description":"\nYou can list all whitelist policies per domain.","parameters":[{"location":"path","name":"domain","description":"name of domain","required":true,"schema":{"type":"string"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"object\": \"domain.tld\",\n \"value\": \"*@gooddomain.tld\",\n \"prefid\": 1\n }\n]\n","schema":""}}],"tags":["Domain antispam policies","List whitelist domain policy"]},{"title":"List blacklist domain policy","path":"/api/v1/get/policy_bl_domain/{domain}","pathTemplate":"/api/v1/get/policy_bl_domain/{domain}","slug":"get~api~v1~get~policy~bl~domain~domain","method":"get","description":"\nYou can list all blacklist policies per domain.","parameters":[{"location":"path","name":"domain","description":"name of domain","required":true,"schema":{"type":"string"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"object\": \"domain.tld\",\n \"value\": \"*@baddomain.tld\",\n \"prefid\": 2\n }\n]\n","schema":""}}],"tags":["Domain antispam policies","List blacklist domain policy"]},{"title":"Create domain policy","path":"/api/v1/add/domain-policy","pathTemplate":"/api/v1/add/domain-policy","slug":"post~api~v1~add~domain-policy","method":"post","description":"\nYou may create your own domain policy using this action. It takes a JSON object containing a domain informations.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"domain","description":"domain name to which policy is associated to","required":false,"members":[],"schema":{"type":"string"}},{"key":"object_list","required":false,"members":[],"schema":{"type":"enum"}},{"key":"object_from","description":"exact address or use wildcard to match whole domain","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"domain\":\"domain.tld\",\n \"object_list\":\"bl\",\n \"object_from\":\"*@baddomain.tld\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"domain\": {\n \"type\": \"string\"\n },\n \"object_list\": {\n \"enum\": [\n \"wl\",\n \"bl\"\n ]\n },\n \"object_from\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"policy\",\n \"add\",\n \"domain\",\n {\n \"domain\":\"domain.tld\",\n \"object_list\":\"bl\",\n \"object_from\":\"*@baddomain.tld\"\n }\n ],\n \"msg\":[\n \"domain_modified\",\n \"domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domain antispam policies","Create domain policy"]},{"title":"Delete domain policy","path":"/api/v1/delete/domain-policy","pathTemplate":"/api/v1/delete/domain-policy","slug":"post~api~v1~delete~domain-policy","method":"post","description":"\nYou can delete one o more domain policies.","parameters":[],"transactions":[{"request":{"title":"json","description":"Delete domain policy by ID","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of domain policys you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"1\",\n \"2\"\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":" [\n {\n \"type\":\"success\",\n \"log\":[\n \"policy\",\n \"delete\",\n \"domain\",\n {\n \"prefid\":[\n \"1\",\n \"2\"\n ]\n }\n ],\n \"msg\":[\n \"item_deleted\",\n \"1\"\n ]\n },\n {\n \"type\":\"success\",\n \"log\":[\n \"policy\",\n \"delete\",\n \"domain\",\n {\n \"prefid\":[\n \"1\",\n \"2\"\n ]\n }\n ],\n \"msg\":[\n \"item_deleted\",\n \"2\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domain antispam policies","Delete domain policy"]},{"title":"Get mailboxes","path":"/api/v1/get/mailbox/{id}","pathTemplate":"/api/v1/get/mailbox/{id}","slug":"get~api~v1~get~mailbox~id","method":"get","description":"\nYou can list all mailboxes existing in system.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","user@domain.tld"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"max_new_quota\":10737418240,\n \"username\":\"info@doman3.tld\",\n \"rl\":false,\n \"is_relayed\":0,\n \"name\":\"Full name\",\n \"active\":\"✔\",\n \"active_int\":1,\n \"domain\":\"doman3.tld\",\n \"local_part\":\"info\",\n \"quota\":3221225472,\n \"attributes\":{\n \"force_pw_update\":\"0\",\n \"tls_enforce_in\":\"0\",\n \"tls_enforce_out\":\"0\",\n \"sogo_access\":\"1\",\n \"mailbox_format\":\"maildir:\",\n \"quarantine_notification\":\"never\"\n },\n \"quota_used\":0,\n \"percent_in_use\":0,\n \"messages\":0,\n \"spam_aliases\":0,\n \"percent_class\":\"success\"\n }\n]\n","schema":""}}],"tags":["Mailboxes","Get mailboxes"]},{"title":"Create mailbox","path":"/api/v1/add/mailbox","pathTemplate":"/api/v1/add/mailbox","slug":"post~api~v1~add~mailbox","method":"post","description":"\nYou may create your own mailbox using this action. It takes a JSON object containing a domain informations.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"local_part","description":"left part of email address","required":false,"members":[],"schema":{"type":"string"}},{"key":"domain","description":"domain name","required":false,"members":[],"schema":{"type":"string"}},{"key":"name","description":"Full name of the mailbox user","required":false,"members":[],"schema":{"type":"string"}},{"key":"quota","description":"mailbox quota","required":false,"members":[],"schema":{"type":"number"}},{"key":"pasword","description":"mailbox password","required":false,"members":[],"schema":{"type":"string"}},{"key":"password2","description":"mailbox password for confirmation","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"is mailbox active or not","required":false,"members":[],"schema":{"type":"boolean"}}]},"example":"{\n \"local_part\":\"info\",\n \"domain\":\"domain.tld\",\n \"name\":\"Full name\",\n \"quota\":\"3072\",\n \"password\":\"atedismonsin\",\n \"password2\":\"atedismonsin\",\n \"active\":\"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"local_part\": {\n \"type\": \"string\"\n },\n \"domain\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"quota\": {\n \"type\": \"number\"\n },\n \"pasword\": {\n \"type\": \"string\"\n },\n \"password2\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"boolean\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"add\",\n \"mailbox\",\n {\n \"local_part\":\"info\",\n \"domain\":\"domain.tld\",\n \"name\":\"Full name\",\n \"quota\":\"3072\",\n \"password\":\"*\",\n \"password2\":\"*\",\n \"active\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"mailbox_added\",\n \"info@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Mailboxes","Create mailbox"]},{"title":"Update mailbox","path":"/api/v1/edit/mailbox","pathTemplate":"/api/v1/edit/mailbox","slug":"post~api~v1~edit~mailbox","method":"post","description":"\nYou can update one or more mailboxes per request. You can also send just attributes you want to change","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["mailbox_name"],"description":"contains list of mailboxes you want update","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{"sender_acl":["default","info@domain2.tld","domain3.tld","asterix"]},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"info@domain.tld\"\n ],\n \"attr\":{\n \"name\":\"Full name\",\n \"quota\":\"3072\",\n \"password\":\"\",\n \"password2\":\"\",\n \"active\":\"1\",\n \"sender_acl\":[\n \"default\",\n \"info@domain2.tld\",\n \"domain3.tld\",\n \"*\"\n ],\n \"force_pw_update\":\"0\",\n \"sogo_access\":\"1\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"quota\": {\n \"type\": \"number\"\n },\n \"pasword\": {\n \"type\": \"string\"\n },\n \"password2\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"sender_acl\": {\n \"type\": \"array\"\n },\n \"force_pw_update\": {\n \"type\": \"boolean\"\n },\n \"sogo_access\": {\n \"type\": \"boolean\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"edit\",\n \"mailbox\",\n {\n \"username\":[\n \"info@domain.tld\"\n ],\n \"name\":\"Full name\",\n \"quota\":\"3072\",\n \"password\":\"*\",\n \"password2\":\"*\",\n \"active\":\"1\",\n \"sender_acl\":[\n \"default\",\n \"info@domain2.tld\",\n \"domain3.tld\",\n \"*\"\n ],\n \"force_pw_update\":\"0\",\n \"sogo_access\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"mailbox_modified\",\n \"info@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Mailboxes","Update mailbox"]},{"title":"Update mailbox ACL","path":"/api/v1/edit/user-acl","pathTemplate":"/api/v1/edit/user-acl","slug":"post~api~v1~edit~user-acl","method":"post","description":"\nUsing this endpoints its possible to update the ACL's for mailboxes","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["local_part@domain"],"description":"contains list of mailboxes you want to delete","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{"user_acl":["spam_alias","tls_policy","spam_score","spam_policy","delimiter_action","syncjobs","eas_reset","quarantine","sogo_profile_reset","quarantine_attachments","quarantine_notification","app_passwds","pushover"]},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\": [\"info@domain.tld\"],\n \"attr\": {\n \"user_acl\": [\"spam_alias\",\"tls_policy\",\"spam_score\",\"spam_policy\",\"delimiter_action\",\"syncjobs\",\"eas_reset\",\"quarantine\",\"sogo_profile_reset\",\"quarantine_attachments\",\"quarantine_notification\",\"app_passwds\",\"pushover\"]\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"user_acl\": {\n \"type\": \"array\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"acl\",\n \"edit\",\n \"user\",\n {\n \"username\": [\n \"info@domain.tld\"\n ],\n \"user_acl\": [\n \"spam_alias\",\n \"tls_policy\",\n \"spam_score\",\n \"spam_policy\",\n \"delimiter_action\",\n \"syncjobs\",\n \"eas_reset\",\n \"quarantine\",\n \"sogo_profile_reset\",\n \"quarantine_attachments\",\n \"quarantine_notification\",\n \"app_passwds\",\n \"pushover\"\n ]\n }\n ],\n \"msg\": [\n \"acl_saved\",\n \"info@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Mailboxes","Update mailbox ACL"]},{"title":"Update Pushover settings","path":"/api/v1/edit/pushover","pathTemplate":"/api/v1/edit/pushover","slug":"post~api~v1~edit~pushover","method":"post","description":"\nUsing this endpoint it is possible to update the pushover settings for mailboxes","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["local_part@domain"],"description":"contains list of mailboxes you want to delete","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\": [\"info@domain.tld\"],\n \"attr\":\n {\n \"evaluate_x_prio\": \"0\",\n \"only_x_prio\": \"0\",\n \"active\": \"0\",\n \"token\":\"9023e2ohcwed27d1idu2\",\n \"key\":\"21e8918e1jksdjcpis712\",\n \"title\":\"Mail\",\n \"text\":\"\",\n \"senders\":\"\",\n \"senders_regex\":\"\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"evaluate_x_prio\": {\n \"type\": \"number\"\n },\n \"only_x_prio\": {\n \"type\": \"number\"\n },\n \"active\": {\n \"type\": \"number\"\n },\n \"token\": {\n \"type\": \"string\"\n },\n \"key\": {\n \"type\": \"string\"\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"senders\": {\n \"type\": \"string\"\n },\n \"senders_regex\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"pushover\",\n \"edit\",\n {\n \"username\": [\n \"info@domain.tld\"\n ],\n \"evaluate_x_prio\": \"0\",\n \"only_x_prio\": \"0\",\n \"active\": \"0\",\n \"token\": \"9023e2ohcwed27d1idu2\",\n \"key\": \"21e8918e1jksdjcpis712\",\n \"title\": \"Mail\",\n \"text\": \"\",\n \"senders\": \"\",\n \"senders_regex\": \"\"\n }\n ],\n \"msg\": \"pushover_settings_edited\"\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Mailboxes","Update Pushover settings"]},{"title":"Delete mailbox","path":"/api/v1/delete/mailbox","pathTemplate":"/api/v1/delete/mailbox","slug":"post~api~v1~delete~mailbox","method":"post","description":"\nYou can delete one or more mailboxes.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["local_part@domain"],"description":"contains list of mailboxes you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"info@domain.tld\",\n \"sales@domain.tld\"\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"mailbox\",\n {\n \"username\":[\n \"info@domain.tld\",\n \"sales@domain.tld\"\n ]\n },\n null\n ],\n \"msg\":[\n \"mailbox_removed\",\n \"info@domain.tld\"\n ]\n },\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"mailbox\",\n {\n \"username\":[\n \"info@domain.tld\",\n \"sales@domain.tld\"\n ]\n },\n null\n ],\n \"msg\":[\n \"mailbox_removed\",\n \"sales@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Mailboxes","Delete mailbox"]},{"title":"Quarantine Notifications","path":"/api/v1/edit/quarantine_notification","pathTemplate":"/api/v1/edit/quarantine_notification","slug":"post~api~v1~edit~quarantine~notification","method":"post","description":"\nYou can update one or more mailboxes per request.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["mailbox_name"],"description":"contains list of mailboxes you want set qurantine notifications","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"mailbox1@domain.tld\",\n \"mailbox2@domain.tld\"\n ],\n \"attr\":{\n \"quarantine_notification\":\"hourly\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"quarantine_notification\": {\n \"enum\": [\n \"hourly\",\n \"daily\",\n \"weekly\",\n \"never\"\n ]\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"","schema":""}}],"tags":["Mailboxes","Quarantine Notifications"]},{"title":"Get aliases","path":"/api/v1/get/alias/{id}","pathTemplate":"/api/v1/get/alias/{id}","slug":"get~api~v1~get~alias~id","method":"get","description":"\nYou can list mailbox aliases existing in system.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"in_primary_domain\": \"\",\n \"id\": 6,\n \"domain\": \"domain.tld\",\n \"public_comment\": null,\n \"private_comment\": null,\n \"goto\": \"destination@domain.tld\",\n \"address\": \"alias@domain.tld\",\n \"is_catch_all\": 0,\n \"active\": \"✔\",\n \"active_int\": 1,\n \"created\": \"2019-04-04 19:29:49\",\n \"modified\": null\n },\n {\n \"in_primary_domain\": \"\",\n \"id\": 10,\n \"domain\": \"domain.tld\",\n \"public_comment\": null,\n \"private_comment\": null,\n \"goto\": \"destination@domain.tld\",\n \"address\": \"@domain.tld\",\n \"is_catch_all\": 1,\n \"active\": \"✔\",\n \"active_int\": 1,\n \"created\": \"2019-04-27 13:42:39\",\n \"modified\": null\n }\n]\n","schema":""}}],"tags":["Aliases","Get aliases"]},{"title":"Create alias","path":"/api/v1/add/alias","pathTemplate":"/api/v1/add/alias","slug":"post~api~v1~add~alias","method":"post","description":"\nYou may create your own mailbox alias using this action. It takes a JSON object containing a domain informations.\nOnly one `goto*` option can be used, for ex. if you want learn as spam, then send just `goto_spam = 1` in request body.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"address","description":"alias address, for catchall use \"@domain.tld\"","required":false,"members":[],"schema":{"type":"string"}},{"key":"goto","description":"destination address, comma separated","required":false,"members":[],"schema":{"type":"string"}},{"key":"goto_null","description":"silently ignore","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"goto_spam","description":"learn as spam","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"goto_ham","description":"learn as ham","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"active","description":"is alias active or not","required":false,"members":[],"schema":{"type":"boolean"}}]},"example":"{\n \"address\":\"alias@domain.tld\",\n \"goto\":\"destination@domain.tld\",\n \"active\":\"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"address\": {\n \"type\": \"string\"\n },\n \"goto\": {\n \"type\": \"string\"\n },\n \"goto_null\": {\n \"type\": \"boolean\"\n },\n \"goto_spam\": {\n \"type\": \"boolean\"\n },\n \"goto_ham\": {\n \"type\": \"boolean\"\n },\n \"active\": {\n \"type\": \"boolean\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"add\",\n \"alias\",\n {\n \"address\":\"alias@domain.tld\",\n \"goto\":\"destination@domain.tld\",\n \"active\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"alias_added\",\n \"alias@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Aliases","Create alias"]},{"title":"Update alias","path":"/api/v1/edit/alias","pathTemplate":"/api/v1/edit/alias","slug":"post~api~v1~edit~alias","method":"post","description":"\nYou can update one or more aliases per request. You can also send just attributes you want to change","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of aliases you want update","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"6\"\n ],\n \"attr\":{\n \"address\":\"alias@domain.tld\",\n \"goto\":\"destination@domain.tld\",\n \"private_comment\":\"private comment\",\n \"public_comment\":\"public comment\",\n \"active\":\"1\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"address\": {\n \"type\": \"string\"\n },\n \"goto\": {\n \"type\": \"string\"\n },\n \"goto_null\": {\n \"type\": \"boolean\"\n },\n \"goto_spam\": {\n \"type\": \"boolean\"\n },\n \"goto_ham\": {\n \"type\": \"boolean\"\n },\n \"private_comment\": {\n \"type\": \"string\"\n },\n \"public_comment\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"boolean\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"edit\",\n \"alias\",\n {\n \"id\":[\n \"6\"\n ],\n \"address\":\"alias@domain.tld\",\n \"goto\":\"destination@domain.tld\",\n \"private_comment\":\"private comment\",\n \"public_comment\":\"public comment\",\n \"active\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"alias_modified\",\n \"alias@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Aliases","Update alias"]},{"title":"Delete alias","path":"/api/v1/delete/alias","pathTemplate":"/api/v1/delete/alias","slug":"post~api~v1~delete~alias","method":"post","description":"\nYou can delete one or more aliases.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"[\n \"6\",\n \"9\"\n]\n","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"alias\",\n {\n \"id\":[\n \"6\",\n \"9\"\n ]\n },\n null\n ],\n \"msg\":[\n \"alias_removed\",\n \"alias@domain.tld\"\n ]\n },\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"alias\",\n {\n \"id\":[\n \"6\",\n \"9\"\n ]\n },\n null\n ],\n \"msg\":[\n \"alias_removed\",\n \"alias2@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Aliases","Delete alias"]},{"title":"Get sync jobs","path":"/api/v1/get/syncjobs/all/no_log","pathTemplate":"/api/v1/get/syncjobs/all/no_log","slug":"get~api~v1~get~syncjobs~all~no~log","method":"get","description":"\nYou can list all syn jobs existing in system.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"user2\": \"mailbox@domain.tld\",\n \"host1\": \"imap.server.tld\",\n \"authmech1\": \"PLAIN\",\n \"regextrans2\": \"\",\n \"authmd51\": 0,\n \"domain2\": \"\",\n \"subfolder2\": \"External\",\n \"user1\": \"username\",\n \"exclude\": \"(?i)spam|(?i)junk\",\n \"maxage\": 0,\n \"mins_interval\": \"20\",\n \"maxbytespersecond\": \"0\",\n \"port1\": 993,\n \"enc1\": \"TLS\",\n \"delete2duplicates\": 1,\n \"delete1\": 0,\n \"delete2\": 0,\n \"automap\": 1,\n \"skipcrossduplicates\": 0,\n \"custom_params\": \"\",\n \"timeout1\": 600,\n \"timeout2\": 600,\n \"subscribeall\": 1,\n \"is_running\": 0,\n \"last_run\": \"2019-05-22 11:40:02\",\n \"created\": \"2019-05-22 11:37:25\",\n \"modified\": \"2019-05-22 11:40:02\",\n \"active\": \"✓\",\n \"active_int\": 1,\n \"log\": \"\"\n }\n]\n","schema":""}}],"tags":["Sync jobs","Get sync jobs"]},{"title":"Create sync job","path":"/api/v1/add/syncjob","pathTemplate":"/api/v1/add/syncjob","slug":"post~api~v1~add~syncjob","method":"post","description":"\nYou can create new sync job using this action. It takes a JSON object containing a domain informations.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"username","description":"The target mailbox","required":false,"members":[],"schema":{"type":"string"}},{"key":"delete2duplicates","description":"Delete duplicates on destination","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"delete1","description":"Delete from source when completed","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"delete2","description":"Delete messages on destination that are not on source","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"automap","description":"Try to automap folders (\"Sent items\", \"Sent\" => \"Sent\" etc.)","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"skipcrossduplicates","description":"Skip duplicate messages across folders (first come, first serve)","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"active","description":"Is sync job active","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"subscribeall","description":"Subscribe all folders","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"host1","description":"Hostname","required":false,"members":[],"schema":{"type":"string"}},{"key":"port1","description":"Port","required":false,"members":[],"schema":{"type":"string"}},{"key":"user1","description":"Username","required":false,"members":[],"schema":{"type":"string"}},{"key":"password1","description":"Password","required":false,"members":[],"schema":{"type":"string"}},{"key":"enc1","description":"Encryption","required":false,"members":[],"schema":{"type":"enum"}},{"key":"mins_interval","description":"Interval (min)","required":false,"members":[],"schema":{"type":"number"}},{"key":"subfolder2","description":"Sync into subfolder on destination (empty = do not use subfolder)","required":false,"members":[],"schema":{"type":"string"}},{"key":"maxage","description":"Maximum age of messages in days that will be polled from remote (0 = ignore age)","required":false,"members":[],"schema":{"type":"number"}},{"key":"maxbytespersecond","description":"Max. bytes per second (0 = unlimited)","required":false,"members":[],"schema":{"type":"number"}},{"key":"timeout1","description":"Timeout for connection to remote host","required":false,"members":[],"schema":{"type":"number"}},{"key":"timeout2","description":"Timeout for connection to local host","required":false,"members":[],"schema":{"type":"number"}},{"key":"exclude","description":"Exclude objects (regex)","required":false,"members":[],"schema":{"type":"string"}},{"key":"custom_params","description":"Custom parameters passed to imapsync command","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"username\":\"mailbox@domain.tld\",\n \"host1\":\"imap.server.tld\",\n \"port1\":\"993\",\n \"user1\":\"username\",\n \"password1\":\"supersecret\",\n \"enc1\":\"SSL\",\n \"mins_interval\":\"20\",\n \"subfolder2\":\"External\",\n \"maxage\":\"0\",\n \"maxbytespersecond\":\"0\",\n \"timeout1\":\"600\",\n \"timeout2\":\"600\",\n \"exclude\":\"(?i)spam|(?i)junk\",\n \"custom_params\":\"\",\n \"delete2duplicates\":\"1\",\n \"delete1\":\"0\",\n \"delete2\":\"0\",\n \"automap\":\"1\",\n \"skipcrossduplicates\":\"0\",\n \"subscribeall\":\"1\",\n \"active\":\"1\",\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"username\": {\n \"type\": \"string\"\n },\n \"delete2duplicates\": {\n \"type\": \"boolean\"\n },\n \"delete1\": {\n \"type\": \"boolean\"\n },\n \"delete2\": {\n \"type\": \"boolean\"\n },\n \"automap\": {\n \"type\": \"boolean\"\n },\n \"skipcrossduplicates\": {\n \"type\": \"boolean\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"subscribeall\": {\n \"type\": \"boolean\"\n },\n \"host1\": {\n \"type\": \"string\"\n },\n \"port1\": {\n \"type\": \"string\"\n },\n \"user1\": {\n \"type\": \"string\"\n },\n \"password1\": {\n \"type\": \"string\"\n },\n \"enc1\": {\n \"enum\": [\n \"TLS\",\n \"SSL\",\n \"PLAIN\"\n ]\n },\n \"mins_interval\": {\n \"type\": \"number\"\n },\n \"subfolder2\": {\n \"type\": \"string\"\n },\n \"maxage\": {\n \"type\": \"number\"\n },\n \"maxbytespersecond\": {\n \"type\": \"number\"\n },\n \"timeout1\": {\n \"type\": \"number\"\n },\n \"timeout2\": {\n \"type\": \"number\"\n },\n \"exclude\": {\n \"type\": \"string\"\n },\n \"custom_params\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"add\",\n \"syncjob\",\n {\n \"username\":\"mailbox@domain.tld\",\n \"host1\":\"imap.server.tld\",\n \"port1\":993,\n \"user1\":\"username\",\n \"password1\":\"supersecret\",\n \"enc1\":\"SSL\",\n \"mins_interval\":\"20\",\n \"subfolder2\":\"External\",\n \"maxage\":\"0\",\n \"maxbytespersecond\":\"0\",\n \"timeout1\":\"600\",\n \"timeout2\":\"600\",\n \"exclude\":\"(?i)spam|(?i)junk\",\n \"custom_params\":\"\",\n \"delete2duplicates\":\"1\",\n \"delete1\":\"0\",\n \"delete2\":\"0\",\n \"automap\":\"1\",\n \"skipcrossduplicates\":\"0\",\n \"subscribeall\":\"1\",\n \"active\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"mailbox_modified\",\n \"mailbox@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Sync jobs","Create sync job"]},{"title":"Update sync job","path":"/api/v1/edit/syncjob","pathTemplate":"/api/v1/edit/syncjob","slug":"post~api~v1~edit~syncjob","method":"post","description":"\nYou can update one or more sync jobs per request. You can also send just attributes you want to change.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of aliases you want update","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"1\"\n ],\n \"attr\":{\n \"delete2duplicates\":\"1\",\n \"delete1\":\"0\",\n \"delete2\":\"0\",\n \"automap\":\"1\",\n \"skipcrossduplicates\":\"0\",\n \"active\":\"1\",\n \"subscribeall\":\"1\",\n \"host1\":\"imap.server.tld\",\n \"port1\":\"993\",\n \"user1\":\"username\",\n \"password1\":\"supersecret\",\n \"enc1\":\"SSL\",\n \"mins_interval\":\"20\",\n \"subfolder2\":\"External\",\n \"maxage\":\"0\",\n \"maxbytespersecond\":\"0\",\n \"timeout1\":\"600\",\n \"timeout2\":\"600\",\n \"exclude\":\"(?i)spam|(?i)junk\",\n \"custom_params\":\"\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"delete2duplicates\": {\n \"type\": \"boolean\"\n },\n \"delete1\": {\n \"type\": \"boolean\"\n },\n \"delete2\": {\n \"type\": \"boolean\"\n },\n \"automap\": {\n \"type\": \"boolean\"\n },\n \"skipcrossduplicates\": {\n \"type\": \"boolean\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"subscribeall\": {\n \"type\": \"boolean\"\n },\n \"host1\": {\n \"type\": \"string\"\n },\n \"port1\": {\n \"type\": \"string\"\n },\n \"user1\": {\n \"type\": \"string\"\n },\n \"password1\": {\n \"type\": \"string\"\n },\n \"enc1\": {\n \"enum\": [\n \"TLS\",\n \"SSL\",\n \"PLAIN\"\n ]\n },\n \"mins_interval\": {\n \"type\": \"number\"\n },\n \"subfolder2\": {\n \"type\": \"string\"\n },\n \"maxage\": {\n \"type\": \"number\"\n },\n \"maxbytespersecond\": {\n \"type\": \"number\"\n },\n \"timeout1\": {\n \"type\": \"number\"\n },\n \"timeout2\": {\n \"type\": \"number\"\n },\n \"exclude\": {\n \"type\": \"string\"\n },\n \"custom_params\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"{\n \"type\": \"success\",\n \"log\": [\n \"entity\",\n \"action\",\n \"object\",\n {}\n ],\n \"msg\": [\n \"message\",\n \"entity name\"\n ]\n}","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Sync jobs","Update sync job"]},{"title":"Delete sync job","path":"/api/v1/delete/syncjob","pathTemplate":"/api/v1/delete/syncjob","slug":"post~api~v1~delete~syncjob","method":"post","description":"\nYou can delete one or more sync jobs.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of aliases you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"6\",\n \"9\"\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"{\n \"type\": \"success\",\n \"log\": [\n \"entity\",\n \"action\",\n \"object\",\n {}\n ],\n \"msg\": [\n \"message\",\n \"entity name\"\n ]\n}","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Sync jobs","Delete sync job"]},{"title":"Get Forwarding Hosts","path":"/api/v1/get/fwdhost/all","pathTemplate":"/api/v1/get/fwdhost/all","slug":"get~api~v1~get~fwdhost~all","method":"get","description":"\nYou can list all Forwarding Hosts in your mailcow.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"host\": \"5.1.76.202\",\n \"source\": \"hosted.mailcow.de\",\n \"keep_spam\": \"yes\"\n },\n {\n \"host\": \"2a00:f820:417::202\",\n \"source\": \"hosted.mailcow.de\",\n \"keep_spam\": \"yes\"\n }\n]\n","schema":""}}],"tags":["Fordwarding Hosts","Get Forwarding Hosts"]},{"title":"Add Forward Host","path":"/api/v1/add/fwdhost","pathTemplate":"/api/v1/add/fwdhost","slug":"post~api~v1~add~fwdhost","method":"post","description":"\nAdd a new Forwarding host to mailcow. You can chose to enable or disable spam filtering of incoming emails by specifing `filter_spam` 0 = inactive, 1 = active.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"hostname","description":"contains the hostname you want to add","required":false,"members":[],"schema":{"type":"string"}},{"key":"filter_spam","description":"1 to enable spam filter, 0 to disable spam filter","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"hostname\": \"hosted.mailcow.de\",\n \"filter_spam\": \"0\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"hostname\": {\n \"type\": \"string\"\n },\n \"filter_spam\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"fwdhost\",\n \"add\",\n {\n \"hostname\": \"hosted.mailcow.de\",\n \"filter_spam\": \"0\"\n }\n ],\n \"msg\": [\n \"forwarding_host_added\",\n \"5.1.76.202, 2a00:f820:417::202\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Fordwarding Hosts","Add Forward Host"]},{"title":"Delete Forward Host","path":"/api/v1/delete/fwdhost","pathTemplate":"/api/v1/delete/fwdhost","slug":"post~api~v1~delete~fwdhost","method":"post","description":"\nUsing this endpoint you can delete a forwarding host, in order to do so you need to know the IP of the host.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"ip","description":"contains the ip of the fowarding host you want to delete","required":false,"members":[],"schema":{"type":"string"}}]},"example":"[\"5.1.76.202\",\"2a00:f820:417::202\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"ip\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"fwdhost\",\n \"delete\",\n {\n \"forwardinghost\": [\n \"5.1.76.202\",\n \"2a00:f820:417::202\"\n ]\n }\n ],\n \"msg\": [\n \"forwarding_host_removed\",\n \"5.1.76.202\"\n ]\n },\n {\n \"type\": \"success\",\n \"log\": [\n \"fwdhost\",\n \"delete\",\n {\n \"forwardinghost\": [\n \"5.1.76.202\",\n \"2a00:f820:417::202\"\n ]\n }\n ],\n \"msg\": [\n \"forwarding_host_removed\",\n \"2a00:f820:417::202\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Fordwarding Hosts","Delete Forward Host"]},{"title":"Get Postfix logs","path":"/api/v1/get/logs/postfix/{count}","pathTemplate":"/api/v1/get/logs/postfix/{count}","slug":"get~api~v1~get~logs~postfix~count","method":"get","description":"\nThis Api endpoint lists all Postfix logs.\nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569937433\",\n \"program\": \"postfix/qmgr\",\n \"priority\": \"info\",\n \"message\": \"EF1711500458: removed\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Postfix logs"]},{"title":"Get Rspamd logs","path":"/api/v1/get/logs/rspamd-history/{count}","pathTemplate":"/api/v1/get/logs/rspamd-history/{count}","slug":"get~api~v1~get~logs~rspamd-history~count","method":"get","description":"\nThis Api endpoint lists all Rspamd logs.\nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n {\n \"time_virtual\": 0.235653,\n \"rcpt_mime\": [\n \"github@mailcow.tld\"\n ],\n \"message-id\": \"cm.0521259281087.phrkjuk.wdljulyl.i@cmail20.com\",\n \"ip\": \"1.1.1.1\",\n \"rcpt_smtp\": [\n \"github@mailcow.tld\"\n ],\n \"action\": \"soft reject\",\n \"time_real\": 2.856102,\n \"score\": 11.59,\n \"is_skipped\": false,\n \"size\": 35513,\n \"user\": \"unknown\",\n \"sender_mime\": \"noreply@github.com\",\n \"symbols\": {\n \"FROM_NEQ_ENVFROM\": {\n \"metric_score\": 0,\n \"options\": [\n \"noreply@github.com\",\n \"GitHub-phrkjuk1wdljulyl1i@cmail20.com\"\n ],\n \"score\": 0,\n \"name\": \"FROM_NEQ_ENVFROM\",\n \"description\": \"From address is different to the envelope\"\n },\n \"FORGED_SENDER\": {\n \"metric_score\": 0.3,\n \"options\": [\n \"noreply@github.com\",\n \"GitHub-phrkjuk1wdljulyl1i@cmail20.com\"\n ],\n \"score\": 0.3,\n \"name\": \"FORGED_SENDER\",\n \"description\": \"Sender is forged (different From: header and smtp MAIL FROM: addresses)\"\n },\n \"RWL_MAILSPIKE_NEUTRAL\": {\n \"metric_score\": 0,\n \"options\": [\n \"17.21.55.203.rep.mailspike.net : 127.0.0.13\"\n ],\n \"score\": 0,\n \"name\": \"RWL_MAILSPIKE_NEUTRAL\",\n \"description\": \"Neutral result from Mailspike\"\n },\n \"HAS_LIST_UNSUB\": {\n \"metric_score\": -0.01,\n \"score\": -0.01,\n \"name\": \"HAS_LIST_UNSUB\",\n \"description\": \"Has List-Unsubscribe header\"\n },\n \"URI_COUNT_ODD\": {\n \"metric_score\": 1,\n \"options\": [\n \"25\"\n ],\n \"score\": 1,\n \"name\": \"URI_COUNT_ODD\",\n \"description\": \"Odd number of URIs in multipart\\/alternative message\"\n },\n \"MIME_TRACE\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"MIME_TRACE\",\n \"options\": [\n \"0:+\",\n \"1:+\",\n \"2:~\"\n ]\n },\n \"R_DKIM_ALLOW\": {\n \"metric_score\": -0.2,\n \"options\": [\n \"github.com:s=cm\",\n \"cmail2.com:s=cs2013\"\n ],\n \"score\": 0,\n \"name\": \"R_DKIM_ALLOW\",\n \"description\": \"DKIM verification succeed\"\n },\n \"FROM_HAS_DN\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"FROM_HAS_DN\",\n \"description\": \"From header has a display name\"\n },\n \"MIME_GOOD\": {\n \"metric_score\": -0.1,\n \"options\": [\n \"multipart\\/alternative\",\n \"text\\/plain\"\n ],\n \"score\": -0.1,\n \"name\": \"MIME_GOOD\",\n \"description\": \"Known content-type\"\n },\n \"REPLYTO_ADDR_EQ_FROM\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"REPLYTO_ADDR_EQ_FROM\",\n \"description\": \"Reply-To header is identical to SMTP From\"\n },\n \"TO_MATCH_ENVRCPT_ALL\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"TO_MATCH_ENVRCPT_ALL\",\n \"description\": \"All of the recipients match the envelope\"\n },\n \"ASN\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"ASN\",\n \"options\": [\n \"asn:55819, ipnet:203.55.21.0\\/24, country:AU\"\n ]\n },\n \"HTML_SHORT_LINK_IMG_1\": {\n \"metric_score\": 2,\n \"score\": 2,\n \"name\": \"HTML_SHORT_LINK_IMG_1\",\n \"description\": \"Short html part (0..1K) with a link to an image\"\n },\n \"SCHAALIT_URI_823\": {\n \"metric_score\": 5,\n \"score\": 5,\n \"name\": \"SCHAALIT_URI_823\",\n \"options\": [\n \"SCHAALIT_URI_823\"\n ]\n },\n \"DMARC_POLICY_ALLOW\": {\n \"metric_score\": -0.5,\n \"options\": [\n \"github.com\",\n \"none\"\n ],\n \"score\": 0,\n \"name\": \"DMARC_POLICY_ALLOW\",\n \"description\": \"DMARC permit policy\"\n },\n \"MANY_INVISIBLE_PARTS\": {\n \"metric_score\": 1,\n \"options\": [\n \"4\"\n ],\n \"score\": 0.3,\n \"name\": \"MANY_INVISIBLE_PARTS\",\n \"description\": \"Many parts are visually hidden\"\n },\n \"DKIM_TRACE\": {\n \"metric_score\": 0,\n \"options\": [\n \"github.com:+\",\n \"cmail2.com:+\"\n ],\n \"score\": 0,\n \"name\": \"DKIM_TRACE\",\n \"description\": \"DKIM trace symbol\"\n },\n \"MX_GOOD\": {\n \"metric_score\": -0.01,\n \"options\": [\n \"mx20.inbound.createsend.com\",\n \"mx21.inbound.createsend.com\"\n ],\n \"score\": -0.01,\n \"name\": \"MX_GOOD\",\n \"description\": \"MX was ok\"\n },\n \"TO_DN_ALL\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"TO_DN_ALL\",\n \"description\": \"All the recipients have display names\"\n },\n \"RCPT_MAILCOW_DOMAIN\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"RCPT_MAILCOW_DOMAIN\",\n \"options\": [\n \"gc-mc.de\"\n ]\n },\n \"XM_UA_NO_VERSION\": {\n \"metric_score\": 0.01,\n \"score\": 0.01,\n \"name\": \"XM_UA_NO_VERSION\",\n \"description\": \"X-Mailer\\/User-Agent has no version\"\n },\n \"HAS_REPLYTO\": {\n \"metric_score\": 0,\n \"options\": [\n \"noreply@github.com\"\n ],\n \"score\": 0,\n \"name\": \"HAS_REPLYTO\",\n \"description\": \"Has Reply-To header\"\n },\n \"R_SPF_ALLOW\": {\n \"metric_score\": -0.2,\n \"options\": [\n \"+ip4:203.55.21.0\\/24\"\n ],\n \"score\": 0,\n \"name\": \"R_SPF_ALLOW\",\n \"description\": \"SPF verification allows sending\"\n },\n \"URIBL_GREY\": {\n \"metric_score\": 1.5,\n \"options\": [\n \"cmail2.com.multi.uribl.com\",\n \"cmail20.com.multi.uribl.com\",\n \"updatemyprofile.com.multi.uribl.com\"\n ],\n \"score\": 1.5,\n \"name\": \"URIBL_GREY\",\n \"description\": \"uribl.com grey url\"\n },\n \"CLAM_VIRUS_FAIL\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"CLAM_VIRUS_FAIL\",\n \"options\": [\n \"failed to scan and retransmits exceed\"\n ]\n },\n \"GREYLIST\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"GREYLIST\",\n \"options\": [\n \"greylisted\",\n \"Wed, 25 Sep 2019 19:27:10 GMT\",\n \"new record\"\n ]\n },\n \"ARC_NA\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"ARC_NA\",\n \"description\": \"ARC signature absent\"\n },\n \"RCVD_COUNT_ZERO\": {\n \"metric_score\": 0,\n \"options\": [\n \"0\"\n ],\n \"score\": 0,\n \"name\": \"RCVD_COUNT_ZERO\",\n \"description\": \"Message has no Received headers\"\n },\n \"BAD_REP_POLICIES\": {\n \"metric_score\": 0.1,\n \"score\": 0.1,\n \"name\": \"BAD_REP_POLICIES\",\n \"description\": \"Contains valid policies but are also marked by fuzzy\\/bayes\\/surbl\\/rbl\"\n },\n \"RCPT_COUNT_ONE\": {\n \"metric_score\": 0,\n \"options\": [\n \"1\"\n ],\n \"score\": 0,\n \"name\": \"RCPT_COUNT_ONE\",\n \"description\": \"One recipient\"\n },\n \"RBL_UCEPROTECT_LEVEL1\": {\n \"metric_score\": 3.5,\n \"score\": 3.5,\n \"name\": \"RBL_UCEPROTECT_LEVEL1\",\n \"options\": [\n \"17.21.55.203.dnsbl-1.uceprotect.net\"\n ]\n },\n \"DWL_DNSWL_HI\": {\n \"metric_score\": -3.5,\n \"options\": [\n \"github.com.dwl.dnswl.org : 127.0.9.3\"\n ],\n \"score\": -3.5,\n \"name\": \"DWL_DNSWL_HI\",\n \"description\": \"Message has a valid dkim signature originated from domain listed at https:\\/\\/www.dnswl.org, high trust\"\n },\n \"RCVD_IN_DNSWL_NONE\": {\n \"metric_score\": 0,\n \"options\": [\n \"17.21.55.203.list.dnswl.org : 127.0.15.0\"\n ],\n \"score\": 0,\n \"name\": \"RCVD_IN_DNSWL_NONE\",\n \"description\": \"Sender listed at https:\\/\\/www.dnswl.org, no trust\"\n },\n \"RBL_UCEPROTECT_LEVEL2\": {\n \"metric_score\": 1.5,\n \"score\": 1.5,\n \"name\": \"RBL_UCEPROTECT_LEVEL2\",\n \"options\": [\n \"17.21.55.203.dnsbl-2.uceprotect.net\"\n ]\n }\n },\n \"subject\": \"[mailcow/mailcow-dockerized] Unable to change name of alias email address (#2997)\",\n \"required_score\": 15,\n \"unix_time\": 1569439327,\n \"sender_smtp\": \"GitHub-phrkjuk1wdljulyl1i@cmail20.com\"\n }\n}\n","schema":""}}],"tags":["Logs","Get Rspamd logs"]},{"title":"Get Dovecot logs","path":"/api/v1/get/logs/dovecot/{count}","pathTemplate":"/api/v1/get/logs/dovecot/{count}","slug":"get~api~v1~get~logs~dovecot~count","method":"get","description":"\nThis Api endpoint lists all Dovecot logs.\nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569938740\",\n \"program\": \"dovecot\",\n \"priority\": \"info\",\n \"message\": \"managesieve-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=172.22.1.3, lip=172.22.1.250\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Dovecot logs"]},{"title":"Get ACME logs","path":"/api/v1/get/logs/acme/{count}","pathTemplate":"/api/v1/get/logs/acme/{count}","slug":"get~api~v1~get~logs~acme~count","method":"get","description":"\nThis Api endpoint lists all ACME logs from issued Lets Enctypts certificates.\nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569927728\",\n \"message\": \"Certificate validation done, neither changed nor due for renewal, sleeping for another day.\"\n }\n]\n","schema":""}}],"tags":["Logs","Get ACME logs"]},{"title":"Get SOGo logs","path":"/api/v1/get/logs/sogo/{count}","pathTemplate":"/api/v1/get/logs/sogo/{count}","slug":"get~api~v1~get~logs~sogo~count","method":"get","description":"\nThis Api endpoint lists all SOGo logs.\nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569938874\",\n \"program\": \"sogod\",\n \"priority\": \"notice\",\n \"message\": \"[109]: mailcowdockerized_watchdog-mailcow_1.mailcowdockerized_mailcow-network \\\"GET \\/SOGo.index\\/ HTTP\\/1.1\\\" 200 2531\\/0 0.005 - - 0\"\n }\n]\n","schema":""}}],"tags":["Logs","Get SOGo logs"]},{"title":"Get Watchdog logs","path":"/api/v1/get/logs/watchdog/{count}","pathTemplate":"/api/v1/get/logs/watchdog/{count}","slug":"get~api~v1~get~logs~watchdog~count","method":"get","description":"\nThis Api endpoint lists all Watchdog logs.\nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569938958\",\n \"service\": \"Fail2ban\",\n \"lvl\": \"100\",\n \"hpnow\": \"1\",\n \"hptotal\": \"1\",\n \"hpdiff\": \"0\"\n },\n {\n \"time\": \"1569938956\",\n \"service\": \"Rspamd\",\n \"lvl\": \"100\",\n \"hpnow\": \"5\",\n \"hptotal\": \"5\",\n \"hpdiff\": \"0\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Watchdog logs"]},{"title":"Get Api logs","path":"/api/v1/get/logs/api/{count}","pathTemplate":"/api/v1/get/logs/api/{count}","slug":"get~api~v1~get~logs~api~count","method":"get","description":"\nThis Api endpoint lists all Api logs.\nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": 1569939001,\n \"uri\": \"\\/api\\/v1\\/get\\/logs\\/api\\/2\",\n \"method\": \"GET\",\n \"remote\": \"1.1.1.1\",\n \"data\": \"\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Api logs"]},{"title":"Get Ratelimit logs","path":"/api/v1/get/logs/ratelimited/{count}","pathTemplate":"/api/v1/get/logs/ratelimited/{count}","slug":"get~api~v1~get~logs~ratelimited~count","method":"get","description":"\nThis Api endpoint lists all Ratelimit logs.\nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": 1569269003,\n \"rcpt\": \"hello@mailcow.email\",\n \"from\": \"awesome@mailcow.email\",\n \"user\": \"awesome@mailcow.email\",\n \"rl_info\": \"mailcow(RLsdz3tuabozgd4oacbdh8kc78)\",\n \"rl_name\": \"mailcow\",\n \"rl_hash\": \"RLsdz3tuabozgd4oacbdh8kc78\",\n \"qid\": \"E3CF91500458\",\n \"ip\": \"172.22.1.248\",\n \"message_id\": \"6a-5d892500-7-240abd80@90879116\",\n \"header_subject\": \"Mailcow is amazing\",\n \"header_from\": \"\\\"Awesome\\\" \"\n }\n]\n","schema":""}}],"tags":["Logs","Get Ratelimit logs"]},{"title":"Get Netfilter logs","path":"/api/v1/get/logs/netfilter/{count}","pathTemplate":"/api/v1/get/logs/netfilter/{count}","slug":"get~api~v1~get~logs~netfilter~count","method":"get","description":"\nThis Api endpoint lists all Netfilter logs.\nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": 1569754911,\n \"priority\": \"info\",\n \"message\": \"Whitelist was changed, it has 1 entries\"\n },\n {\n \"time\": 1569754911,\n \"priority\": \"crit\",\n \"message\": \"Add host\\/network 1.1.1.1\\/32 to blacklist\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Netfilter logs"]},{"title":"Get Autodiscover logs","path":"/api/v1/get/logs/autodiscover/{count}","pathTemplate":"/api/v1/get/logs/autodiscover/{count}","slug":"get~api~v1~get~logs~autodiscover~count","method":"get","description":"\nThis Api endpoint lists all Autodiscover logs.\nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": 1569684212,\n \"ua\": \"Microsoft Office\\/16.0 (Windows NT 6.2; MAPICPL 16.0.11328; Pro)\",\n \"user\": \"awesome@mailcow.de\",\n \"service\": \"activesync\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Autodiscover logs"]},{"title":"Get Queue","path":"/api/v1/get/mailq/all","pathTemplate":"/api/v1/get/mailq/all","slug":"get~api~v1~get~mailq~all","method":"get","description":"\nGet the current mail queue and everything it contains.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"queue_name\": \"incoming\",\n \"queue_id\": \"B98C6260CA1\",\n \"arrival_time\": 1570091234,\n \"message_size\": 1848,\n \"sender\": \"sender@mailcow.tld\",\n \"recipients\": [\n \"recipient@awesomecow.tld\"\n ]\n }\n]\n","schema":""}}],"tags":["Queue Manager","Get Queue"]},{"title":"Flush Queue","path":"/api/v1/edit/mailq","pathTemplate":"/api/v1/edit/mailq","slug":"post~api~v1~edit~mailq","method":"post","description":"\nUsing this API you can flush the current mail queue. This will try to deliver all mails currently in it.\nThis API uses the command: `postqueue -f`","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"action","description":"use flush to flush the mail queue","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"action\":\"flush\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"type\": \"success\",\n \"msg\": \"Task completed\"\n}\n","schema":""}}],"tags":["Queue Manager","Flush Queue"]},{"title":"Delete Queue","path":"/api/v1/delete/mailq","pathTemplate":"/api/v1/delete/mailq","slug":"post~api~v1~delete~mailq","method":"post","description":"\nUsing this API you can delete the current mail queue. This will delete all mails in it.\nThis API uses the command: `postsuper -d`","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"action","description":"use super_delete to delete the mail queue","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"action\":\"super_delete\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"type\": \"success\",\n \"msg\": \"Task completed\"\n}\n","schema":""}}],"tags":["Queue Manager","Delete Queue"]},{"title":"Get mails in Quarantine","path":"/api/v1/get/quarantine/all","pathTemplate":"/api/v1/get/quarantine/all","slug":"get~api~v1~get~quarantine~all","method":"get","description":"\nGet all mails that are currently in Quarantine.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"id\": 33,\n \"qid\": \"8224615004C1\",\n \"subject\": \"mailcow is awesome\",\n \"virus_flag\": 0,\n \"score\": 15.48,\n \"rcpt\": \"admin@domain.tld\",\n \"sender\": \"bounces@send.domain.tld\",\n \"created\": 1572688831,\n \"notified\": 1\n}\n","schema":""}}],"tags":["Quarantine","Get mails in Quarantine"]},{"title":"Delete mails in Quarantine","path":"/api/v1/delete/qitem","pathTemplate":"/api/v1/delete/qitem","slug":"post~api~v1~delete~qitem","method":"post","description":"\nUsing this endpoint you can delete a email from quarantine, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of emails you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"33\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"quarantine\",\n \"delete\",\n {\n \"id\": [\n \"33\"\n ]\n }\n ],\n \"msg\": [\n \"item_deleted\",\n \"33\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Quarantine","Delete mails in Quarantine"]},{"title":"Get Fail2Ban Config","path":"/api/v1/get/fail2ban","pathTemplate":"/api/v1/get/fail2ban","slug":"get~api~v1~get~fail2ban","method":"get","description":"\nGets the current Fail2Ban configuration.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"ban_time\": 604800,\n \"netban_ipv4\": 32,\n \"netban_ipv6\": 128,\n \"max_attempts\": 1,\n \"retry_window\": 7200,\n \"whitelist\": \"1.1.1.1\",\n \"blacklist\": \"45.82.153.37\\/32\\n92.118.38.52\\/32\",\n \"perm_bans\": [\n \"45.82.153.37\\/32\",\n \"92.118.38.52\\/32\"\n ]\n}\n","schema":""}}],"tags":["Fail2Ban","Get Fail2Ban Config"]},{"title":"Edit Fail2Ban","path":"/api/v1/edit/fail2ban","pathTemplate":"/api/v1/edit/fail2ban","slug":"post~api~v1~edit~fail2ban","method":"post","description":"\nUsing this endpoint you can edit the Fail2Ban config and black or whitelist new ips.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":[],"description":"has to be none","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"description":"array containing the fail2ban settings","required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"none\"\n ],\n \"attr\": {\n \"ban_time\": \"86400\",\n \"max_attempts\": \"5\",\n \"retry_window\": \"600\",\n \"netban_ipv4\": \"24\",\n \"netban_ipv6\": \"64\",\n \"whitelist\": \"mailcow.tld\",\n \"blacklist\": \"10.100.6.5/32,10.100.8.4/32\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"ban_time\": {\n \"type\": \"number\"\n },\n \"max_attempts\": {\n \"type\": \"number\"\n },\n \"retry_window\": {\n \"type\": \"number\"\n },\n \"netban_ipv4\": {\n \"type\": \"number\"\n },\n \"netban_ipv6\": {\n \"type\": \"number\"\n },\n \"whitelist\": {\n \"type\": \"string\"\n },\n \"backlist\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"type\": \"success\",\n \"log\": [\n \"fail2ban\",\n \"edit\",\n {\n \"network\": [\n \"none\"\n ],\n \"ban_time\": \"86400\",\n \"max_attempts\": \"5\",\n \"retry_window\": \"600\",\n \"netban_ipv4\": \"24\",\n \"netban_ipv6\": \"64\",\n \"whitelist\": \"mailcow.tld\",\n \"blacklist\": \"10.100.6.5/32,10.100.8.4/32\"\n }\n ],\n \"msg\": \"f2b_modified\"\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Fail2Ban","Edit Fail2Ban"]},{"title":"Get DKIM Key","path":"/api/v1/get/dkim/{domain}","pathTemplate":"/api/v1/get/dkim/{domain}","slug":"get~api~v1~get~dkim~domain","method":"get","description":"\nUsing this endpoint you can get the DKIM public key for a specific domain.","parameters":[{"location":"path","name":"domain","description":"name of domain","required":true,"schema":{"type":"string"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"pubkey\": \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA21tUSjyasQy/hJmVjPnlRGfzx6TPhYj8mXY9DVOzSAE64Gddw/GnE/GcCR6WXNT23u9q4zPnz1IPoNt5kFOps8vg/iNqrcH++494noaZuYyFPPFnebkfryO4EvEyxC/c66qts+gnOUml+M8uv5WObBJld2gG12jLwFM0263J/N6J8LuUsaXOB2uCIfx8Nf4zjuJ6Ieez2uyHNK5dXjDLfKA4mTr+EEK6W6e34M4KN1liWM6r9Oy5S1FlLrD42VpURxxBZtBiEtaJPEKSQuk6GQz8ihu7W20Yr53tyCdaORu8dhxXVUWVf+GjuuMEdAmQCjYkarXdYCrt56Psw703kwIDAQAB\",\n \"length\": \"2048\",\n \"dkim_txt\": \"v=DKIM1;k=rsa;t=s;s=email;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA21tUSjyasQy/hJmVjPnlRGfzx6TPhYj8mXY9DVOzSAE64Gddw/GnE/GcCR6WXNT23u9q4zPnz1IPoNt5kFOps8vg/iNqrcH++494noaZuYyFPPFnebkfryO4EvEyxC/c66qts+gnOUml+M8uv5WObBJld2gG12jLwFM0263J/N6J8LuUsaXOB2uCIfx8Nf4zjuJ6Ieez2uyHNK5dXjDLfKA4mTr+EEK6W6e34M4KN1liWM6r9Oy5S1FlLrD42VpURxxBZtBiEtaJPEKSQuk6GQz8ihu7W20Yr53tyCdaORu8dhxXVUWVf+GjuuMEdAmQCjYkarXdYCrt56Psw703kwIDAQAB\",\n \"dkim_selector\": \"dkim\",\n \"privkey\": \"\"\n}\n","schema":""}}],"tags":["DKIM","Get DKIM Key"]},{"title":"Generate DKIM Key","path":"/api/v1/add/dkim","pathTemplate":"/api/v1/add/dkim","slug":"post~api~v1~add~dkim","method":"post","description":"\nUsing this endpoint you can generate new DKIM keys.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"domain","description":"the domain which a key should be generated for","required":false,"members":[],"schema":{"type":"string"}},{"key":"dkim_selector","description":"the DKIM selector default dkim","required":false,"members":[],"schema":{"type":"string"}},{"key":"key_size","description":"the key size (1024 or 2048)","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"domains\":\"mailcow.tld\",\n \"dkim_selector\":\"dkim\",\n \"key_size\":\"2048\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"domain\": {\n \"type\": \"string\"\n },\n \"dkim_selector\": {\n \"type\": \"string\"\n },\n \"key_size\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"dkim\",\n \"add\",\n {\n \"domains\": \"hanspeterlol.de\",\n \"dkim_selector\": \"dkim\",\n \"key_size\": \"2048\"\n }\n ],\n \"msg\": [\n \"dkim_added\",\n \"hanspeterlol.de\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["DKIM","Generate DKIM Key"]},{"title":"Duplicate DKIM Key","path":"/api/v1/add/dkim_duplicate","pathTemplate":"/api/v1/add/dkim_duplicate","slug":"post~api~v1~add~dkim~duplicate","method":"post","description":"\nUsing this endpoint you can duplicate the DKIM Key of one domain.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"fron_domain","description":"the domain where the dkim key should be copied from","required":false,"members":[],"schema":{"type":"string"}},{"key":"to_domain","description":"the domain where the dkim key should be copied to","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"from_domain\":\"mailcow.tld\",\n \"to_domain\":\"awesomecow.tld\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"fron_domain\": {\n \"type\": \"string\"\n },\n \"to_domain\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"dkim\",\n \"duplicate\",\n {\n \"from_domain\": \"mailcow.tld\",\n \"to_domain\": \"awesomecow.tld\"\n }\n ],\n \"msg\": [\n \"dkim_duplicated\",\n \"mailcow.tld\",\n \"awesomecow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["DKIM","Duplicate DKIM Key"]},{"title":"Delete DKIM Key","path":"/api/v1/delete/dkim","pathTemplate":"/api/v1/delete/dkim","slug":"post~api~v1~delete~dkim","method":"post","description":"\nUsing this endpoint a existing DKIM Key can be deleted","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"[\"mailcow.tld\"]\n","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"dkim\",\n \"delete\",\n {\n \"domains\": [\n \"mailcow.tld\"\n ]\n }\n ],\n \"msg\": [\n \"dkim_removed\",\n \"mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["DKIM","Delete DKIM Key"]},{"title":"Get Domain Admins","path":"/api/v1/get/domain-admin/all","pathTemplate":"/api/v1/get/domain-admin/all","slug":"get~api~v1~get~domain-admin~all","method":"get","description":"\n","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"username\": \"testadmin\",\n \"tfa_active\": \"✕\",\n \"active\": \"✓\",\n \"tfa_active_int\": null,\n \"active_int\": 1,\n \"created\": \"2019-10-02 10:29:41\",\n \"selected_domains\": [\n \"mailcow.tld\"\n ],\n \"unselected_domains\": [\n \"awesomemailcow.de\",\n \"mailcowisgreat.de\"\n ]\n }\n]\n","schema":""}}],"tags":["Domain admin","Get Domain Admins"]},{"title":"Create Domain Admin user","path":"/api/v1/add/domain-admin","pathTemplate":"/api/v1/add/domain-admin","slug":"post~api~v1~add~domain-admin","method":"post","description":"\nUsing this endpoint you can create a new Domain Admin user. This user has full control over a domain, and can create new mailboxes and aliases.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"username","description":"the username for the admin user","required":false,"members":[],"schema":{"type":"string"}},{"key":"domains","description":"the domains the user should be a admin of","required":false,"members":[],"schema":{"type":"string"}},{"key":"password","description":"domain admin user password","required":false,"members":[],"schema":{"type":"string"}},{"key":"password2","description":"domain admin user password","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active user account 0 for a disabled user account","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"username\": \"testadmin\",\n \"domains\": \"mailcow.tld\",\n \"password\": \"supersecurepw\",\n \"password2\": \"supersecurepw\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"username\": {\n \"type\": \"string\"\n },\n \"domains\": {\n \"type\": \"string\"\n },\n \"password\": {\n \"type\": \"string\"\n },\n \"password2\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"domain_admin\",\n \"add\",\n {\n \"username\": \"testadmin\",\n \"domains\": \"mailcow.tld\",\n \"password\": \"*\",\n \"password2\": \"*\",\n \"active\": \"1\"\n }\n ],\n \"msg\": [\n \"domain_admin_added\",\n \"testadmin\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domain admin","Create Domain Admin user"]},{"title":"Delete Domain Admin","path":"/api/v1/delete/domain-admin","pathTemplate":"/api/v1/delete/domain-admin","slug":"post~api~v1~delete~domain-admin","method":"post","description":"\nUsing this endpoint a existing Domain Admin user can be deleted.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["username"],"description":"contains list of usernames of the users you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"testadmin\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"domain_admin\",\n \"delete\",\n {\n \"username\": [\n \"testadmin\"\n ]\n }\n ],\n \"msg\": [\n \"domain_admin_removed\",\n \"testadmin\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domain admin","Delete Domain Admin"]},{"title":"Get BCC Map","path":"/api/v1/get/bcc/{id}","pathTemplate":"/api/v1/get/bcc/{id}","slug":"get~api~v1~get~bcc~id","method":"get","description":"\nUsing this endpoint you can get all BCC maps.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 3,\n \"local_dest\": \"@mailcow.tld\",\n \"bcc_dest\": \"bcc@awesomecow.tld\",\n \"active_int\": 1,\n \"active\": \"✓\",\n \"type\": \"sender\",\n \"created\": \"2019-10-02 21:44:34\",\n \"domain\": \"mailcow.tld\",\n \"modified\": null\n }\n]\n","schema":""}}],"tags":["Address Rewriting","Get BCC Map"]},{"title":"Create BCC Map","path":"/api/v1/add/bcc","pathTemplate":"/api/v1/add/bcc","slug":"post~api~v1~add~bcc","method":"post","description":"\nUsing this endpoint you can create a BCC map to forward all mails via a bcc for a given domain.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"local_dest","description":"the domain which emails should be forwarded","required":false,"members":[],"schema":{"type":"string"}},{"key":"type","description":"the type of bcc map can be `sender` or `recipient`","required":false,"members":[],"schema":{"type":"string"}},{"key":"bcc_dest","description":"the email address where all mails should be send to","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active user account 0 for a disabled user account","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"local_dest\": \"mailcow.tld\",\n \"type\": \"sender\",\n \"bcc_dest\": \"bcc@awesomecow.tld\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"local_dest\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\"\n },\n \"bcc_dest\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"bcc\",\n \"add\",\n {\n \"local_dest\": \"mailcow.tld\",\n \"type\": \"sender\",\n \"bcc_dest\": \"bcc@awesomecow.tld\",\n \"active\": \"1\"\n },\n null\n ],\n \"msg\": \"bcc_saved\"\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Address Rewriting","Create BCC Map"]},{"title":"Delete BCC Map","path":"/api/v1/delete/bcc","pathTemplate":"/api/v1/delete/bcc","slug":"post~api~v1~delete~bcc","method":"post","description":"\nUsing this endpoint you can delete a BCC map, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of bcc maps you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"3\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"bcc\",\n \"delete\",\n {\n \"id\": [\n \"4\"\n ]\n },\n null\n ],\n \"msg\": [\n \"bcc_deleted\",\n \"4\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Address Rewriting","Delete BCC Map"]},{"title":"Get Recipient Map","path":"/api/v1/get/recipient_map/{id}","pathTemplate":"/api/v1/get/recipient_map/{id}","slug":"get~api~v1~get~recipient~map~id","method":"get","description":"\nUsing this endpoint you can get all recipient maps.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 3,\n \"recipient_map_old\": \"recipient@mailcow.tld\",\n \"recipient_map_new\": \"target@mailcow.tld\",\n \"active_int\": 1,\n \"active\": \"✓\",\n \"created\": \"2019-10-02 22:06:29\",\n \"modified\": null\n }\n]\n","schema":""}}],"tags":["Address Rewriting","Get Recipient Map"]},{"title":"Create Recipient Map","path":"/api/v1/add/recipient_map","pathTemplate":"/api/v1/add/recipient_map","slug":"post~api~v1~add~recipient~map","method":"post","description":"\nUsing this endpoint you can create a recipient map to forward all mails from one email address to another.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"recipient_map_old","description":"the email address which emails should be forwarded","required":false,"members":[],"schema":{"type":"string"}},{"key":"recipient_map_new","description":"the email address that should receive the forwarded emails","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active user account 0 for a disabled user account","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"recipient_map_old\": \"recipient@mailcow.tld\",\n \"recipient_map_new\": \"target@mailcow.tld\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"recipient_map_old\": {\n \"type\": \"string\"\n },\n \"recipient_map_new\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"recipient_map\",\n \"add\",\n {\n \"recipient_map_old\": \"recipient@mailcow.tld\",\n \"recipient_map_new\": \"target@mailcow.tld\",\n \"active\": \"1\"\n },\n null\n ],\n \"msg\": [\n \"recipient_map_entry_saved\",\n \"recipient@mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Address Rewriting","Create Recipient Map"]},{"title":"Delete Recipient Map","path":"/api/v1/delete/recipient_map","pathTemplate":"/api/v1/delete/recipient_map","slug":"post~api~v1~delete~recipient~map","method":"post","description":"\nUsing this endpoint you can delete a recipient map, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of recipient maps you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"1\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"recipient_map\",\n \"delete\",\n {\n \"id\": [\n \"1\"\n ]\n },\n null\n ],\n \"msg\": [\n \"recipient_map_entry_deleted\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Address Rewriting","Delete Recipient Map"]},{"title":"Get TLS Policy Map","path":"/api/v1/get/tls-policy-map/{id}","pathTemplate":"/api/v1/get/tls-policy-map/{id}","slug":"get~api~v1~get~tls-policy-map~id","method":"get","description":"\nUsing this endpoint you can get all TLS policy map override maps.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"dest\": \"mailcow.tld\",\n \"policy\": \"encrypt\",\n \"parameters\": \"\",\n \"active_int\": 1,\n \"active\": \"✓\",\n \"created\": \"2019-10-03 08:42:12\",\n \"modified\": null\n }\n]\n","schema":""}}],"tags":["Outgoing TLS Policy Map Overrides","Get TLS Policy Map"]},{"title":"Create TLS Policy Map","path":"/api/v1/add/tls-policy-map","pathTemplate":"/api/v1/add/tls-policy-map","slug":"post~api~v1~add~tls-policy-map","method":"post","description":"\nUsing this endpoint you can create a TLS policy map override.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"dest","description":"the target domain or email address","required":false,"members":[],"schema":{"type":"string"}},{"key":"policy","description":"the policy","required":false,"members":[],"schema":{"type":"enum"}},{"key":"parameters","description":"custom parameters you find out more about them [here](http://www.postfix.org/postconf.5.html#smtp_tls_policy_maps)","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active user account 0 for a disabled user account","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"dest\": \"mailcow.tld\",\n \"policy\": \"encrypt\",\n \"parameters\": \"\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"dest\": {\n \"type\": \"string\"\n },\n \"policy\": {\n \"enum\": [\n \"none\",\n \"may\",\n \"encrypt\",\n \"dane\",\n \"'dane\",\n \"fingerprint\",\n \"verify\",\n \"secure\"\n ]\n },\n \"parameters\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object"],"description":"contains request object","required":false,"members":[],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"tls_policy_maps\",\n \"add\",\n {\n \"dest\": \"mailcow.tld\",\n \"policy\": \"encrypt\",\n \"parameters\": \"\",\n \"active\": \"1\"\n },\n null\n ],\n \"msg\": [\n \"tls_policy_map_entry_saved\",\n \"mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Outgoing TLS Policy Map Overrides","Create TLS Policy Map"]},{"title":"Delete TLS Policy Map","path":"/api/v1/delete/tls-policy-map","pathTemplate":"/api/v1/delete/tls-policy-map","slug":"post~api~v1~delete~tls-policy-map","method":"post","description":"\nUsing this endpoint you can delete a TLS Policy Map, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of tls policy maps you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"3\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"tls_policy_maps\",\n \"delete\",\n {\n \"id\": [\n \"1\"\n ]\n },\n null\n ],\n \"msg\": [\n \"tls_policy_map_entry_deleted\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Outgoing TLS Policy Map Overrides","Delete TLS Policy Map"]},{"title":"Get oAuth Clients","path":"/api/v1/get/oauth2-client/{id}","pathTemplate":"/api/v1/get/oauth2-client/{id}","slug":"get~api~v1~get~oauth2-client~id","method":"get","description":"\nUsing this endpoint you can get all oAuth clients.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"client_id\": \"17c76aaa88c0\",\n \"client_secret\": \"73fc668a88147e32a31ff80c\",\n \"redirect_uri\": \"https:\\/\\/mailcow.tld\",\n \"grant_types\": null,\n \"scope\": \"profile\",\n \"user_id\": null\n }\n]\n","schema":""}}],"tags":["oAuth Clients","Get oAuth Clients"]},{"title":"Create oAuth Client","path":"/api/v1/add/oauth2-client","pathTemplate":"/api/v1/add/oauth2-client","slug":"post~api~v1~add~oauth2-client","method":"post","description":"\nUsing this endpoint you can create a oAuth clients.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"redirect_uri","description":"the uri where you should be redirected after oAuth","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"redirect_uri\":\"https://mailcow.tld\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"redirect_uri\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"oauth2\",\n \"add\",\n \"client\",\n {\n \"redirect_uri\": \"https:\\/\\/mailcow.tld\"\n }\n ],\n \"msg\": \"Added client access\"\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["oAuth Clients","Create oAuth Client"]},{"title":"Delete oAuth Client","path":"/api/v1/delete/oauth2-client","pathTemplate":"/api/v1/delete/oauth2-client","slug":"post~api~v1~delete~oauth2-client","method":"post","description":"\nUsing this endpoint you can delete a oAuth client, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of oAuth clients you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"3\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"oauth2\",\n \"delete\",\n \"client\",\n {\n \"id\": [\n \"1\"\n ]\n }\n ],\n \"msg\": [\n \"items_deleted\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["oAuth Clients","Delete oAuth Client"]},{"title":"Get Sender-Dependent Transports","path":"/api/v1/get/relayhost/{id}","pathTemplate":"/api/v1/get/relayhost/{id}","slug":"get~api~v1~get~relayhost~id","method":"get","description":"\nUsing this endpoint you can get all Sender-Dependent Transports.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"hostname\": \"mailcow.tld:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepassword\",\n \"active_int\": 1,\n \"password_short\": \"tes...\",\n \"active\": \"✓\",\n \"used_by_domains\": \"\"\n }\n]\n","schema":""}}],"tags":["Routing","Get Sender-Dependent Transports"]},{"title":"Create Sender-Dependent Transports","path":"/api/v1/add/relayhost","pathTemplate":"/api/v1/add/relayhost","slug":"post~api~v1~add~relayhost","method":"post","description":"\nUsing this endpoint you can create Sender-Dependent Transports.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"hostname","description":"the hostname of the smtp server with port","required":false,"members":[],"schema":{"type":"string"}},{"key":"username","description":"the username used to authenticate","required":false,"members":[],"schema":{"type":"string"}},{"key":"password","description":"the password for the smtp user","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"hostname\": \"mailcow.tld:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepassword\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"hostname\": {\n \"type\": \"string\"\n },\n \"username\": {\n \"type\": \"string\"\n },\n \"password\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"relayhost\",\n \"add\",\n {\n \"hostname\": \"mailcow.tld:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepassword\"\n }\n ],\n \"msg\": [\n \"relayhost_added\",\n \"\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Routing","Create Sender-Dependent Transports"]},{"title":"Delete Sender-Dependent Transports","path":"/api/v1/delete/relayhost","pathTemplate":"/api/v1/delete/relayhost","slug":"post~api~v1~delete~relayhost","method":"post","description":"\nUsing this endpoint you can delete a Sender-Dependent Transport, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of Sender-Dependent Transport you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"1\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"relayhost\",\n \"delete\",\n {\n \"id\": [\n \"1\"\n ]\n }\n ],\n \"msg\": [\n \"relayhost_removed\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Routing","Delete Sender-Dependent Transports"]},{"title":"Get Transport Maps","path":"/api/v1/get/transport/{id}","pathTemplate":"/api/v1/get/transport/{id}","slug":"get~api~v1~get~transport~id","method":"get","description":"\nUsing this endpoint you can get all Transport Maps.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"destination\": \"example.org\",\n \"nexthop\": \"host:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepw\",\n \"active_int\": 1,\n \"lookup_mx_int\": 0,\n \"password_short\": \"sup...\",\n \"active\": \"✓\",\n \"lookup_mx\": \"✕\"\n }\n]\n","schema":""}}],"tags":["Routing","Get Transport Maps"]},{"title":"Create Transport Maps","path":"/api/v1/add/transport/all","pathTemplate":"/api/v1/add/transport/all","slug":"post~api~v1~add~transport~all","method":"post","description":"\nUsing this endpoint you can create Sender-Dependent Transports.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"destination","required":false,"members":[],"schema":{"type":"string"}},{"key":"nexthop","required":false,"members":[],"schema":{"type":"string"}},{"key":"username","description":"the username used to authenticate","required":false,"members":[],"schema":{"type":"string"}},{"key":"password","description":"the password for the smtp user","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active transport map 0 for a disabled transport map","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"destination\": \"example.org\",\n \"nexthop\": \"host:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepw\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"destination\": {\n \"type\": \"string\"\n },\n \"nexthop\": {\n \"type\": \"string\"\n },\n \"username\": {\n \"type\": \"string\"\n },\n \"password\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"transport\",\n \"add\",\n {\n \"destination\": \"example2.org\",\n \"nexthop\": \"host:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepw\",\n \"active\": \"1\"\n }\n ],\n \"msg\": [\n \"relayhost_added\",\n \"\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Routing","Create Transport Maps"]},{"title":"Delete Transport Maps","path":"/api/v1/delete/transport","pathTemplate":"/api/v1/delete/transport","slug":"post~api~v1~delete~transport","method":"post","description":"\nUsing this endpoint you can delete a Transport Maps, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of transport maps you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"1\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"transport\",\n \"delete\",\n {\n \"id\": [\n \"1\"\n ]\n }\n ],\n \"msg\": [\n \"relayhost_removed\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Routing","Delete Transport Maps"]},{"title":"Get Resources","path":"/api/v1/get/resource/all","pathTemplate":"/api/v1/get/resource/all","slug":"get~api~v1~get~resource~all","method":"get","description":"\nUsing this endpoint you can get all Resources.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"name\": \"test@mailcow.tld\",\n \"kind\": \"location\",\n \"multiple_bookings\": 0,\n \"description\": \"test\",\n \"active\": \"✓\",\n \"active_int\": 1,\n \"domain\": \"mailcow.tld\",\n \"local_part\": \"test\"\n }\n]\n","schema":""}}],"tags":["Resources","Get Resources"]},{"title":"Create Resources","path":"/api/v1/add/resource","pathTemplate":"/api/v1/add/resource","slug":"post~api~v1~add~resource","method":"post","description":"\nUsing this endpoint you can create Resources.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"description","description":"a description of the resource","required":false,"members":[],"schema":{"type":"string"}},{"key":"domain","description":"the domain for which the resource should be","required":false,"members":[],"schema":{"type":"string"}},{"key":"kind","description":"the kind of recouse","required":false,"members":[],"schema":{"type":"enum"}},{"key":"multiple_bookings_select","required":false,"members":[],"schema":{"type":"enum"}},{"key":"multiple_bookings_custom","description":"always empty","required":false,"members":[],"schema":{"type":"number"}},{"key":"multiple_bookings","required":false,"members":[],"schema":{"type":"enum"}},{"key":"active","description":"1 for a active transport map 0 for a disabled transport map","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"description\": \"test\",\n \"domain\": \"mailcow.tld\",\n \"kind\": \"location\",\n \"multiple_bookings_select\": \"0\",\n \"multiple_bookings_custom\": \"\",\n \"multiple_bookings\": \"0\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"description\": {\n \"type\": \"string\"\n },\n \"domain\": {\n \"type\": \"string\"\n },\n \"kind\": {\n \"enum\": [\n \"location\",\n \"group\",\n \"thing\"\n ]\n },\n \"multiple_bookings_select\": {\n \"enum\": [\n \"-1\",\n \"1\",\n \"custom\"\n ]\n },\n \"multiple_bookings_custom\": {\n \"type\": \"number\"\n },\n \"multiple_bookings\": {\n \"enum\": [\n \"-1\",\n \"1\",\n \"custom\"\n ]\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"mailbox\",\n \"add\",\n \"resource\",\n {\n \"description\": \"test\",\n \"domain\": \"mailcow.tld\",\n \"kind\": \"location\",\n \"multiple_bookings_select\": \"0\",\n \"multiple_bookings_custom\": \"\",\n \"multiple_bookings\": \"0\",\n \"active\": \"1\"\n },\n null\n ],\n \"msg\": [\n \"resource_added\",\n \"mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Resources","Create Resources"]},{"title":"Delete Resources","path":"/api/v1/delete/resource","pathTemplate":"/api/v1/delete/resource","slug":"post~api~v1~delete~resource","method":"post","description":"\nUsing this endpoint you can delete a Resources, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["description@domain"],"description":"contains list of Resources you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"test@mailcow.tld\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"mailbox\",\n \"delete\",\n \"resource\",\n {\n \"name\": [\n \"test@mailcow.tld\"\n ]\n },\n null\n ],\n \"msg\": [\n \"resource_removed\",\n \"test@mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Resources","Delete Resources"]},{"title":"Get App Password","path":"/api/v1/get/app-passwd/all/{mailbox}","pathTemplate":"/api/v1/get/app-passwd/all/{mailbox}","slug":"get~api~v1~get~app-passwd~all~mailbox","method":"get","description":"\nUsing this endpoint you can get all app passwords from a specific mailbox.","parameters":[{"location":"path","name":"mailbox","description":"mailbox of entry you want to get","required":true,"example":"hello@mailcow.email","schema":{"type":"string","enum":["hello@mailcow.email"]}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 2,\n \"name\": \"emclient\",\n \"mailbox\": \"hello@mailcow.email\",\n \"domain\": \"mailcow.email\",\n \"created\": \"2019-12-21 16:04:55\",\n \"modified\": null,\n \"active_int\": 1,\n \"active\": \"✓\"\n }\n]\n","schema":""}}],"tags":["App Passwords","Get App Password"]},{"title":"Create App Password","path":"/api/v1/add/app-passwd","pathTemplate":"/api/v1/add/app-passwd","slug":"post~api~v1~add~app-passwd","method":"post","description":"\nUsing this endpoint you can create a new app password for a specific mailbox.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"username","description":"the username user@domain.tld","required":false,"members":[],"schema":{"type":"string"}},{"key":"app_name","description":"name of the app password","required":false,"members":[],"schema":{"type":"string"}},{"key":"app_passwd","description":"the password","required":false,"members":[],"schema":{"type":"string"}},{"key":"app_passwd2","description":"the password for confirmation","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active transport map 0 for a disabled transport map","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"username\": \"hello@mailcow.email\"\n \"app_name\": \"emclient\",\n \"app_passwd\": \"keyleudecticidechothistishownsan31\",\n \"app_passwd2\": \"keyleudecticidechothistishownsan31\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"username\": {\n \"type\": \"string\"\n },\n \"app_name\": {\n \"type\": \"string\"\n },\n \"app_passwd\": {\n \"type\": \"string\"\n },\n \"app_passwd2\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"app_passwd\",\n \"add\",\n {\n \"username\": \"hello@mailcow.email\",\n \"app_name\": \"emclient\",\n \"app_passwd\": \"keyleudecticidechothistishownsan31\",\n \"app_passwd2\": \"keyleudecticidechothistishownsan31\",\n \"active\": \"1\"\n }\n ],\n \"msg\": \"app_passwd_added\"\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["App Passwords","Create App Password"]},{"title":"Delete App Password","path":"/api/v1/delete/app-passwd","pathTemplate":"/api/v1/delete/app-passwd","slug":"post~api~v1~delete~app-passwd","method":"post","description":"\nUsing this endpoint you can delete a single app password.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of app passwords you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"1\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"app_passwd\",\n \"delete\",\n {\n \"id\": [\n \"2\"\n ]\n }\n ],\n \"msg\": [\n \"app_passwd_removed\",\n \"2\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["App Passwords","Delete App Password"]},{"title":"Get container status","path":"/api/v1/get/status/containers","pathTemplate":"/api/v1/get/status/containers","slug":"get~api~v1~get~status~containers","method":"get","description":"\nUsing this endpoint you can get the status of all containers and when hey where started and a few other details.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"ipv6nat-mailcow\": {\n \"type\": \"info\",\n \"container\": \"ipv6nat-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:06:37.273225445Z\",\n \"image\": \"robbertkl/ipv6nat\"\n },\n \"netfilter-mailcow\": {\n \"type\": \"info\",\n \"container\": \"netfilter-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:09.851559297Z\",\n \"image\": \"mailcow/netfilter:1.31\"\n },\n \"rspamd-mailcow\": {\n \"type\": \"info\",\n \"container\": \"rspamd-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:12.456075355Z\",\n \"image\": \"mailcow/rspamd:1.56\"\n },\n \"acme-mailcow\": {\n \"type\": \"info\",\n \"container\": \"acme-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:08.270660275Z\",\n \"image\": \"mailcow/acme:1.63\"\n },\n \"dovecot-mailcow\": {\n \"type\": \"info\",\n \"container\": \"dovecot-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:08.988680259Z\",\n \"image\": \"mailcow/dovecot:1.104\"\n },\n \"postfix-mailcow\": {\n \"type\": \"info\",\n \"container\": \"postfix-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:07.186717617Z\",\n \"image\": \"mailcow/postfix:1.44\"\n },\n \"nginx-mailcow\": {\n \"type\": \"info\",\n \"container\": \"nginx-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:12.9843038Z\",\n \"image\": \"nginx:mainline-alpine\"\n },\n \"mysql-mailcow\": {\n \"type\": \"info\",\n \"container\": \"mysql-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:02.201937528Z\",\n \"image\": \"mariadb:10.3\"\n },\n \"php-fpm-mailcow\": {\n \"type\": \"info\",\n \"container\": \"php-fpm-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:00.955808957Z\",\n \"image\": \"mailcow/phpfpm:1.55\"\n },\n \"clamd-mailcow\": {\n \"type\": \"info\",\n \"container\": \"clamd-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T21:00:01.622856172Z\",\n \"image\": \"mailcow/clamd:1.35\"\n },\n \"memcached-mailcow\": {\n \"type\": \"info\",\n \"container\": \"memcached-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T20:59:58.0907785Z\",\n \"image\": \"memcached:alpine\"\n },\n \"solr-mailcow\": {\n \"type\": \"info\",\n \"container\": \"solr-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T20:59:59.635413798Z\",\n \"image\": \"mailcow/solr:1.7\"\n },\n \"olefy-mailcow\": {\n \"type\": \"info\",\n \"container\": \"olefy-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T20:59:59.676259274Z\",\n \"image\": \"mailcow/olefy:1.2\"\n },\n \"sogo-mailcow\": {\n \"type\": \"info\",\n \"container\": \"sogo-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T20:59:58.382274592Z\",\n \"image\": \"mailcow/sogo:1.65\"\n },\n \"unbound-mailcow\": {\n \"type\": \"info\",\n \"container\": \"unbound-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T20:59:58.760595825Z\",\n \"image\": \"mailcow/unbound:1.10\"\n },\n \"dockerapi-mailcow\": {\n \"type\": \"info\",\n \"container\": \"dockerapi-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T20:59:59.984797808Z\",\n \"image\": \"mailcow/dockerapi:1.36\"\n },\n \"redis-mailcow\": {\n \"type\": \"info\",\n \"container\": \"redis-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T20:59:56.827166834Z\",\n \"image\": \"redis:5-alpine\"\n },\n \"watchdog-mailcow\": {\n \"type\": \"info\",\n \"container\": \"watchdog-mailcow\",\n \"state\": \"running\",\n \"started_at\": \"2019-12-22T20:59:56.028660382Z\",\n \"image\": \"mailcow/watchdog:1.65\"\n }\n}\n","schema":""}}],"tags":["status","Get container status"]},{"title":"Get vmail status","path":"/api/v1/get/status/vmail","pathTemplate":"/api/v1/get/status/vmail","slug":"get~api~v1~get~status~vmail","method":"get","description":"\nUsing this endpoint you can get the status of the vmail and the amount of used storage.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"type\": \"info\",\n \"disk\": \"/dev/mapper/mail--vg-root\",\n \"used\": \"11G\",\n \"total\": \"41G\",\n \"used_percent\": \"28%\"\n}\n","schema":""}}],"tags":["status","Get vmail status"]},{"title":"Get solr status","path":"/api/v1/get/status/solr","pathTemplate":"/api/v1/get/status/solr","slug":"get~api~v1~get~status~solr","method":"get","description":"\nUsing this endpoint you can get the status of all containers and when hey where started and a few other details.","parameters":[],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"type\": \"info\",\n \"solr_enabled\": false,\n \"solr_size\": null,\n \"solr_documents\": null\n}\n","schema":""}}],"tags":["status","Get solr status"]},{"title":"Get Ratelimits","path":"/api/v1/get/rl-mbox/{mailbox}","pathTemplate":"/api/v1/get/rl-mbox/{mailbox}","slug":"get~api~v1~get~rl-mbox~mailbox","method":"get","description":"\nUsing this endpoint you can get the ratelimits for a certain mailbox. You can use all for all mailboxes.","parameters":[{"location":"path","name":"mailbox","description":"name of mailbox or all","required":true,"schema":{"type":"string"}}],"transactions":[{"request":{"title":"json","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"value\": \"5\",\n \"frame\": \"s\",\n \"mailbox\": \"leon@mailcow.tld\"\n },\n {\n \"value\": \"3\",\n \"frame\": \"s\",\n \"mailbox\": \"lisa@mailcow.tld\"\n }\n]\n","schema":""}}],"tags":["Ratelimits","Get Ratelimits"]}],"tagActions":[{"title":"Domains","children":[{"title":"Get domains","actions":[{"title":"Get domains","method":"get","path":"/api/v1/get/domain/{id}","slug":"get~api~v1~get~domain~id"}]},{"title":"Create domain","actions":[{"title":"Create domain","method":"post","path":"/api/v1/add/domain","slug":"post~api~v1~add~domain"}]},{"title":"Update domain","actions":[{"title":"Update domain","method":"post","path":"/api/v1/edit/domain","slug":"post~api~v1~edit~domain"}]},{"title":"Delete domain","actions":[{"title":"Delete domain","method":"post","path":"/api/v1/delete/domain","slug":"post~api~v1~delete~domain"}]}]},{"title":"Domain antispam policies","children":[{"title":"List whitelist domain policy","actions":[{"title":"List whitelist domain policy","method":"get","path":"/api/v1/get/policy_wl_domain/{domain}","slug":"get~api~v1~get~policy~wl~domain~domain"}]},{"title":"List blacklist domain policy","actions":[{"title":"List blacklist domain policy","method":"get","path":"/api/v1/get/policy_bl_domain/{domain}","slug":"get~api~v1~get~policy~bl~domain~domain"}]},{"title":"Create domain policy","actions":[{"title":"Create domain policy","method":"post","path":"/api/v1/add/domain-policy","slug":"post~api~v1~add~domain-policy"}]},{"title":"Delete domain policy","actions":[{"title":"Delete domain policy","method":"post","path":"/api/v1/delete/domain-policy","slug":"post~api~v1~delete~domain-policy"}]}]},{"title":"Mailboxes","children":[{"title":"Get mailboxes","actions":[{"title":"Get mailboxes","method":"get","path":"/api/v1/get/mailbox/{id}","slug":"get~api~v1~get~mailbox~id"}]},{"title":"Create mailbox","actions":[{"title":"Create mailbox","method":"post","path":"/api/v1/add/mailbox","slug":"post~api~v1~add~mailbox"}]},{"title":"Update mailbox","actions":[{"title":"Update mailbox","method":"post","path":"/api/v1/edit/mailbox","slug":"post~api~v1~edit~mailbox"}]},{"title":"Update mailbox ACL","actions":[{"title":"Update mailbox ACL","method":"post","path":"/api/v1/edit/user-acl","slug":"post~api~v1~edit~user-acl"}]},{"title":"Update Pushover settings","actions":[{"title":"Update Pushover settings","method":"post","path":"/api/v1/edit/pushover","slug":"post~api~v1~edit~pushover"}]},{"title":"Delete mailbox","actions":[{"title":"Delete mailbox","method":"post","path":"/api/v1/delete/mailbox","slug":"post~api~v1~delete~mailbox"}]},{"title":"Quarantine Notifications","actions":[{"title":"Quarantine Notifications","method":"post","path":"/api/v1/edit/quarantine_notification","slug":"post~api~v1~edit~quarantine~notification"}]}]},{"title":"Aliases","children":[{"title":"Get aliases","actions":[{"title":"Get aliases","method":"get","path":"/api/v1/get/alias/{id}","slug":"get~api~v1~get~alias~id"}]},{"title":"Create alias","actions":[{"title":"Create alias","method":"post","path":"/api/v1/add/alias","slug":"post~api~v1~add~alias"}]},{"title":"Update alias","actions":[{"title":"Update alias","method":"post","path":"/api/v1/edit/alias","slug":"post~api~v1~edit~alias"}]},{"title":"Delete alias","actions":[{"title":"Delete alias","method":"post","path":"/api/v1/delete/alias","slug":"post~api~v1~delete~alias"}]}]},{"title":"Sync jobs","children":[{"title":"Get sync jobs","actions":[{"title":"Get sync jobs","method":"get","path":"/api/v1/get/syncjobs/all/no_log","slug":"get~api~v1~get~syncjobs~all~no~log"}]},{"title":"Create sync job","actions":[{"title":"Create sync job","method":"post","path":"/api/v1/add/syncjob","slug":"post~api~v1~add~syncjob"}]},{"title":"Update sync job","actions":[{"title":"Update sync job","method":"post","path":"/api/v1/edit/syncjob","slug":"post~api~v1~edit~syncjob"}]},{"title":"Delete sync job","actions":[{"title":"Delete sync job","method":"post","path":"/api/v1/delete/syncjob","slug":"post~api~v1~delete~syncjob"}]}]},{"title":"Fordwarding Hosts","children":[{"title":"Get Forwarding Hosts","actions":[{"title":"Get Forwarding Hosts","method":"get","path":"/api/v1/get/fwdhost/all","slug":"get~api~v1~get~fwdhost~all"}]},{"title":"Add Forward Host","actions":[{"title":"Add Forward Host","method":"post","path":"/api/v1/add/fwdhost","slug":"post~api~v1~add~fwdhost"}]},{"title":"Delete Forward Host","actions":[{"title":"Delete Forward Host","method":"post","path":"/api/v1/delete/fwdhost","slug":"post~api~v1~delete~fwdhost"}]}]},{"title":"Logs","children":[{"title":"Get Postfix logs","actions":[{"title":"Get Postfix logs","method":"get","path":"/api/v1/get/logs/postfix/{count}","slug":"get~api~v1~get~logs~postfix~count"}]},{"title":"Get Rspamd logs","actions":[{"title":"Get Rspamd logs","method":"get","path":"/api/v1/get/logs/rspamd-history/{count}","slug":"get~api~v1~get~logs~rspamd-history~count"}]},{"title":"Get Dovecot logs","actions":[{"title":"Get Dovecot logs","method":"get","path":"/api/v1/get/logs/dovecot/{count}","slug":"get~api~v1~get~logs~dovecot~count"}]},{"title":"Get ACME logs","actions":[{"title":"Get ACME logs","method":"get","path":"/api/v1/get/logs/acme/{count}","slug":"get~api~v1~get~logs~acme~count"}]},{"title":"Get SOGo logs","actions":[{"title":"Get SOGo logs","method":"get","path":"/api/v1/get/logs/sogo/{count}","slug":"get~api~v1~get~logs~sogo~count"}]},{"title":"Get Watchdog logs","actions":[{"title":"Get Watchdog logs","method":"get","path":"/api/v1/get/logs/watchdog/{count}","slug":"get~api~v1~get~logs~watchdog~count"}]},{"title":"Get Api logs","actions":[{"title":"Get Api logs","method":"get","path":"/api/v1/get/logs/api/{count}","slug":"get~api~v1~get~logs~api~count"}]},{"title":"Get Ratelimit logs","actions":[{"title":"Get Ratelimit logs","method":"get","path":"/api/v1/get/logs/ratelimited/{count}","slug":"get~api~v1~get~logs~ratelimited~count"}]},{"title":"Get Netfilter logs","actions":[{"title":"Get Netfilter logs","method":"get","path":"/api/v1/get/logs/netfilter/{count}","slug":"get~api~v1~get~logs~netfilter~count"}]},{"title":"Get Autodiscover logs","actions":[{"title":"Get Autodiscover logs","method":"get","path":"/api/v1/get/logs/autodiscover/{count}","slug":"get~api~v1~get~logs~autodiscover~count"}]}]},{"title":"Queue Manager","children":[{"title":"Get Queue","actions":[{"title":"Get Queue","method":"get","path":"/api/v1/get/mailq/all","slug":"get~api~v1~get~mailq~all"}]},{"title":"Flush Queue","actions":[{"title":"Flush Queue","method":"post","path":"/api/v1/edit/mailq","slug":"post~api~v1~edit~mailq"}]},{"title":"Delete Queue","actions":[{"title":"Delete Queue","method":"post","path":"/api/v1/delete/mailq","slug":"post~api~v1~delete~mailq"}]}]},{"title":"Quarantine","children":[{"title":"Get mails in Quarantine","actions":[{"title":"Get mails in Quarantine","method":"get","path":"/api/v1/get/quarantine/all","slug":"get~api~v1~get~quarantine~all"}]},{"title":"Delete mails in Quarantine","actions":[{"title":"Delete mails in Quarantine","method":"post","path":"/api/v1/delete/qitem","slug":"post~api~v1~delete~qitem"}]}]},{"title":"Fail2Ban","children":[{"title":"Get Fail2Ban Config","actions":[{"title":"Get Fail2Ban Config","method":"get","path":"/api/v1/get/fail2ban","slug":"get~api~v1~get~fail2ban"}]},{"title":"Edit Fail2Ban","actions":[{"title":"Edit Fail2Ban","method":"post","path":"/api/v1/edit/fail2ban","slug":"post~api~v1~edit~fail2ban"}]}]},{"title":"DKIM","children":[{"title":"Get DKIM Key","actions":[{"title":"Get DKIM Key","method":"get","path":"/api/v1/get/dkim/{domain}","slug":"get~api~v1~get~dkim~domain"}]},{"title":"Generate DKIM Key","actions":[{"title":"Generate DKIM Key","method":"post","path":"/api/v1/add/dkim","slug":"post~api~v1~add~dkim"}]},{"title":"Duplicate DKIM Key","actions":[{"title":"Duplicate DKIM Key","method":"post","path":"/api/v1/add/dkim_duplicate","slug":"post~api~v1~add~dkim~duplicate"}]},{"title":"Delete DKIM Key","actions":[{"title":"Delete DKIM Key","method":"post","path":"/api/v1/delete/dkim","slug":"post~api~v1~delete~dkim"}]}]},{"title":"Domain admin","children":[{"title":"Get Domain Admins","actions":[{"title":"Get Domain Admins","method":"get","path":"/api/v1/get/domain-admin/all","slug":"get~api~v1~get~domain-admin~all"}]},{"title":"Create Domain Admin user","actions":[{"title":"Create Domain Admin user","method":"post","path":"/api/v1/add/domain-admin","slug":"post~api~v1~add~domain-admin"}]},{"title":"Delete Domain Admin","actions":[{"title":"Delete Domain Admin","method":"post","path":"/api/v1/delete/domain-admin","slug":"post~api~v1~delete~domain-admin"}]}]},{"title":"Address Rewriting","children":[{"title":"Get BCC Map","actions":[{"title":"Get BCC Map","method":"get","path":"/api/v1/get/bcc/{id}","slug":"get~api~v1~get~bcc~id"}]},{"title":"Create BCC Map","actions":[{"title":"Create BCC Map","method":"post","path":"/api/v1/add/bcc","slug":"post~api~v1~add~bcc"}]},{"title":"Delete BCC Map","actions":[{"title":"Delete BCC Map","method":"post","path":"/api/v1/delete/bcc","slug":"post~api~v1~delete~bcc"}]},{"title":"Get Recipient Map","actions":[{"title":"Get Recipient Map","method":"get","path":"/api/v1/get/recipient_map/{id}","slug":"get~api~v1~get~recipient~map~id"}]},{"title":"Create Recipient Map","actions":[{"title":"Create Recipient Map","method":"post","path":"/api/v1/add/recipient_map","slug":"post~api~v1~add~recipient~map"}]},{"title":"Delete Recipient Map","actions":[{"title":"Delete Recipient Map","method":"post","path":"/api/v1/delete/recipient_map","slug":"post~api~v1~delete~recipient~map"}]}]},{"title":"Outgoing TLS Policy Map Overrides","children":[{"title":"Get TLS Policy Map","actions":[{"title":"Get TLS Policy Map","method":"get","path":"/api/v1/get/tls-policy-map/{id}","slug":"get~api~v1~get~tls-policy-map~id"}]},{"title":"Create TLS Policy Map","actions":[{"title":"Create TLS Policy Map","method":"post","path":"/api/v1/add/tls-policy-map","slug":"post~api~v1~add~tls-policy-map"}]},{"title":"Delete TLS Policy Map","actions":[{"title":"Delete TLS Policy Map","method":"post","path":"/api/v1/delete/tls-policy-map","slug":"post~api~v1~delete~tls-policy-map"}]}]},{"title":"oAuth Clients","children":[{"title":"Get oAuth Clients","actions":[{"title":"Get oAuth Clients","method":"get","path":"/api/v1/get/oauth2-client/{id}","slug":"get~api~v1~get~oauth2-client~id"}]},{"title":"Create oAuth Client","actions":[{"title":"Create oAuth Client","method":"post","path":"/api/v1/add/oauth2-client","slug":"post~api~v1~add~oauth2-client"}]},{"title":"Delete oAuth Client","actions":[{"title":"Delete oAuth Client","method":"post","path":"/api/v1/delete/oauth2-client","slug":"post~api~v1~delete~oauth2-client"}]}]},{"title":"Routing","children":[{"title":"Get Sender-Dependent Transports","actions":[{"title":"Get Sender-Dependent Transports","method":"get","path":"/api/v1/get/relayhost/{id}","slug":"get~api~v1~get~relayhost~id"}]},{"title":"Create Sender-Dependent Transports","actions":[{"title":"Create Sender-Dependent Transports","method":"post","path":"/api/v1/add/relayhost","slug":"post~api~v1~add~relayhost"}]},{"title":"Delete Sender-Dependent Transports","actions":[{"title":"Delete Sender-Dependent Transports","method":"post","path":"/api/v1/delete/relayhost","slug":"post~api~v1~delete~relayhost"}]},{"title":"Get Transport Maps","actions":[{"title":"Get Transport Maps","method":"get","path":"/api/v1/get/transport/{id}","slug":"get~api~v1~get~transport~id"}]},{"title":"Create Transport Maps","actions":[{"title":"Create Transport Maps","method":"post","path":"/api/v1/add/transport/all","slug":"post~api~v1~add~transport~all"}]},{"title":"Delete Transport Maps","actions":[{"title":"Delete Transport Maps","method":"post","path":"/api/v1/delete/transport","slug":"post~api~v1~delete~transport"}]}]},{"title":"Resources","children":[{"title":"Get Resources","actions":[{"title":"Get Resources","method":"get","path":"/api/v1/get/resource/all","slug":"get~api~v1~get~resource~all"}]},{"title":"Create Resources","actions":[{"title":"Create Resources","method":"post","path":"/api/v1/add/resource","slug":"post~api~v1~add~resource"}]},{"title":"Delete Resources","actions":[{"title":"Delete Resources","method":"post","path":"/api/v1/delete/resource","slug":"post~api~v1~delete~resource"}]}]},{"title":"App Passwords","children":[{"title":"Get App Password","actions":[{"title":"Get App Password","method":"get","path":"/api/v1/get/app-passwd/all/{mailbox}","slug":"get~api~v1~get~app-passwd~all~mailbox"}]},{"title":"Create App Password","actions":[{"title":"Create App Password","method":"post","path":"/api/v1/add/app-passwd","slug":"post~api~v1~add~app-passwd"}]},{"title":"Delete App Password","actions":[{"title":"Delete App Password","method":"post","path":"/api/v1/delete/app-passwd","slug":"post~api~v1~delete~app-passwd"}]}]},{"title":"status","children":[{"title":"Get container status","actions":[{"title":"Get container status","method":"get","path":"/api/v1/get/status/containers","slug":"get~api~v1~get~status~containers"}]},{"title":"Get vmail status","actions":[{"title":"Get vmail status","method":"get","path":"/api/v1/get/status/vmail","slug":"get~api~v1~get~status~vmail"}]},{"title":"Get solr status","actions":[{"title":"Get solr status","method":"get","path":"/api/v1/get/status/solr","slug":"get~api~v1~get~status~solr"}]}]},{"title":"Ratelimits","children":[{"title":"Get Ratelimits","actions":[{"title":"Get Ratelimits","method":"get","path":"/api/v1/get/rl-mbox/{mailbox}","slug":"get~api~v1~get~rl-mbox~mailbox"}]}]}],"config":{"playground":{"enabled":true,"env":"easy","environments":{"easy":{"playground":false,"url":"/"},"advanced":{"url":"/"}}},"optimized":false,"stylesheets":[],"sidebar":{"groupOrder":"auto"},"basePath":"/"}}
});
return app;