Get document
0 min
{ "id" "rp4m6hub30bokpwclw8t6", "type" "api oas v2", "data" { "method" "get", "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" "get document", "description" " retrieve a document in markdown , html , json , or source format ", "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 document to be returned ", "example" "21 character string0" }, { "name" "format", "kind" "optional", "type" "string\<markdown | html | json | source>", "description" "the format of the returned data default is markdown ", "example" "markdown" } ], "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" "successful response containing the document content ", "jsonexample" "", "isexpanded" true, "schema" \[ { "kind" "optional", "type" "object", "description" "", "schema" \[ { "name" "content", "kind" "optional", "type" "string", "description" "the content of the document in the specified format ", "example" "" }, { "name" "format", "kind" "optional", "type" "string", "description" "the format of the returned document ", "example" "" } ], "isexpanded" true } ] }, { "statuscode" "400", "description" "invalid request parameters ", "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" "co6qmidesomlazblaw8ft", "language" "curl", "label" "curl", "code" "curl request get \\\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" "rbwlqc2bpsyqir 3a79pa", "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 'get',\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" "d7tpvlxwe8bjqczin1cce", "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 get 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" "unxq6hmgextnwytwxtubn", "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("get", url, headers=headers, data=payload)\n\nprint(response text)\n" } ], "selectedlanguageid" "co6qmidesomlazblaw8ft" }, "results" { "languages" \[ { "id" "avyhwrcznzxvwgpiabxdq", "language" "200", "code" "// successful response containing the document content \n{\n "content" "",\n "format" ""\n}" }, { "id" "vghmfity6os r5ib6jnww", "language" "400", "code" "// invalid request parameters \n{\n "status" "not ok",\n "messages" \[\n "some error message"\n ]\n}" } ], "selectedlanguageid" "avyhwrcznzxvwgpiabxdq" } }, "children" \[ { "text" "" } ] }