Discard suggestion document
0 min
{ "id" "lzdnn9wrtgj7l31dgdix5", "type" "api oas v2", "data" { "method" "post", "url" " https //api archbee com/api/public api/suggest change/discard https //api archbee com/api/public api/suggest change/discard ", "servers" \[ { "url" " https //api archbee com/api/public api/suggest change/discard https //api archbee com/api/public api/suggest change/discard ", "description" "archbee api server" } ], "name" "discard suggestion document", "description" " discard and delete a suggestion document without merging it into the base document the suggestion document must have a docid starting with 'suggest ' ", "contenttype" "application/json", "request" { "pathparameters" \[], "headerparameters" \[ { "kind" "required", "name" "content type", "type" "string", "example" "application/json", "description" "" } ], "queryparameters" \[], "bodydataparameters" \[ { "kind" "required", "name" "body", "type" "object", "description" "", "schema" \[ { "name" "docid", "kind" "required", "type" "string", "description" "the id of the suggestion document to discard must start with 'suggest ' ", "example" "suggest 21character string" } ], "isexpanded" true } ], "formdataparameters" \[], "oauthparameters" \[ { "id" "bearerauth", "name" "bearerauth", "kind" "optional", "type" "http", "description" " requires the authorization header in the form authorization bearer {base64(docspaceid apikey)} where the token is base64 encoding of docspaceid, tilde, and apikey ", "scheme" "bearer" } ] }, "responses" \[ { "statuscode" "200", "description" "suggestion successfully discarded", "jsonexample" "", "isexpanded" true, "schema" \[ { "kind" "optional", "type" "object", "description" "", "schema" \[ { "name" "status", "kind" "optional", "type" "string", "description" "", "example" "ok" } ], "isexpanded" true } ] }, { "statuscode" "400", "description" "bad request", "jsonexample" "", "isexpanded" true, "schema" \[ { "kind" "optional", "type" "object", "description" "", "customtype" "response400", "schema" \[ { "name" "status", "kind" "optional", "type" "string\<ok | not ok>", "description" "response status", "example" "not ok" }, { "name" "messages", "kind" "optional", "type" "array", "description" "array of messages", "example" "\["some error message"]", "itemtype" "string", "customtype" "string\[]", "itemexample" "some error message", "itemdefault" "" } ], "modelref" "#/components/schemas/response400", "isexpanded" true } ] } ], "hasxcodesamples" false, "examples" { "languages" \[ { "id" "s0nm9hrmluyhoyrk4dmfd", "language" "curl", "label" "curl", "code" "curl request post \\\n url https //api archbee com/api/public api/suggest change/discard https //api archbee com/api/public api/suggest change/discard \\\n header 'accept application/json' \\\n header 'content type application/json' \\\n data '{\n "docid" "suggest 21character string"\n }'" }, { "id" "dmxi0fi8phmy80vvy2a21", "language" "javascript", "label" "javascript", "code" "var myheaders = new headers();\nmyheaders append("accept", "application/json");\nmyheaders append("content type", "application/json");\n\nvar raw = json stringify({\n "docid" "suggest 21character string"\n});\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(" https //api archbee com/api/public api/suggest change/discard https //api archbee com/api/public api/suggest change/discard ", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));" }, { "id" "ddqs3 rfy ktfnmsww0og", "language" "ruby", "label" "ruby", "code" "require "uri"\nrequire "json"\nrequire "net/http"\n\nurl = uri(" https //api archbee com/api/public api/suggest change/discard")\n\nhttps https //api archbee com/api/public api/suggest change/discard")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http post new(url)\nrequest\["accept"] = "application/json"\nrequest\["content type"] = "application/json"\nrequest body = json dump({\n "docid" "suggest 21character string"\n})\n\nresponse = https request(request)\nputs response read body\n" }, { "id" "js7gxjeo6w8e8eivrqqkt", "language" "python", "label" "python", "code" "import requests\nimport json\n\nurl = " https //api archbee com/api/public api/suggest change/discard"\n\npayload https //api archbee com/api/public api/suggest change/discard"\n\npayload = json dumps({\n "docid" "suggest 21character string"\n})\nheaders = {\n 'accept' 'application/json',\n 'content type' 'application/json'\n}\n\nresponse = requests request("post", url, headers=headers, data=payload)\n\nprint(response text)\n" } ], "selectedlanguageid" "s0nm9hrmluyhoyrk4dmfd" }, "results" { "languages" \[ { "id" "g46awtagggl19mzbj1rzi", "language" "200", "code" "// suggestion successfully discarded\n{\n "status" "ok"\n}" }, { "id" "3ih0hwh xrlmi452yxwib", "language" "400", "code" "// bad request\n{\n "status" "not ok",\n "messages" \[\n "some error message"\n ]\n}" } ], "selectedlanguageid" "g46awtagggl19mzbj1rzi" } }, "children" \[ { "text" "" } ] }