API Documentation
Endpoint Documentation
5 min
{ "tab" "examples", "url" "https //api cakes com/v1/cakes/\ id", "name" "get cakes ", "method" "post", "request" { "pathparameters" \[ { "kind" "required", "name" "id", "type" "string", "description" "id of the cake to get, \n for free of course " } ], "queryparameters" \[ { "kind" "required", "name" "recipe", "type" "string", "description" "the api will do its best to find \n a cake matching the provided recipe " }, { "kind" "required", "name" "gluten", "type" "boolean", "description" "whether the cake should be \n gluten free or not " } ], "headerparameters" \[ { "kind" "required", "name" "x auth token", "type" "string", "description" "authentication token to track \n down who is emptying our stocks " } ], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "4ilti9dkbk8u0ew38wreo", "code" "{\n \\"name\\" \\"cake's name\\",\n \\"recipe\\" \\"cake's recipe name\\",\n \\"cake\\" \\"binary cake\\"\n}", "language" "202" }, { "id" "evx t2vwjqoat0auvzif3", "code" "{\n \\"message\\" \\"ain't no cake like that \\"\n}", "language" "404" } ], "selectedlanguageid" "4ilti9dkbk8u0ew38wreo" }, "examples" { "languages" \[ { "id" "nohs7eekx54ru8g3reov4", "code" "curl request get\n url https //api cakes com/v1/cakes/\ id \n header 'accept application/json'", "language" "curl" }, { "id" "vfqs7unlji7akfz4taxve", "code" "", "language" "go" }, { "id" "lq04gymmqwroogvmjypxc", "code" "fetch(\\"https //api cakes com/v1/cakes/\ id\\", {\n \\"method\\" \\"get\\",\n \\"headers\\" {\n \\"accept\\" \\"application/json\\"\n }\n})\n then(response => {\n console log(response);\n})\n catch(err => {\n console error(err);\n});", "language" "javascript" }, { "id" "05kkw ye63ziy iysxc2s", "code" "const fetch = require('node fetch');\n\nlet url = 'https //api cakes com/v1/cakes/\ id';\nlet options = {\n method 'get', \nheaders {\n accept 'application/json',\n }\n};\nfetch(url, options)\n then(res => res json())\n then(json => console log(json))\n catch(err => console error('error ' + err));", "language" "nodejs" }, { "id" "eitbflha3sndbwiroft2l", "code" "import requests\n\nurl = \\"https //api cakes com/v1/cakes/\ id\\"\nheaders = {\\"accept\\" \\"application/json\\"}\nresponse = requests request(\\"get\\", url, headers=headers)\nprint(response text)", "language" "python" }, { "id" "haxee3uklayuwu87ihjso", "code" "const fetch = require('node fetch');\n\nlet url = 'https //api cakes com/v1/cakes/\ id';\nlet options = {method 'get', headers {accept 'application/json'}};\nfetch(url, options)\n then(res => res json())\n then(json => console log(json))\n catch(err => console error('error ' + err));", "language" "ruby" } ], "selectedlanguageid" "nohs7eekx54ru8g3reov4" }, "responses" \[ { "statuscode" "202", "description" "cake successfully retrieved ", "jsonexample" "{\n \\"name\\" \\"cake's name\\",\n \\"recipe\\" \\"cake's recipe name\\",\n \\"cake\\" \\"binary cake\\"\n}" }, { "statuscode" 404, "description" "could not find a cake matching this query ", "jsonexample" "{\n \\"message\\" \\"ain't no cake like that \\"\n}" } ], "description" "this endpoint allows you to get free cakes ", "currentnewparameter" { "label" "path parameter", "value" "pathparameters" } } { "tab" "examples", "url" "https //api cakes com", "name" "get cakes", "method" "put", "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "kind" "required", "name" "id", "type" "string", "description" "id of the cake to get" } ], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "pnrqsojvkr6sauadkxppq", "code" "{\n \\"name\\" \\"cake's name\\",\n}", "language" "200" }, { "id" "wkg9fhksbnmqigxe qlon", "code" "{\n \\"message\\" \\"ain't no cake like that \\"\n}", "language" "404" } ], "selectedlanguageid" "pnrqsojvkr6sauadkxppq" }, "examples" { "languages" \[ { "id" "ndesygklpcqtb1gxv6rrc", "code" "fetch(\\"https //api cakes com\\", {\n \\"method\\" \\"get\\",\n \\"headers\\" {\n \\"accept\\" \\"application/json\\"\n }\n})\n then(response => {\n console log(response);\n})\n catch(err => {\n console error(err);\n});", "language" "javascript" } ], "selectedlanguageid" "ndesygklpcqtb1gxv6rrc" }, "description" "get a cake by its id", "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" } } environments dev qa live throttling cost per 1000 calls docid\ x 04meqilww4ymhoomc80 docid 4ujrxmsxdwgted9zwymwq docid s8tpog43tvvdbuzexolh docid 6pltlcjh3q6hls8og4efx docid\ w0ooel1ohiekrhuzq3fdv
π€
Have a question?
Our super-smart AI, 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.