Metering Cloud
Periodic Usage Reports

Validate job and query

1min
code examples curl location 'https //app amberflo io/job/check' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "jobname" "", "s3url" "", "format" "csv", "range" "ago(2d)", "aggregationbucket" "hour" }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "jobname" "", "s3url" "", "format" "csv", "range" "ago(2d)", "aggregationbucket" "hour" }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //app amberflo io/job/check", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //app amberflo io/job/check") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "jobname" "", "s3url" "", "format" "csv", "range" "ago(2d)", "aggregationbucket" "hour" }) response = https request(request) puts response read body import requests import json url = "https //app amberflo io/job/check" payload = json dumps({ "jobname" "", "s3url" "", "format" "csv", "range" "ago(2d)", "aggregationbucket" "hour" }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // successful response { "job" { "jobname" "", "description" "", "enabled" false, "email" "", "cron" "", "s3url" "", "format" "", "range" "", "endtimeoffset" "", "scheduledtimeinseconds" 0, "aggregationbucket" "", "meterapinames" \[ "" ], "filter" "", "groupby" \[ "" ], "sparse" false, "minimizefresh" "", "rescalefunction" { "coefficient" 0, "function" "" } }, "query" \[ { "aggregation" "", "meterapiname" "", "timegroupinginterval" "", "valuestimegroupinginterval" "", "timerange" { "starttimeinseconds" 0, "endtimeinseconds" 0 }, "groupby" \[ "" ], "take" { "limit" 0, "isascending" "" }, "filter" "", "rescalefunction" { "coefficient" 0, "function" "" } } ] }