SWAGGER
1 min
bla bla { "name" "get cakes eeee", "method" "get", "url" "https //api cakes com", "description" "einen kuchen anhand seiner id abrufen", "tab" "examples", "examples" { "languages" \[ { "id" "p8blfnekct8lxomjzbe5i", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"id\\" \\"string\\"\n});\n\nvar requestoptions = {\n method 'get',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //api cakes com\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "yws8y8isisw3u yvnnjpf", "language" "curl", "code" "curl location request get 'https //api cakes com' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data '{\n \\"id\\" \\"string\\"\n}'", "customlabel" "" }, { "id" "epm2z26wg gix2iwtwept", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'get',\n 'url' 'https //api cakes com',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"id\\" \\"string\\"\n })\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "cxsmz93ndwynogmytvtpi", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"id\\" \\"string\\"\n});\n\nvar requestoptions = {\n method 'get',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //api cakes com\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "l5t7ox8tbrkgxxjsbsryf", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //api cakes com\\"\n\npayload = json dumps({\n \\"id\\" \\"string\\"\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", "customlabel" "" }, { "id" "hmugawbopo0nijafbfpdl", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api cakes com\\")\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 \\"id\\" \\"string\\"\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" }, { "id" " j86zkgwyhizdd4qutozc", "language" "curl", "code" "curl location request get 'https //api cakes com' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data '{\n \\"id\\" \\"string\\",\n \\"parameter name\\" \\"number\\"\n}'", "customlabel" "" }, { "id" "siy5un3crbkyb0xwsgtfn", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'get',\n 'url' 'https //api cakes com',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"id\\" \\"string\\",\n \\"parameter name\\" \\"number\\"\n })\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "w7pbqu18rkicv2nzydtel", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"id\\" \\"string\\",\n \\"parameter name\\" \\"number\\"\n});\n\nvar requestoptions = {\n method 'get',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //api cakes com\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "menopojmr3bkkwqnzzvz9", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //api cakes com\\"\n\npayload = json dumps({\n \\"id\\" \\"string\\",\n \\"parameter name\\" \\"number\\"\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", "customlabel" "" }, { "id" " wdnruo6tf6v wuu1xnzh", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api cakes com\\")\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 \\"id\\" \\"string\\",\n \\"parameter name\\" \\"number\\"\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "p8blfnekct8lxomjzbe5i" }, "results" { "languages" \[ { "id" "acqfhelj8rxc h0ssozrp", "language" "200", "code" "{\n \\"name\\" \\"cake's name\\",\n}", "customlabel" "" }, { "id" "ekd1pc4daj9yx0n534ut9", "language" "404", "code" "{\n \\"message\\" \\"gibt keinen solchen kuchen \\"\n}", "customlabel" "" } ], "selectedlanguageid" "acqfhelj8rxc h0ssozrp" }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "name" "id", "kind" "required", "type" "string", "description" "id des abzurufenden kuchens", "" "required" }, { "name" "parameter name", "kind" "required", "type" "integer", "description" "", "" "required" } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false, "response" \[ { "name" "id", "kind" "optional", "type" "string", "description" "id des abgerufenen kuchens" }, { "name" "parameter name", "kind" "optional", "type" "string", "description" "", "children" \[] }, { "name" "parameter name", "kind" "optional", "type" "string", "description" "", "children" \[] } ], "autogeneratedanchorslug" "get cakes eeee", "legacyhash" "xlc4whiwo52qo6jxsj0ip" }
Have a question?
Our knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.