This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Assumes that you have both request and request-promised installed. | |
| // Tested on node.js v7.5.0 | |
| const rp = require('request-promise'); | |
| const opts = { | |
| uri: 'https://api.cclantency.com/stream', | |
| method: 'POST', | |
| headers: { | |
| 'CC-LATENCY-API-KEY': '<Your private API Key>' | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // All fields are mandatory. | |
| // - The list of valid sources can be pulled from https://api.cclatency.com/sources | |
| // - Target must either by a valid FQDN or IPv4 address | |
| // - Interval must be a number >= 250 (it's interpreted in milliseconds) | |
| // - The only valid packetType at the moment is ping | |
| { | |
| "source": <string>, | |
| "target": <string>, | |
| "interval": <number>, | |
| "packetType": <string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Tested with curl 7.47.0 (x86_64-pc-linux-gnu) | |
| curl -H "CC-LATENCY-API-KEY: 985668cf-cfa0-49e9-b087-83f1743fe5c7" \ | |
| https://api.cclatency.com/stream/fdb23edb4a2aeb7a6da840ac84a3cf5c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Assumes that you have requests installed | |
| # Tested on python 2.7.12 | |
| import requests | |
| req = requests.request( | |
| 'GET', | |
| 'https://api.cclatency.com/stream/fdb23edb4a2aeb7a6da840ac84a3cf5c', | |
| headers = { | |
| 'CC-LATENCY-API-KEY': '985668cf-cfa0-49e9-b087-83f1743fe5c7' | |
| }) | |
| print(req.json()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Assumes that you have both request and request-promised installed. | |
| // Tested on node.js v7.5.0 | |
| const rp = require('request-promise'); | |
| const opts = { | |
| uri: 'https://api.cclatency.com/stream/fdb23edb4a2aeb7a6da840ac84a3cf5c', | |
| headers: { | |
| 'CC-LATENCY-API-KEY': '985668cf-cfa0-49e9-b087-83f1743fe5c7' | |
| } | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Tested with curl 7.47.0 (x86_64-pc-linux-gnu) | |
| curl -H "CC-LATENCY-API-KEY: 985668cf-cfa0-49e9-b087-83f1743fe5c7" \ | |
| https://api.cclatency.com/stream |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Assumes that you have requests installed | |
| # Tested on python 2.7.12 | |
| import requests | |
| req = requests.request( | |
| 'GET', | |
| 'https://api.cclatency.com/stream', | |
| headers = { | |
| 'CC-LATENCY-API-KEY': '985668cf-cfa0-49e9-b087-83f1743fe5c7' | |
| }) | |
| print(req.json()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Assumes that you have both request and request-promised installed. | |
| // Tested on node.js v7.5.0 | |
| const rp = require('request-promise'); | |
| const opts = { | |
| uri: 'https://api.cclatency.com/stream', | |
| headers: { | |
| 'CC-LATENCY-API-KEY': '985668cf-cfa0-49e9-b087-83f1743fe5c7' | |
| } | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "status": "success", | |
| "description": "", | |
| "data": { | |
| "source": "GCP::asia-northeast1-a", | |
| "target": "GCP::europe-west1-b", | |
| "latency": 229.1, | |
| "timestamp": "2017-07-03T00:00:41Z" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "status": "success", | |
| "description": "Registered to stream with key f2afa502b8c08ac87748527f022303a5", | |
| "data": [] | |
| } |