Impressions

4 minute readReference

Every time a flag is evaluated, that evaluation is counted as an impression.

CloudBees Feature Management dashboard impressions

  • SDKs 4.x - Impression statistics shown on the dashboard, or queried by REST API, were only included if targeting was on.

  • SDKs 5 or later - Impressions statistics counts for every flag impression, whether conditions and targeting were set or the default value used.

Flags being evaluated while in freeze state or overridden will not be taken into account.

Refer to Flag impressions to learn more about CloudBees Feature Management impression data analysis.

Get Environment Impressions for all flags

Get impressions for all flags within an environment

https://x-api.rollout.io/public-api/applications/1a23bcd4e5fg6h7890i123j4/environments/environmentName/impressions

Node
cURL
Ruby
Python
Java
C#
Go
var request = require("request"); var options = { method: 'GET', url: 'https://x-api.rollout.io/public-api/applications/1a23bcd4e5fg6h7890i123j4/environments/Production/impressions', qs: { mode: 'daily', from: '1595063738', to: '1597742139', platforms: 'aggregatedOnly' }, headers: { accept: 'application/json', authorization: 'Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
curl --request GET \ --url 'https://x-api.rollout.io/public-api/applications/1a23bcd4e5fg6h7890i123j4/environments/Production/impressions?mode=daily&from=1595063738&to=1597742139&platforms=aggregatedOnly' \ --header 'accept: application/json' \ --header 'authorization: Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6'
require 'uri' require 'net/http' require 'openssl' url = URI("https://x-api.rollout.io/public-api/applications/1a23bcd4e5fg6h7890i123j4/environments/Production/impressions?mode=daily&from=1595063738&to=1597742139&platforms=aggregatedOnly") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["accept"] = 'application/json' request["authorization"] = 'Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6' response = http.request(request) puts response.read_body
import requests url = "https://x-api.rollout.io/public-api/applications/1a23bcd4e5fg6h7890i123j4/environments/Production/impressions" querystring = {"mode":"daily","from":"1595063738","to":"1597742139","platforms":"aggregatedOnly"} headers = { 'accept': "application/json", 'authorization': "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6" } response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://x-api.rollout.io/public-api/applications/1a23bcd4e5fg6h7890i123j4/environments/Production/impressions?mode=daily&from=1595063738&to=1597742139&platforms=aggregatedOnly") .get() .addHeader("accept", "application/json") .addHeader("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6") .build(); Response response = client.newCall(request).execute();
var client = new RestClient("https://x-api.rollout.io/public-api/applications/1a23bcd4e5fg6h7890i123j4/environments/Production/impressions?mode=daily&from=1595063738&to=1597742139&platforms=aggregatedOnly"); var request = new RestRequest(Method.GET); request.AddHeader("accept", "application/json"); request.AddHeader("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6"); IRestResponse response = client.Execute(request);
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://x-api.rollout.io/public-api/applications/1a23bcd4e5fg6h7890i123j4/environments/Production/impressions?mode=daily&from=1595063738&to=1597742139&platforms=aggregatedOnly" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("accept", "application/json") req.Header.Add("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

PATH PARAMS

  • applicationId string - The application id

  • environmentName string - Environment name

QUERY PARAMS

  • mode string - Choose between daily and hourly report

  • from float - Start time (UTC) timestamp (in seconds) of the impressions. In hourly mode, value will be rounded down to the beginning of the hour. In daily mode, to the beginning of the day.

  • to float - End time (UTC) timestamp (in seconds) of the impressions. In hourly mode, value will be rounded up to the end of the hour and is limited to from + 24 hours. In daily mode, to the end of the day and limited to from + 31 days.

  • platforms string - Comma-separated list of platforms. Use 'all' for details of all platforms or 'aggregatedOnly' to see only the aggregated values (no details per platform)

Response

Flag values and counters per platform and time windows

Response schema type: array of objects

  • String flagName - Name of the flag

  • [Object] impressions - Impressions details for the flag

    • Number impressions[].from - Beginning of the time window, timestamp in seconds (UTC)

    • Number impressions[].to - End of the time window, timestamp in seconds (UTC)

  • [Object] impressions[].byPlatformValues - Details of flag values and counters, per platform

    • String impressions[].byPlatformValues[].platform - Name of the platform

    • [Object] impressions[].byPlatformValues[].values - Values and counters for each of them

  • [Object] impressions[].aggregatedValues - Details of flag values and counters

    • String impressions[].aggregatedValues[].value - Flag value

    • Number impressions[].aggregatedValues[].counter - Counter of flag impressions with that value

Get Environment Impressions for a single flag

Get impressions for one flag within an environment

https://x-api.rollout.io/public-api/applications/1a23bcd4e5fg6h7890i123j4/environments/environmentName/impressions/flagName

Node
cURL
Ruby
Python
Java
C#
Go
var request = require("request"); var options = { method: 'GET', url: 'https://x-api.rollout.io/public-api/applications/1a23bcd4e5fg6h7890i123j4/environments/AcmeEnvironment/impressions/default.addFlag', qs: { mode: 'daily', from: '1595063738', to: '1597742139', platforms: 'aggregatedOnly' }, headers: { accept: 'application/json', authorization: 'Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
curl --request GET \ --url 'https://x-api.rollout.io/public-api/applications/1a23bcd4e5fg6h7890i123j4/environments/AcmeEnvironment/impressions/default.addFlag?mode=daily&from=1595063738&to=1597742139&platforms=aggregatedOnly' \ --header 'accept: application/json' \ --header 'authorization: Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6'
require 'uri' require 'net/http' require 'openssl' url = URI("https://x-api.rollout.io/public-api/applications/1a23bcd4e5fg6h7890i123j4/environments/AcmeEnvironment/impressions/default.addFlag?mode=daily&from=1595063738&to=1597742139&platforms=aggregatedOnly") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["accept"] = 'application/json' request["authorization"] = 'Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6' response = http.request(request) puts response.read_body
import requests url = "https://x-api.rollout.io/public-api/applications/1a23bcd4e5fg6h7890i123j4/environments/AcmeEnvironment/impressions/default.addFlag" querystring = {"mode":"daily","from":"1595063738","to":"1597742139","platforms":"aggregatedOnly"} headers = { 'accept': "application/json", 'authorization': "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6" } response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://x-api.rollout.io/public-api/applications/1a23bcd4e5fg6h7890i123j4/environments/AcmeEnvironment/impressions/default.addFlag?mode=daily&from=1595063738&to=1597742139&platforms=aggregatedOnly") .get() .addHeader("accept", "application/json") .addHeader("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6") .build(); Response response = client.newCall(request).execute();
var client = new RestClient("https://x-api.rollout.io/public-api/applications/1a23bcd4e5fg6h7890i123j4/environments/AcmeEnvironment/impressions/default.addFlag?mode=daily&from=1595063738&to=1597742139&platforms=aggregatedOnly"); var request = new RestRequest(Method.GET); request.AddHeader("accept", "application/json"); request.AddHeader("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6"); IRestResponse response = client.Execute(request);
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://x-api.rollout.io/public-api/applications/1a23bcd4e5fg6h7890i123j4/environments/AcmeEnvironment/impressions/default.addFlag?mode=daily&from=1595063738&to=1597742139&platforms=aggregatedOnly" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("accept", "application/json") req.Header.Add("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

PATH PARAMS

  • applicationId string - The application id

  • environmentName string - Environment name

  • flagName string - Flag name

QUERY PARAMS

  • mode string - Choose between daily and hourly report

  • from float - Start time (UTC) timestamp (in seconds) of the impressions. In hourly mode, value will be rounded down to the beginning of the hour. In daily mode, to the beginning of the day.

  • to float - End time (UTC) timestamp (in seconds) of the impressions. In hourly mode, value will be rounded up to the end of the hour and is limited to from + 24 hours. In daily mode, to the end of the day and limited to from + 31 days.

  • platforms string - Comma-separated list of platforms. Use 'all' for details of all platforms or 'aggregatedOnly' to see only the aggregated values (no details per platform)

Response

Flag values and counters per platform and time windows

Response schema type: array of objects

  • String flagName - Name of the flag

  • [Object] impressions - Impressions details for the flag

    • Number impressions[].from - Beginning of the time window, timestamp in seconds (UTC)

    • Number impressions[].to - End of the time window, timestamp in seconds (UTC)

  • [Object] impressions[].byPlatformValues - Details of flag values and counters, per platform

    • String impressions[].byPlatformValues[].platform - Name of the platform

    • [Object] impressions[].byPlatformValues[].values - Values and counters for each of them

  • [Object] impressions[].aggregatedValues - Details of flag values and counters

    • String impressions[].aggregatedValues[].value - Flag value

    • Number impressions[].aggregatedValues[].counter - Counter of flag impressions with that value

As a security measure, a rate limit has been implemented to one request per second, and is based on the requester IP address. Any requests at rates that exceed the rate limit will receive a 555 error status code. There are no exceptions we can currently make for customers at this time.