{"__v":2,"_id":"562916310f90450d0061b0fa","category":{"__v":0,"_id":"56394f791593e4190073a44b","pages":[],"project":"5553d36165e8260d0024419a","version":"55fc9b793c21291900e7e0d7","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-11-04T00:21:13.911Z","from_sync":false,"order":15,"slug":"api-api-call-statistics","title":"API: API Call Statistics"},"parentDoc":null,"project":"5553d36165e8260d0024419a","user":"5553d33065e8260d00244199","version":{"__v":12,"_id":"55fc9b793c21291900e7e0d7","project":"5553d36165e8260d0024419a","createdAt":"2015-09-18T23:17:13.545Z","releaseDate":"2015-09-18T23:17:13.545Z","categories":["55fc9b7a3c21291900e7e0d8","55fc9b7a3c21291900e7e0d9","55fc9b7a3c21291900e7e0da","55fc9b7a3c21291900e7e0db","55fc9b7a3c21291900e7e0dc","55fc9b7a3c21291900e7e0dd","55fc9b7a3c21291900e7e0de","55fc9b7a3c21291900e7e0df","55fc9b7a3c21291900e7e0e0","55fc9b7a3c21291900e7e0e1","55fc9b7a3c21291900e7e0e2","55fc9b7a3c21291900e7e0e3","55fc9bad4c80910d00b9bece","56394a0c3539050d00082122","56394a2f68b11f0d0048c9ff","56394a462fc5520d001a4db3","56394a4c2fc5520d001a4db4","56394a5b049e420d00476b5c","56394a6a2fc5520d001a4db5","56394f791593e4190073a44b","567b3adfb56bac0d0019d8d9","569d590e5a2b060d008741eb","569ea93dffccd10d00a05c7f"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-10-22T17:00:33.441Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Statistics are generated each time an API Call is made. Statistics are generated per call per location. Aggregated statistics are also generated for the hour, day, week, month and year (all based upon UTC).\nExample:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"meta\\\": {\\n    \\\"kind\\\": \\\"MONTH\\\", \\n    \\\"call_id\\\": \\\"agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDDxwgM\\\", \\n    \\\"type\\\": \\\"ALL\\\", \\n    \\\"time\\\": \\\"2015-10-01T00:00:00Z\\\", \\n    \\\"location_id\\\": \\\"\\\", \\n    \\\"name\\\": \\\"API test name\\\"\\n  }, \\n  \\\"stat\\\": {\\n    \\\"avg_latency\\\": 383.5, \\n    \\\"max_latency\\\": 749, \\n    \\\"time\\\": \\\"2015-10-01T00:00:00Z\\\", \\n    \\\"count\\\": 20\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nData available for all results:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"time\",\n    \"0-1\": \"Datetime\",\n    \"0-2\": \"Normalized time for the period you requested.\",\n    \"1-0\": \"count\",\n    \"1-1\": \"Integer\",\n    \"1-2\": \"Number of API calls made in period.\",\n    \"2-0\": \"max_latency\",\n    \"2-1\": \"Integer\",\n    \"2-2\": \"Slowest API Call made in period, in ms.\",\n    \"3-0\": \"avg_latency\",\n    \"3-1\": \"Float\",\n    \"3-2\": \"Average latency for the API Calls for the period specified.\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\nExtra data available for results that passed (i.e., when type is set to COMPLETE).\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"time\",\n    \"0-1\": \"Datetime\",\n    \"0-2\": \"Normalized time for the period you requested.\",\n    \"1-0\": \"count\",\n    \"1-1\": \"Integer\",\n    \"1-2\": \"Number of API calls made in period.\",\n    \"2-0\": \"max_latency\",\n    \"2-1\": \"Integer\",\n    \"2-2\": \"Slowest API Call made in period, in ms.\",\n    \"3-0\": \"min_latency\",\n    \"3-1\": \"Integer\",\n    \"3-2\": \"Fastest API Call made in period, in ms.\",\n    \"4-0\": \"avg_latency\",\n    \"4-1\": \"Float\",\n    \"4-2\": \"Average latency for the API Calls for the period specified.\",\n    \"5-0\": \"standard_deviation\",\n    \"5-1\": \"Float\",\n    \"5-2\": \"Standard deviation of API Call latencies for the period.\",\n    \"6-0\": \"skewness\",\n    \"6-1\": \"Float\",\n    \"6-2\": \"Skewness of API Call latencies for the period.\"\n  },\n  \"cols\": 3,\n  \"rows\": 7\n}\n[/block]\nData available when requesting raw data, i.e. kind = RAW.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"time\",\n    \"0-1\": \"Datetime\",\n    \"0-2\": \"Time that the API Call was made.\",\n    \"1-0\": \"latency\",\n    \"1-1\": \"Integer\",\n    \"1-2\": \"Length of time, in ms, that the API Call took to make.\",\n    \"2-0\": \"http_code\",\n    \"2-1\": \"Integer\",\n    \"2-2\": \"HTTP response code returned.\",\n    \"3-0\": \"content_length\",\n    \"3-1\": \"Integer\",\n    \"3-2\": \"Size, in bytes, of the response.\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]","excerpt":"","slug":"stat-object","type":"basic","title":"Stat object"}
Statistics are generated each time an API Call is made. Statistics are generated per call per location. Aggregated statistics are also generated for the hour, day, week, month and year (all based upon UTC). Example: [block:code] { "codes": [ { "code": "{\n \"meta\": {\n \"kind\": \"MONTH\", \n \"call_id\": \"agxkZXZ-dmlhdGVzdHNyFwsSClRlc3RTZXR1cDIYgICAgKDDxwgM\", \n \"type\": \"ALL\", \n \"time\": \"2015-10-01T00:00:00Z\", \n \"location_id\": \"\", \n \"name\": \"API test name\"\n }, \n \"stat\": {\n \"avg_latency\": 383.5, \n \"max_latency\": 749, \n \"time\": \"2015-10-01T00:00:00Z\", \n \"count\": 20\n }\n}", "language": "json" } ] } [/block] Data available for all results: [block:parameters] { "data": { "h-0": "Name", "h-1": "Type", "h-2": "Description", "0-0": "time", "0-1": "Datetime", "0-2": "Normalized time for the period you requested.", "1-0": "count", "1-1": "Integer", "1-2": "Number of API calls made in period.", "2-0": "max_latency", "2-1": "Integer", "2-2": "Slowest API Call made in period, in ms.", "3-0": "avg_latency", "3-1": "Float", "3-2": "Average latency for the API Calls for the period specified." }, "cols": 3, "rows": 4 } [/block] Extra data available for results that passed (i.e., when type is set to COMPLETE). [block:parameters] { "data": { "h-0": "Name", "h-1": "Type", "h-2": "Description", "0-0": "time", "0-1": "Datetime", "0-2": "Normalized time for the period you requested.", "1-0": "count", "1-1": "Integer", "1-2": "Number of API calls made in period.", "2-0": "max_latency", "2-1": "Integer", "2-2": "Slowest API Call made in period, in ms.", "3-0": "min_latency", "3-1": "Integer", "3-2": "Fastest API Call made in period, in ms.", "4-0": "avg_latency", "4-1": "Float", "4-2": "Average latency for the API Calls for the period specified.", "5-0": "standard_deviation", "5-1": "Float", "5-2": "Standard deviation of API Call latencies for the period.", "6-0": "skewness", "6-1": "Float", "6-2": "Skewness of API Call latencies for the period." }, "cols": 3, "rows": 7 } [/block] Data available when requesting raw data, i.e. kind = RAW. [block:parameters] { "data": { "h-0": "Name", "h-1": "Type", "h-2": "Description", "0-0": "time", "0-1": "Datetime", "0-2": "Time that the API Call was made.", "1-0": "latency", "1-1": "Integer", "1-2": "Length of time, in ms, that the API Call took to make.", "2-0": "http_code", "2-1": "Integer", "2-2": "HTTP response code returned.", "3-0": "content_length", "3-1": "Integer", "3-2": "Size, in bytes, of the response." }, "cols": 3, "rows": 4 } [/block]