-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi-spec.json
1 lines (1 loc) · 13.3 KB
/
api-spec.json
1
{"openapi":"3.0.3","info":{"title":"Bitping API Documentation","version":"1.0.0"},"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer"},"ApiKeyAuth":{"type":"apiKey","name":"x-api-key","in":"header"}},"schemas":{}},"paths":{"/jobs/customer/dns":{"post":{"operationId":"performDns","tags":["jobs","dns"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"node_id":{"type":"string"},"hostnames":{"type":"array","items":{"type":"string"}},"countryCode":{"maxLength":2,"minLength":2,"type":"string"},"continentCode":{"maxLength":2,"minLength":2,"type":"string"},"city":{"type":"string"},"ispRegex":{"type":"string"},"mobile":{"default":"ALLOWED","pattern":"ALLOWED|DENIED|REQUIRED","type":"string"},"proxy":{"default":"ALLOWED","pattern":"ALLOWED|DENIED|REQUIRED","type":"string"},"residential":{"default":"ALLOWED","pattern":"ALLOWED|DENIED|REQUIRED","type":"string"},"configuration":{"type":"object","properties":{"dnsServers":{"type":"array","items":{"type":"string"}},"lookupTypes":{"type":"array","items":{"pattern":"MX|NS|IP|TXT|SOA|SRV|TLSA","type":"string"}}}}},"required":["hostnames"]}}},"required":true},"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"nodeInfo":{"type":"object","properties":{"operatingSystem":{"type":"string"},"isp":{"type":"string"},"mobile":{"type":"boolean"},"proxy":{"type":"boolean"},"residential":{"type":"boolean"},"regionName":{"type":"string"},"countryCode":{"type":"string"},"continentCode":{"type":"string"},"city":{"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"}},"required":["operatingSystem","isp","mobile","proxy","residential","regionName","countryCode","continentCode","city","lat","lon"]},"results":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"string"},"duration":{"type":"number"},"error":{"type":"string"},"result":{"type":"object","properties":{"mx":{"type":"array","items":{"type":"string"}},"ns":{"type":"array","items":{"type":"string"}},"ips":{"type":"array","items":{"type":"string"}},"txt":{"type":"array","items":{"type":"string"}},"soa":{"type":"array","items":{"type":"string"}},"srv":{"type":"array","items":{"type":"string"}},"tlsa":{"type":"array","items":{"type":"string"}},"dnsServers":{"type":"array","items":{"type":"string"}}},"required":["mx","ns","ips","txt","soa","srv","tlsa","dnsServers"]}},"required":["endpoint"]}}},"required":["results"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/jobs/customer/http/{method}":{"post":{"operationId":"performHttp","tags":["jobs","http"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"node_id":{"type":"string"},"hostnames":{"type":"array","items":{"type":"string"}},"countryCode":{"maxLength":2,"minLength":2,"type":"string"},"continentCode":{"maxLength":2,"minLength":2,"type":"string"},"city":{"type":"string"},"ispRegex":{"type":"string"},"mobile":{"default":"ALLOWED","pattern":"ALLOWED|DENIED|REQUIRED","type":"string"},"proxy":{"default":"ALLOWED","pattern":"ALLOWED|DENIED|REQUIRED","type":"string"},"residential":{"default":"ALLOWED","pattern":"ALLOWED|DENIED|REQUIRED","type":"string"},"configuration":{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string"}},"regex":{"type":"string"},"statusCodes":{"type":"array","items":{"type":"number"}},"body":{"type":"string"},"returnBody":{"type":"boolean"}}}},"required":["hostnames"]}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"method","required":true}],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"nodeInfo":{"type":"object","properties":{"operatingSystem":{"type":"string"},"isp":{"type":"string"},"mobile":{"type":"boolean"},"proxy":{"type":"boolean"},"residential":{"type":"boolean"},"regionName":{"type":"string"},"countryCode":{"type":"string"},"continentCode":{"type":"string"},"city":{"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"}},"required":["operatingSystem","isp","mobile","proxy","residential","regionName","countryCode","continentCode","city","lat","lon"]},"results":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"string"},"duration":{"type":"number"},"error":{"type":"string"},"result":{"type":"object","properties":{"statusCode":{"type":"number"},"bodyHash":{"type":"string"},"matches":{"type":"array","items":{"type":"string"}},"headers":{"type":"object","additionalProperties":{"type":"string"}},"body":{"type":"string"}},"required":["statusCode","bodyHash","matches","headers"]}},"required":["endpoint"]}}},"required":["results"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/jobs/customer/ping/icmp":{"post":{"operationId":"performIcmp","tags":["jobs","icmp"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"node_id":{"type":"string"},"hostnames":{"type":"array","items":{"type":"string"}},"countryCode":{"maxLength":2,"minLength":2,"type":"string"},"continentCode":{"maxLength":2,"minLength":2,"type":"string"},"city":{"type":"string"},"ispRegex":{"type":"string"},"mobile":{"default":"ALLOWED","pattern":"ALLOWED|DENIED|REQUIRED","type":"string"},"proxy":{"default":"ALLOWED","pattern":"ALLOWED|DENIED|REQUIRED","type":"string"},"residential":{"default":"ALLOWED","pattern":"ALLOWED|DENIED|REQUIRED","type":"string"},"configuration":{"type":"object","properties":{"attempts":{"type":"number"},"payloadSize":{"type":"number"},"timeoutMillis":{"type":"number"}}}},"required":["hostnames"]}}},"required":true},"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"nodeInfo":{"type":"object","properties":{"operatingSystem":{"type":"string"},"isp":{"type":"string"},"mobile":{"type":"boolean"},"proxy":{"type":"boolean"},"residential":{"type":"boolean"},"regionName":{"type":"string"},"countryCode":{"type":"string"},"continentCode":{"type":"string"},"city":{"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"}},"required":["operatingSystem","isp","mobile","proxy","residential","regionName","countryCode","continentCode","city","lat","lon"]},"results":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"string"},"duration":{"type":"number"},"error":{"type":"string"},"result":{"type":"object","properties":{"avg":{"type":"number"},"max":{"type":"number"},"min":{"type":"number"},"stdDev":{"type":"number"},"ipAddress":{"type":"string"},"packetLoss":{"type":"number"},"packetsRecv":{"type":"number"},"packetsSent":{"type":"number"},"trips":{"type":"number"},"attempts":{"type":"number"}},"required":["avg","max","min","stdDev","ipAddress","packetLoss","packetsRecv","packetsSent","trips","attempts"]}},"required":["endpoint"]}}},"required":["results"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}},"/jobs/customer/hls":{"post":{"operationId":"performHls","tags":["jobs","hls"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"node_id":{"type":"string"},"hostnames":{"type":"array","items":{"type":"string"}},"countryCode":{"maxLength":2,"minLength":2,"type":"string"},"continentCode":{"maxLength":2,"minLength":2,"type":"string"},"city":{"type":"string"},"ispRegex":{"type":"string"},"mobile":{"default":"ALLOWED","pattern":"ALLOWED|DENIED|REQUIRED","type":"string"},"proxy":{"default":"ALLOWED","pattern":"ALLOWED|DENIED|REQUIRED","type":"string"},"residential":{"default":"ALLOWED","pattern":"ALLOWED|DENIED|REQUIRED","type":"string"},"configuration":{"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string"}}}}},"required":["hostnames"]}}},"required":true},"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"nodeInfo":{"type":"object","properties":{"operatingSystem":{"type":"string"},"isp":{"type":"string"},"mobile":{"type":"boolean"},"proxy":{"type":"boolean"},"residential":{"type":"boolean"},"regionName":{"type":"string"},"countryCode":{"type":"string"},"continentCode":{"type":"string"},"city":{"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"}},"required":["operatingSystem","isp","mobile","proxy","residential","regionName","countryCode","continentCode","city","lat","lon"]},"results":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"string"},"duration":{"type":"number"},"error":{"type":"string"},"result":{"type":"object","properties":{"master":{"type":"object","properties":{"file":{"type":"string"},"downloadMetrics":{"type":"object","properties":{"size":{"type":"number"},"timeMs":{"type":"number"},"bytesPerSecond":{"type":"number"}},"required":["size","timeMs","bytesPerSecond"]},"metrics":{"type":"object","properties":{"dnsResolveDurationMs":{"type":"number"},"tcpConnectDurationMs":{"type":"number"},"tlsHandshakeDurationMs":{"type":"number"},"httpGetSendDurationMs":{"type":"number"},"httpTtfbDurationMs":{"type":"number"}},"required":["tcpConnectDurationMs","httpGetSendDurationMs","httpTtfbDurationMs"]},"renditions":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string"},"downloadMetrics":{"type":"object","properties":{"size":{"type":"number"},"timeMs":{"type":"number"},"bytesPerSecond":{"type":"number"}},"required":["size","timeMs","bytesPerSecond"]},"metrics":{"type":"object","properties":{"dnsResolveDurationMs":{"type":"number"},"tcpConnectDurationMs":{"type":"number"},"tlsHandshakeDurationMs":{"type":"number"},"httpGetSendDurationMs":{"type":"number"},"httpTtfbDurationMs":{"type":"number"}},"required":["tcpConnectDurationMs","httpGetSendDurationMs","httpTtfbDurationMs"]},"contentFragmentMetrics":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string"},"contentFragmentDurationSecs":{"type":"number"},"metrics":{"type":"object","properties":{"dnsResolveDurationMs":{"type":"number"},"tcpConnectDurationMs":{"type":"number"},"tlsHandshakeDurationMs":{"type":"number"},"httpGetSendDurationMs":{"type":"number"},"httpTtfbDurationMs":{"type":"number"}},"required":["tcpConnectDurationMs","httpGetSendDurationMs","httpTtfbDurationMs"]},"downloadMetrics":{"type":"object","properties":{"size":{"type":"number"},"timeMs":{"type":"number"},"bytesPerSecond":{"type":"number"}},"required":["size","timeMs","bytesPerSecond"]},"downloadRatio":{"type":"number"}},"required":["file","contentFragmentDurationSecs","downloadRatio"]}},"targetDurationSecs":{"type":"number"},"discontinuitySequence":{"type":"number"},"resolution":{"type":"string"},"bandwidth":{"type":"number"}},"required":["file","contentFragmentMetrics","targetDurationSecs","discontinuitySequence","resolution","bandwidth"]}}},"required":["file","renditions"]},"rendition":{"type":"object","properties":{"file":{"type":"string"},"downloadMetrics":{"type":"object","properties":{"size":{"type":"number"},"timeMs":{"type":"number"},"bytesPerSecond":{"type":"number"}},"required":["size","timeMs","bytesPerSecond"]},"metrics":{"type":"object","properties":{"dnsResolveDurationMs":{"type":"number"},"tcpConnectDurationMs":{"type":"number"},"tlsHandshakeDurationMs":{"type":"number"},"httpGetSendDurationMs":{"type":"number"},"httpTtfbDurationMs":{"type":"number"}},"required":["tcpConnectDurationMs","httpGetSendDurationMs","httpTtfbDurationMs"]},"contentFragmentMetrics":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string"},"contentFragmentDurationSecs":{"type":"number"},"metrics":{"type":"object","properties":{"dnsResolveDurationMs":{"type":"number"},"tcpConnectDurationMs":{"type":"number"},"tlsHandshakeDurationMs":{"type":"number"},"httpGetSendDurationMs":{"type":"number"},"httpTtfbDurationMs":{"type":"number"}},"required":["tcpConnectDurationMs","httpGetSendDurationMs","httpTtfbDurationMs"]},"downloadMetrics":{"type":"object","properties":{"size":{"type":"number"},"timeMs":{"type":"number"},"bytesPerSecond":{"type":"number"}},"required":["size","timeMs","bytesPerSecond"]},"downloadRatio":{"type":"number"}},"required":["file","contentFragmentDurationSecs","downloadRatio"]}},"targetDurationSecs":{"type":"number"},"discontinuitySequence":{"type":"number"},"resolution":{"type":"string"},"bandwidth":{"type":"number"}},"required":["file","contentFragmentMetrics","targetDurationSecs","discontinuitySequence","resolution","bandwidth"]}}}},"required":["endpoint"]}}},"required":["results"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","error","message"]}}}}}}}},"servers":[{"url":"https://api.bitping.com/v2","description":"Bitping Production API"}]}