API REFERENCE
Result Deliveries
Update result deliveries
1 min
{ "name" "update result deliveries", "method" "put", "url" "https //api sandbox klavi ai/monitor/v1/monitors/{id}/result deliveries", "description" "update result deliveries", "tab" "examples", "examples" { "languages" \[ { "id" "puhi8r b4r8l ko18gqnk", "language" "curl", "code" "curl location globoff request put 'https //api sandbox klavi ai/monitor/v1/monitors/{id}/result deliveries' \\\\\n header 'authorization string'\n data '{\\"resultdeliveries\\" \[{\\"integrationmethod\\" \\"event\\",\\"serverconfig\\" {\\"webhook\\" \\"https //client webhook com\\",\\"headers\\" \[{\\"key\\" \\"key\\",\\"value\\" \\"value\\"}]}},{\\"integrationmethod\\" \\"sftp\\",\\"serverconfig\\" {\\"host\\" \\"host com\\",\\"port\\" \\"port\\",\\"username\\" \\"user\\",\\"password\\" \\"pass\\"}},{\\"integrationmethod\\" \\"file server\\",\\"serverconfig\\" {\\"serveraddress\\" \\"https //files example com/api\\",\\"port\\" 22,\\"headers\\" \[{\\"key\\" \\"key\\",\\"value\\" \\"value\\"}]}}]}'", "customlabel" "" }, { "id" "3nx1awypkbnicjruhy97d", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'put',\n 'url' 'https //api sandbox klavi ai/monitor/v1/monitors/{id}/result deliveries',\n 'headers' {\n 'authorization' 'string'\n }\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "bww5rnyy z0kvccd3jjss", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"authorization\\", \\"string\\");\n\nvar requestoptions = {\n method 'put',\n headers myheaders,\n redirect 'follow'\n};\n\nfetch(\\"https //api sandbox klavi ai/monitor/v1/monitors/{id}/result deliveries\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "6ysq9kr5w3idaq0ptdupd", "language" "python", "code" "import requests\n\nurl = \\"https //api sandbox klavi ai/monitor/v1/monitors/{id}/result deliveries\\"\n\npayload = {}\nheaders = {\n 'authorization' 'string'\n}\n\nresponse = requests request(\\"put\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "cbvpbgxtlwlq9med7axjl", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api sandbox klavi ai/monitor/v1/monitors/{id}/result deliveries\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http put new(url)\nrequest\[\\"authorization\\"] = \\"string\\"\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "puhi8r b4r8l ko18gqnk" }, "results" { "languages" \[ { "id" "ya3t6aoc3nmaiy40yp3vq", "language" "200", "customlabel" "", "code" "{\n\t\\"message\\" \\"ok\\"\n}" }, { "id" "mtqryntmxosjmxrjheepb", "language" "404", "customlabel" "", "code" "{\n \\"message\\" \\"ain't no cake like that \\"\n}" } ], "selectedlanguageid" "ya3t6aoc3nmaiy40yp3vq" }, "request" { "pathparameters" \[ { "name" "id", "kind" "required", "type" "string", "description" "id of the monitor", "" "required" } ], "queryparameters" \[], "headerparameters" \[ { "name" "authorization", "kind" "required", "type" "string", "description" "bearer access token, it returned by the /auth", "" "bearer access token, it returned by the /auth" } ], "bodydataparameters" \[ { "name" "resultdeliveries", "kind" "required", "type" "object", "description" "configure the method for receiving data ", "" "configure the method for receiving data ", "children" \[ { "name" "event", "kind" "optional", "type" "object", "description" "requires partner to provide webhook for event reception ", "children" \[ { "name" "webhook", "kind" "optional", "type" "string", "description" "http address " }, { "name" "headers", "kind" "optional", "type" "array", "description" "http request header " } ] }, { "name" "sftp", "kind" "optional", "type" "string", "description" "require partner to provide the ftp address for receiving data, format sftp\ //username\ password\@hostname\ port", "children" \[ { "name" "hostname", "kind" "optional", "type" "string", "description" "" }, { "name" "port", "kind" "optional", "type" "number", "description" "" }, { "name" "username", "kind" "optional", "type" "string", "description" "" }, { "name" "password", "kind" "optional", "type" "string", "description" "" } ] } ], "schema" \[ { "name" "event", "kind" "optional", "type" "object", "description" "requires partner to provide webhook for event reception ", "children" \[ { "name" "webhook", "kind" "optional", "type" "string", "description" "http address " }, { "name" "headers", "kind" "optional", "type" "array", "description" "http request header " } ] }, { "name" "sftp", "kind" "optional", "type" "string", "description" "require partner to provide the ftp address for receiving data, format sftp\ //username\ password\@hostname\ port", "children" \[ { "name" "hostname", "kind" "optional", "type" "string", "description" "" }, { "name" "port", "kind" "optional", "type" "number", "description" "" }, { "name" "username", "kind" "optional", "type" "string", "description" "" }, { "name" "password", "kind" "optional", "type" "string", "description" "" } ] } ] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false } body example { "resultdeliveries" { "event" { "webhook" "https //client webhook com", "headers" \[ { "key" "key", "value" "value" } ] } } }