{"_id":"57fcc4870312b20e00ac6509","parentDoc":null,"project":"5435687035740020002a1c04","__v":0,"category":{"_id":"57fcc4860312b20e00ac64cb","__v":0,"version":"57fcc4860312b20e00ac64c0","project":"5435687035740020002a1c04","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-24T21:45:44.150Z","from_sync":false,"order":10,"slug":"api-methods","title":"API Methods"},"user":"5435682035740020002a1c01","version":{"_id":"57fcc4860312b20e00ac64c0","project":"5435687035740020002a1c04","__v":1,"createdAt":"2016-10-11T10:52:54.637Z","releaseDate":"2016-10-11T10:52:54.637Z","categories":["57fcc4860312b20e00ac64c1","57fcc4860312b20e00ac64c2","57fcc4860312b20e00ac64c3","57fcc4860312b20e00ac64c4","57fcc4860312b20e00ac64c5","57fcc4860312b20e00ac64c6","57fcc4860312b20e00ac64c7","57fcc4860312b20e00ac64c8","57fcc4860312b20e00ac64c9","57fcc4860312b20e00ac64ca","57fcc4860312b20e00ac64cb"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"[APP-1265], [APP-1035]","version_clean":"5.2.0","version":"5.2"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-02-02T18:58:42.595Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"never","params":[],"url":""},"isReference":false,"order":16,"body":"## Flow Tags\n\nFlows are represented by tags, a unique string you use to identify a particular flow from another. You use the API and write to the tags to specify which flow you want to update. \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Sending\"\n}\n[/block]\n## Single Flow Update\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"POST https://api.telemetrytv.com/flows/:tag/metrics\",\n  \"body\": \"Allows you to post data for an individual flow.\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Required\",\n    \"h-2\": \"Type\",\n    \"h-3\": \"Description\",\n    \"0-3\": \"The tag for the flow\",\n    \"0-2\": \"string\",\n    \"0-1\": \"**Required**\",\n    \"0-0\": \"tag\",\n    \"1-0\": \"<flow structure>\",\n    \"1-1\": \"**Required**\",\n    \"1-2\": \"various\",\n    \"1-3\": \"See the documentation for a particular flow.\"\n  },\n  \"cols\": 4,\n  \"rows\": 2\n}\n[/block]\n## Batch Flow Update\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"POST https://api.telemetrytv.com/metrics\",\n  \"body\": \"Allows you to send a batch updating multiple flows with one call. If you're sending a lot of updates, this is an efficient method to preserve your API request limits.\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Required\",\n    \"h-2\": \"Type\",\n    \"h-3\": \"Description\",\n    \"0-0\": \"metrics\",\n    \"0-1\": \"Required\",\n    \"0-2\": \"hash\",\n    \"0-3\": \"A hash containing individual flow updates with the keys being flow tags and the values being the update for that specific flow.\\n\\nSee the documentation for specific parameters based on widget variants.\"\n  },\n  \"cols\": 4,\n  \"rows\": 1\n}\n[/block]\n## Batch Flow Channel Update\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"POST https://api.telemetrytv.com/channels/:virtual_channel_id/metrics\",\n  \"body\": \"Allows you to send batch metrics for specific channel updating multiple flows with one call. If you're sending a lot of updates this is an efficient method to preserve your API request limits.\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"virtual_channel_id\",\n    \"0-1\": \"**Required**\",\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Required\",\n    \"h-2\": \"Type\",\n    \"h-3\": \"Description\",\n    \"0-2\": \"string\",\n    \"0-3\": \"The id of the virtual channel.\",\n    \"1-0\": \"metrics\",\n    \"1-1\": \"**Required**\",\n    \"1-2\": \"hash\",\n    \"1-3\": \"A hash containing individual flow updates with the keys being flow tags and the values being the update for that specific flow.\\n\\nSee the documentation for specific parameters based on widget variants.\"\n  },\n  \"cols\": 4,\n  \"rows\": 2\n}\n[/block]\n## Single Flow Channel Update\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"POST https://api.telemetrytv.com/channels/:virtual_channel_id/flows/:tag/metrics\",\n  \"body\": \"Allows you to send metrics to a specific channel's flow as defined by the channel_tag and the tag for the flow.\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Required\",\n    \"h-2\": \"Type\",\n    \"h-3\": \"Description\",\n    \"0-0\": \"virtual_channel_id\",\n    \"0-1\": \"**Required**\",\n    \"0-2\": \"string\",\n    \"0-3\": \"The id of the virtual channel.\",\n    \"1-0\": \"tag\",\n    \"1-1\": \"**Required**\",\n    \"1-2\": \"string\",\n    \"1-3\": \"The tag of the flow.\",\n    \"2-0\": \"<flow structure>\",\n    \"2-1\": \"**Required**\",\n    \"2-2\": \"various\",\n    \"2-3\": \"See the documentation for a particular flow.\"\n  },\n  \"cols\": 4,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Deleting\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"DELETE https://api.telemetrytv.com/flows/:tag/metrics\",\n  \"body\": \"Allows you to clear the metrics of a specific flow.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Retrieving\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"GET https://api.telemetrytv.com/flows/:tag/metrics\",\n  \"body\": \"Returns the current metrics for the specified flow.\"\n}\n[/block]","excerpt":"Metrics are the data that is sent to a specific flow. Metrics may also be attached to a specific channel for sending metrics to virtualized channels or affiliates.","slug":"metrics","type":"basic","title":"Metrics"}

Metrics

Metrics are the data that is sent to a specific flow. Metrics may also be attached to a specific channel for sending metrics to virtualized channels or affiliates.

## Flow Tags Flows are represented by tags, a unique string you use to identify a particular flow from another. You use the API and write to the tags to specify which flow you want to update. [block:api-header] { "type": "basic", "title": "Sending" } [/block] ## Single Flow Update [block:callout] { "type": "success", "title": "POST https://api.telemetrytv.com/flows/:tag/metrics", "body": "Allows you to post data for an individual flow." } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Required", "h-2": "Type", "h-3": "Description", "0-3": "The tag for the flow", "0-2": "string", "0-1": "**Required**", "0-0": "tag", "1-0": "<flow structure>", "1-1": "**Required**", "1-2": "various", "1-3": "See the documentation for a particular flow." }, "cols": 4, "rows": 2 } [/block] ## Batch Flow Update [block:callout] { "type": "success", "title": "POST https://api.telemetrytv.com/metrics", "body": "Allows you to send a batch updating multiple flows with one call. If you're sending a lot of updates, this is an efficient method to preserve your API request limits." } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Required", "h-2": "Type", "h-3": "Description", "0-0": "metrics", "0-1": "Required", "0-2": "hash", "0-3": "A hash containing individual flow updates with the keys being flow tags and the values being the update for that specific flow.\n\nSee the documentation for specific parameters based on widget variants." }, "cols": 4, "rows": 1 } [/block] ## Batch Flow Channel Update [block:callout] { "type": "success", "title": "POST https://api.telemetrytv.com/channels/:virtual_channel_id/metrics", "body": "Allows you to send batch metrics for specific channel updating multiple flows with one call. If you're sending a lot of updates this is an efficient method to preserve your API request limits." } [/block] [block:parameters] { "data": { "0-0": "virtual_channel_id", "0-1": "**Required**", "h-0": "Parameter", "h-1": "Required", "h-2": "Type", "h-3": "Description", "0-2": "string", "0-3": "The id of the virtual channel.", "1-0": "metrics", "1-1": "**Required**", "1-2": "hash", "1-3": "A hash containing individual flow updates with the keys being flow tags and the values being the update for that specific flow.\n\nSee the documentation for specific parameters based on widget variants." }, "cols": 4, "rows": 2 } [/block] ## Single Flow Channel Update [block:callout] { "type": "success", "title": "POST https://api.telemetrytv.com/channels/:virtual_channel_id/flows/:tag/metrics", "body": "Allows you to send metrics to a specific channel's flow as defined by the channel_tag and the tag for the flow." } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Required", "h-2": "Type", "h-3": "Description", "0-0": "virtual_channel_id", "0-1": "**Required**", "0-2": "string", "0-3": "The id of the virtual channel.", "1-0": "tag", "1-1": "**Required**", "1-2": "string", "1-3": "The tag of the flow.", "2-0": "<flow structure>", "2-1": "**Required**", "2-2": "various", "2-3": "See the documentation for a particular flow." }, "cols": 4, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Deleting" } [/block] [block:callout] { "type": "danger", "title": "DELETE https://api.telemetrytv.com/flows/:tag/metrics", "body": "Allows you to clear the metrics of a specific flow." } [/block] [block:api-header] { "type": "basic", "title": "Retrieving" } [/block] [block:callout] { "type": "success", "title": "GET https://api.telemetrytv.com/flows/:tag/metrics", "body": "Returns the current metrics for the specified flow." } [/block]