Create Space
0 min
{ "id" "vjivtps1qu2cu0et2myo7", "type" "api oas v2", "data" { "method" "post", "url" " https //api archbee com/api/public api/space/create https //api archbee com/api/public api/space/create ", "servers" \[ { "url" " https //api archbee com/api/public api/space/create https //api archbee com/api/public api/space/create ", "description" "archbee api server" } ], "name" "create space", "description" " create a new space with desired fields, return its id new space will inherit apikey ", "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" "name", "kind" "optional", "type" "string", "description" "name of space", "example" "" }, { "name" "isllmenabled", "kind" "optional", "type" "boolean", "description" "wether ai will be enabled", "example" "" }, { "name" "isreviewsystemenabled", "kind" "optional", "type" "boolean", "description" "wether review system will be enaled", "example" "" }, { "name" "docspacegroupid", "kind" "optional", "type" "string", "description" "id of space group to include this space in", "example" "" } ], "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" "process status", "jsonexample" "", "isexpanded" true, "schema" \[ { "kind" "optional", "type" "object", "description" "process status", "schema" \[ { "name" "status", "kind" "optional", "type" "string ", "description" "response status", "example" "" }, { "name" "data", "kind" "optional", "type" "object", "description" "docspace id", "example" "", "schema" \[ { "name" "newdocspaceid", "kind" "optional", "type" "string", "description" "doc space id", "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" "5x1x6ztxensafl3k2jmgj", "language" "curl", "label" "curl", "code" "curl request post \\\n url https //api archbee com/api/public api/space/create https //api archbee com/api/public api/space/create \\\n header 'accept application/json'" }, { "id" "zgqwjjdfjljeis3lccjth", "language" "javascript", "label" "javascript", "code" "var myheaders = new headers();\nmyheaders append("accept", "application/json");\nmyheaders append("content type", "application/json");\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n redirect 'follow'\n};\n\nfetch(" https //api archbee com/api/public api/space/create https //api archbee com/api/public api/space/create ", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));" }, { "id" "xqo1e7uvjmen4hlrz6pzy", "language" "ruby", "label" "ruby", "code" "require "uri"\nrequire "json"\nrequire "net/http"\n\nurl = uri(" https //api archbee com/api/public api/space/create")\n\nhttps https //api archbee com/api/public api/space/create")\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"\n\nresponse = https request(request)\nputs response read body\n" }, { "id" "au sssiqhtsbc uwn dxq", "language" "python", "label" "python", "code" "import requests\nimport json\n\nurl = " https //api archbee com/api/public api/space/create"\n\npayload https //api archbee com/api/public api/space/create"\n\npayload = {}\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" "5x1x6ztxensafl3k2jmgj" }, "results" { "languages" \[ { "id" "m78mtecvfl d9drzya6bw", "language" "200", "code" "// process status\n{\n "status" "",\n "data" {\n "newdocspaceid" ""\n }\n}" }, { "id" "9mspv6viovd84zn8hsee9", "language" "400", "code" "// invalid request\n{\n "status" "not ok",\n "messages" \[\n "some error message"\n ]\n}" } ], "selectedlanguageid" "m78mtecvfl d9drzya6bw" } }, "children" \[ { "text" "" } ] }