List all items.
0 min
{ "id" "eosjs8x67cuqdd7n8kxst", "type" "api oas v2", "data" { "method" "get", "url" " https //api example com/v1/item https //api example com/v1/item ", "servers" \[ { "url" " https //api example com/v1/item https //api example com/v1/item ", "description" "optional server description, e g main (production) server" } ], "name" "list all items ", "description" "lists all the items ", "contenttype" "application/json", "request" { "pathparameters" \[], "headerparameters" \[], "queryparameters" \[], "bodydataparameters" \[], "formdataparameters" \[], "oauthparameters" \[] }, "responses" \[ { "statuscode" "200", "description" "ok", "jsonexample" "", "isexpanded" true, "schema" \[ { "kind" "optional", "type" "array", "description" "", "customtype" "item\[]", "schema" \[ { "name" "bad", "kind" "optional", "type" "integer", "description" "example isn't shown", "example" 0 }, { "name" "good", "kind" "optional", "type" "integer", "description" "example is shown", "example" 1 } ], "modelref" "#/components/schemas/item", "isexpanded" true } ] } ], "hasxcodesamples" false, "examples" { "languages" \[ { "id" "itlx 7plig9v4nxfe1 dv", "language" "curl", "label" "curl", "code" "curl location ' https //api example com/v1/item https //api example com/v1/item ' \\\n header 'accept application/json' \\\n header 'content type application/json'" }, { "id" "iei7rtup78y7a1 xktouh", "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 'get',\n headers myheaders,\n redirect 'follow'\n};\n\nfetch(" https //api example com/v1/item https //api example com/v1/item ", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));" }, { "id" "jmx2mcmxef09ayi 5uzv9", "language" "ruby", "label" "ruby", "code" "require "uri"\nrequire "json"\nrequire "net/http"\n\nurl = uri(" https //api example com/v1/item")\n\nhttps https //api example com/v1/item")\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"\n\nresponse = https request(request)\nputs response read body\n" }, { "id" "edy6xcgfr8nwf60ymalxs", "language" "python", "label" "python", "code" "import requests\nimport json\n\nurl = " https //api example com/v1/item"\n\npayload https //api example com/v1/item"\n\npayload = {}\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" "itlx 7plig9v4nxfe1 dv" }, "results" { "languages" \[ { "id" "auugd9ll2j7fc tynzdya", "language" "200", "code" "// ok \n\[\n {\n "bad" 0,\n "good" 1\n }\n]" } ], "selectedlanguageid" "auugd9ll2j7fc tynzdya" } }, "children" \[ { "text" "" } ] }