Delete document
0 min
{ "id" "ozaonmqlxvkvwjuuxyz a", "type" "api oas v2", "data" { "method" "delete", "url" " https //api archbee com/api/public api/doc https //api archbee com/api/public api/doc ", "servers" \[ { "url" " https //api archbee com/api/public api/doc https //api archbee com/api/public api/doc ", "description" "archbee api server" } ], "name" "delete document", "description" " delete document by docid ", "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" "document id that will be permanently deleted ", "example" "21 character string0" } ], "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" "delete status", "jsonexample" "", "isexpanded" true, "schema" \[ { "kind" "optional", "type" "object", "description" "delete status", "schema" \[ { "name" "status", "kind" "optional", "type" "string ", "description" "response status", "example" "" }, { "name" "data", "kind" "optional", "type" "object", "description" "", "example" "", "schema" \[ { "name" "status", "kind" "optional", "type" "boolean", "description" "", "example" "" } ] } ], "isexpanded" true } ] }, { "statuscode" "400", "description" "invalid 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" "ph pmtvptb53gd3od3051", "language" "curl", "label" "curl", "code" "curl request delete \\\n url https //api archbee com/api/public api/doc https //api archbee com/api/public api/doc \\\n header 'accept application/json' \\\n header 'content type application/json' \\\n data '{\n "docid" "21 character string0"\n }'" }, { "id" "yr3uleoiqiho2y5lbtmlm", "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" "21 character string0"\n});\n\nvar requestoptions = {\n method 'delete',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(" https //api archbee com/api/public api/doc https //api archbee com/api/public api/doc ", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));" }, { "id" "7 54rrtrcknhn0hk3p3ob", "language" "ruby", "label" "ruby", "code" "require "uri"\nrequire "json"\nrequire "net/http"\n\nurl = uri(" https //api archbee com/api/public api/doc")\n\nhttps https //api archbee com/api/public api/doc")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http delete new(url)\nrequest\["accept"] = "application/json"\nrequest\["content type"] = "application/json"\nrequest body = json dump({\n "docid" "21 character string0"\n})\n\nresponse = https request(request)\nputs response read body\n" }, { "id" "czf6bsazjsn7onv90 m3m", "language" "python", "label" "python", "code" "import requests\nimport json\n\nurl = " https //api archbee com/api/public api/doc"\n\npayload https //api archbee com/api/public api/doc"\n\npayload = json dumps({\n "docid" "21 character string0"\n})\nheaders = {\n 'accept' 'application/json',\n 'content type' 'application/json'\n}\n\nresponse = requests request("delete", url, headers=headers, data=payload)\n\nprint(response text)\n" } ], "selectedlanguageid" "ph pmtvptb53gd3od3051" }, "results" { "languages" \[ { "id" "oqs8kvvixma9gxrad5ge1", "language" "200", "code" "// delete status\n{\n "status" "",\n "data" {\n "status" false\n }\n}" }, { "id" "jexkb4lqjyofhghjuvcdo", "language" "400", "code" "// invalid request\n{\n "status" "not ok",\n "messages" \[\n "some error message"\n ]\n}" } ], "selectedlanguageid" "oqs8kvvixma9gxrad5ge1" } }, "children" \[ { "text" "" } ] }