{"info":{"_postman_id":"904926c5-2d78-45b2-bca3-e70f951c4bcf","name":"Build your own (dummy data)","description":"<html><head></head><body><h1 id=\"introduction\">Introduction</h1>\n<p>Get some dummy data with the exact attributes that match your API response. </p>\n<p>You can get a response either as an object, e.g. A person object with first_name, age, height, etc, or you can get a response as a list, in this case, a list of 10 objects all with defined attributes will be returned.</p>\n<h1 id=\"overview\">Overview</h1>\n<p>This is a two steps process:</p>\n<ul>\n<li>Step 1: Define your attributes and data types</li>\n<li>Step 2: Generate data with your schema definition</li>\n</ul>\n<p>Bonus: View your data attributes definition and share it with others</p>\n<h1 id=\"authentication\">Authentication</h1>\n<p>Currently, no authentication is required, use it on the fly.</p>\n<h1 id=\"error-codes\">Error Codes</h1>\n<p>400: bad request\nPossible reasons:</p>\n<ul>\n<li>missing required when creating your schema</li>\n<li>not supported data type</li>\n<li>too many attributes, currently you can add up to 12 attributes</li>\n<li>attribute name is too long</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Introduction","slug":"introduction"},{"content":"Overview","slug":"overview"},{"content":"Authentication","slug":"authentication"},{"content":"Error Codes","slug":"error-codes"}],"owner":"768551","collectionId":"904926c5-2d78-45b2-bca3-e70f951c4bcf","publishedId":"TW6uoURn","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-01-25T14:00:46.000Z"},"item":[{"name":"Examples","item":[],"id":"9f66e7bf-af79-4eea-b266-931f8b635efc","_postman_id":"9f66e7bf-af79-4eea-b266-931f8b635efc","description":""},{"name":"1. Define your API response attributes","event":[{"listen":"test","script":{"id":"6038862c-fc6d-4886-b5e6-b70c5ec4a27f","exec":["pm.test(\"Status code is 201\", function(){\r","    pm.response.to.have.status(201);\r","});\r","\r","pm.test(\"Check response has schema_key fields\", function () {\r","\r","    var jsonData = pm.response.json();\r","    const schema = {\r","        \"type\": \"object\",\r","        \"properties\": {\r","            \"schema_key\": { \"type\": \"string\" }\r","        },\r","        \"required\": [\"schema_key\"]\r","    };\r","\r","    pm.expect(tv4.validate(jsonData, schema)).to.be.true;\r","});"],"type":"text/javascript"}}],"id":"fde3db45-26c8-4848-ace2-16fe34a39583","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"mode\" : \"single\",\r\n    \"attributes\" : [\r\n        {\r\n            \"name\" : \"first_name\",\r\n            \"type\": \"name\"\r\n        },{\r\n            \"name\": \"age\",\r\n            \"type\": \"int\"\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"https://showmethedata.flyingwhalelab.com/api/v1/schema","description":"<p>Please use POST body in JSON format</p>\n<h3 id=\"fields\">Fields:</h3>\n<p><code>mode</code> : required, support <code>single</code> or <code>list</code></p>\n<p><code>attributes</code> required, need to provide a list of attributes that you want to appear in the API response, each attribute field needs to have a <code>name</code> and a <code>type</code> field.</p>\n<h3 id=\"data-types\">Data types:</h3>\n<p>Here is a list of currently supported <code>type</code></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Type name</th>\n<th>Description</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>string</code></td>\n<td>Random string 15 chars long</td>\n<td>UNkudzWeOUSrvBgWIYfxWRgvUVQTJb</td>\n</tr>\n<tr>\n<td><code>int</code></td>\n<td>Random integer between 0-100</td>\n<td>91, 72</td>\n</tr>\n<tr>\n<td><code>float</code></td>\n<td>Float number</td>\n<td>1.23232349234948</td>\n</tr>\n<tr>\n<td><code>decimal</code></td>\n<td>Float number with two decimals, commonly use for price etc</td>\n<td>7.21, 3.56</td>\n</tr>\n<tr>\n<td><code>boolean</code></td>\n<td>true or false</td>\n<td>true, false</td>\n</tr>\n<tr>\n<td><code>date</code></td>\n<td>date</td>\n<td>2012-08-06T06:20:52.556Z, 2006-04-09T19:11:31.620Z</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>Random common names</td>\n<td>Kash, Anne</td>\n</tr>\n<tr>\n<td><code>address</code></td>\n<td>A random address</td>\n<td>123 COMMERCIAL DRIVE</td>\n</tr>\n<tr>\n<td><code>us_zip_code</code></td>\n<td>US zip code</td>\n<td>12581, 13419</td>\n</tr>\n<tr>\n<td><code>ca_postal_code</code></td>\n<td>Canadian Porstal Code</td>\n<td>A1A1T7, L4G1X1</td>\n</tr>\n<tr>\n<td><code>us_state</code></td>\n<td>US States</td>\n<td>Alabama, Colorado</td>\n</tr>\n<tr>\n<td><code>ca_province</code></td>\n<td>Canadian Province</td>\n<td>British Columbia, Ontario</td>\n</tr>\n<tr>\n<td><code>color</code></td>\n<td>Color</td>\n<td>green, indigo</td>\n</tr>\n<tr>\n<td><code>job_title</code></td>\n<td>Job title</td>\n<td>Computer Scientist, Electrician</td>\n</tr>\n<tr>\n<td><code>sport_team</code></td>\n<td>Sport Team</td>\n<td>Arsenal, Liverpool</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["api","v1","schema"],"host":["showmethedata","flyingwhalelab","com"],"query":[],"variable":[]}},"response":[{"id":"af1b86ac-b22e-444b-9084-86a6b6436696","name":"Create a schema for a user list","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"mode\" : \"list\",\r\n    \"attributes\" : [\r\n        {\r\n            \"name\" : \"first_name\",\r\n            \"type\": \"name\"\r\n        },{\r\n            \"name\": \"age\",\r\n            \"type\": \"int\"\r\n        },{\r\n            \"name\": \"height\",\r\n            \"type\": \"decimal\"\r\n        },{\r\n            \"name\": \"running_speed\",\r\n            \"type\": \"float\"\r\n        },{\r\n            \"name\": \"isMorningPerson\",\r\n            \"type\": \"boolean\"\r\n        },{\r\n            \"name\": \"address\",\r\n            \"type\": \"address\"\r\n        },{\r\n            \"name\": \"zip_code\",\r\n            \"type\": \"us_zip_code\"\r\n        },{\r\n            \"name\": \"city\",\r\n            \"type\": \"city\"\r\n        },{\r\n            \"name\": \"state\",\r\n            \"type\": \"us_state\"\r\n        },{\r\n            \"name\": \"favourite_moment\",\r\n            \"type\": \"date\"\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"https://showmethedata.flyingwhalelab.com/api/v1/schema"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"schema_key\": \"600a328ed6296900183e2df8\"\n}"},{"id":"fcad1ec6-f9c5-4c53-8dd1-7edb61c52e37","name":"Create a schema for a single user object","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"mode\" : \"single\",\r\n    \"attributes\" : [\r\n        {\r\n            \"name\" : \"first_name\",\r\n            \"type\": \"name\"\r\n        },{\r\n            \"name\": \"age\",\r\n            \"type\": \"int\"\r\n        },{\r\n            \"name\": \"eye_color\",\r\n            \"type\": \"color\"\r\n        },{\r\n            \"name\": \"home_team\",\r\n            \"type\": \"sport_team\"\r\n        },{\r\n            \"name\": \"title\",\r\n            \"type\": \"job_title\"\r\n        },{\r\n            \"name\": \"address\",\r\n            \"type\": \"address\"\r\n        },{\r\n            \"name\": \"postcal_code\",\r\n            \"type\": \"ca_postal_code\"\r\n        },{\r\n            \"name\": \"use_hash_key\",\r\n            \"type\": \"string\"\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"https://showmethedata.flyingwhalelab.com/api/v1/schema"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"schema_key\": \"600cd43963874b001950adfc\"\n}"}],"_postman_id":"fde3db45-26c8-4848-ace2-16fe34a39583"},{"name":"2. Get dummy data in your custom format","event":[{"listen":"test","script":{"id":"49888a75-6cde-40de-92a1-26b507d96dd0","exec":["pm.test(\"Status code is 200\", function(){\r","    pm.response.to.have.status(200);\r","});\r","\r","pm.test(\"Check response has first_name and age fields\", function () {\r","\r","    var jsonData = pm.response.json();\r","    const schema = {\r","        \"type\": \"object\",\r","        \"properties\": {\r","            \"first_name\": { \"type\": \"string\" },\r","            \"age\": { \"type\": \"integer\"}\r","        },\r","        \"required\": [\"first_name\", \"age\"]\r","    };\r","\r","    pm.expect(tv4.validate(jsonData, schema)).to.be.true;\r","});"],"type":"text/javascript"}}],"id":"253eff27-472a-4637-91d1-b90d014dae91","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://showmethedata.flyingwhalelab.com/api/v1/dummydata/60063c48bf30780019020fd9","urlObject":{"protocol":"https","path":["api","v1","dummydata","60063c48bf30780019020fd9"],"host":["showmethedata","flyingwhalelab","com"],"query":[],"variable":[]}},"response":[{"id":"09724504-d8ff-40a4-9a12-cda5f704e6b3","name":"Get a single user","originalRequest":{"method":"GET","header":[],"url":"https://showmethedata.flyingwhalelab.com/api/v1/dummydata/600cd43963874b001950adfc"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"first_name\": \"Carsen\",\n    \"age\": 9,\n    \"eye_color\": \"orange\",\n    \"home_team\": \"Southampton\",\n    \"title\": \"Computer Programmer\",\n    \"address\": \"75 FANNING CRES\",\n    \"postcal_code\": \"L4G1W7\",\n    \"use_hash_key\": \"2r8mshcefjfq8tpfol8qw\"\n}"},{"id":"671f4468-2a37-47e8-8d73-4ae103dddc69","name":"Get a list of users with addresses","originalRequest":{"method":"GET","header":[],"url":"https://showmethedata.flyingwhalelab.com/api/v1/dummydata/600a328ed6296900183e2df8"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    {\n        \"first_name\": \"Sadie\",\n        \"age\": 22,\n        \"height\": \"67.90\",\n        \"running_speed\": 53.39769685815942,\n        \"isMorningPerson\": false,\n        \"address\": \"39 GIRARD RD\",\n        \"zip_code\": \"16262\",\n        \"city\": \"Tucson\",\n        \"state\": \"North Dakota\",\n        \"favourite_moment\": \"2012-02-23T21:04:47.558Z\"\n    },\n    {\n        \"first_name\": \"Lottie\",\n        \"age\": 60,\n        \"height\": \"82.87\",\n        \"running_speed\": 13.923029907768806,\n        \"isMorningPerson\": false,\n        \"address\": \"10 RILEY ST\",\n        \"zip_code\": \"10923\",\n        \"city\": \"Portland\",\n        \"state\": \"South Dakota\",\n        \"favourite_moment\": \"2020-03-08T23:45:50.051Z\"\n    },\n    {\n        \"first_name\": \"Geovanni\",\n        \"age\": 63,\n        \"height\": \"77.80\",\n        \"running_speed\": 81.00744630241374,\n        \"isMorningPerson\": true,\n        \"address\": \"79 GLADEVIEW BLVD\",\n        \"zip_code\": \"17176\",\n        \"city\": \"Raleigh\",\n        \"state\": \"Puerto Rico\",\n        \"favourite_moment\": \"2004-04-10T10:24:25.708Z\"\n    },\n    {\n        \"first_name\": \"Sara\",\n        \"age\": 26,\n        \"height\": \"33.12\",\n        \"running_speed\": 61.27370664705405,\n        \"isMorningPerson\": true,\n        \"address\": \"57 BALTIMORE RD\",\n        \"zip_code\": \"19966\",\n        \"city\": \"Phoenix\",\n        \"state\": \"North Dakota\",\n        \"favourite_moment\": \"2005-01-19T20:07:27.551Z\"\n    },\n    {\n        \"first_name\": \"Lulu\",\n        \"age\": 24,\n        \"height\": \"84.40\",\n        \"running_speed\": 99.33907446994911,\n        \"isMorningPerson\": false,\n        \"address\": \"72 ALCETA CRES\",\n        \"zip_code\": \"13001\",\n        \"city\": \"St. Louis\",\n        \"state\": \"Rhode Island\",\n        \"favourite_moment\": \"2016-09-20T08:48:51.961Z\"\n    },\n    {\n        \"first_name\": \"Kyson\",\n        \"age\": 88,\n        \"height\": \"84.35\",\n        \"running_speed\": 18.894542524529268,\n        \"isMorningPerson\": true,\n        \"address\": \"15 BALHI AVE\",\n        \"zip_code\": \"16367\",\n        \"city\": \"Brooklyn\",\n        \"state\": \"District of Columbia\",\n        \"favourite_moment\": \"2017-04-27T02:00:20.927Z\"\n    },\n    {\n        \"first_name\": \"Deegan\",\n        \"age\": 57,\n        \"height\": \"63.04\",\n        \"running_speed\": 45.827749930070404,\n        \"isMorningPerson\": false,\n        \"address\": \"16 MERRILL CRES\",\n        \"zip_code\": \"13300\",\n        \"city\": \"Kansas City\",\n        \"state\": \"Wisconsin\",\n        \"favourite_moment\": \"2001-08-07T16:54:14.036Z\"\n    },\n    {\n        \"first_name\": \"Nettie\",\n        \"age\": 28,\n        \"height\": \"7.46\",\n        \"running_speed\": 19.093212881794727,\n        \"isMorningPerson\": false,\n        \"address\": \"57 BALMY RD\",\n        \"zip_code\": \"18580\",\n        \"city\": \"Boston\",\n        \"state\": \"Alabama\",\n        \"favourite_moment\": \"2011-12-01T06:04:19.340Z\"\n    },\n    {\n        \"first_name\": \"Geovanni\",\n        \"age\": 0,\n        \"height\": \"93.83\",\n        \"running_speed\": 96.81499742829699,\n        \"isMorningPerson\": true,\n        \"address\": \"52 ASHTON BLVD\",\n        \"zip_code\": \"12740\",\n        \"city\": \"Denver\",\n        \"state\": \"Alabama\",\n        \"favourite_moment\": \"2005-04-21T08:33:43.803Z\"\n    },\n    {\n        \"first_name\": \"Etta\",\n        \"age\": 90,\n        \"height\": \"73.76\",\n        \"running_speed\": 88.35487335724963,\n        \"isMorningPerson\": false,\n        \"address\": \"96 RINCO,N ST\",\n        \"zip_code\": \"12473\",\n        \"city\": \"Hartford\",\n        \"state\": \"Georgia\",\n        \"favourite_moment\": \"2006-02-18T05:11:02.360Z\"\n    }\n]"},{"id":"d2f20e8c-fa4c-4c98-8c80-127f919f8b9e","name":"Get average monthly price of eggs","originalRequest":{"method":"GET","header":[],"url":"https://showmethedata.flyingwhalelab.com/api/v1/dummydata/600a3c8663874b001950adf8"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"Jan\": \"88.84\",\n    \"Feb\": \"92.70\",\n    \"Mar\": \"49.78\",\n    \"Apr\": \"7.16\",\n    \"May\": \"36.32\",\n    \"Jun\": \"34.77\",\n    \"Jul\": \"21.57\",\n    \"Aug\": \"15.58\",\n    \"Sep\": \"51.23\",\n    \"Oct\": \"47.27\",\n    \"Nov\": \"71.50\",\n    \"Dec\": \"6.17\"\n}"}],"_postman_id":"253eff27-472a-4637-91d1-b90d014dae91"},{"name":"View schema definition","event":[{"listen":"test","script":{"id":"671aa359-e22c-41f9-b588-2a30b4299a2b","exec":["pm.test(\"Status code is 200\", function(){\r","    pm.response.to.have.status(200);\r","});\r","\r","pm.test(\"Check response has mode and schema fields\", function () {\r","\r","    var jsonData = pm.response.json();\r","    const schema = {\r","        \"type\": \"object\",\r","        \"properties\": {\r","            \"mode\": { \"type\": \"string\" },\r","            \"schema\": { \"type\": \"array\"}\r","        },\r","        \"required\": [\"mode\", \"schema\"]\r","    };\r","\r","    pm.expect(tv4.validate(jsonData, schema)).to.be.true;\r","});\r","\r","pm.test(\"Response `mode` is `single`\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData.mode).to.eql(\"single\");\r","});"],"type":"text/javascript"}}],"id":"3589dbe7-b91b-456b-b522-8c944cfbd5bc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://showmethedata.flyingwhalelab.com/api/v1/schema/60063c48bf30780019020fd9","urlObject":{"protocol":"https","path":["api","v1","schema","60063c48bf30780019020fd9"],"host":["showmethedata","flyingwhalelab","com"],"query":[],"variable":[]}},"response":[{"id":"30d5cb5f-6926-4c9d-9d27-9f258fab6eaf","name":"View the monthly price schema definition","originalRequest":{"method":"GET","header":[],"url":"https://showmethedata.flyingwhalelab.com/api/v1/schema/600a3c8663874b001950adf8"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"mode\": \"single\",\n    \"schema\": [\n        {\n            \"name\": \"Jan\",\n            \"type\": \"decimal\"\n        },\n        {\n            \"name\": \"Feb\",\n            \"type\": \"decimal\"\n        },\n        {\n            \"name\": \"Mar\",\n            \"type\": \"decimal\"\n        },\n        {\n            \"name\": \"Apr\",\n            \"type\": \"decimal\"\n        },\n        {\n            \"name\": \"May\",\n            \"type\": \"decimal\"\n        },\n        {\n            \"name\": \"Jun\",\n            \"type\": \"decimal\"\n        },\n        {\n            \"name\": \"Jul\",\n            \"type\": \"decimal\"\n        },\n        {\n            \"name\": \"Aug\",\n            \"type\": \"decimal\"\n        },\n        {\n            \"name\": \"Sep\",\n            \"type\": \"decimal\"\n        },\n        {\n            \"name\": \"Oct\",\n            \"type\": \"decimal\"\n        },\n        {\n            \"name\": \"Nov\",\n            \"type\": \"decimal\"\n        },\n        {\n            \"name\": \"Dec\",\n            \"type\": \"decimal\"\n        }\n    ]\n}"}],"_postman_id":"3589dbe7-b91b-456b-b522-8c944cfbd5bc"}]}