Galileo

This version is in Beta, there may be issues we're still working out.

Dashboards

Dashboards Overview

{
  "id": "foo",
String

Unique identifier for the individual dashboard.

  "name": "foo",
String

Display name for Dashboard.

  "slug": "foo"
String

Slugified representation of the Display Name for the dashboard.

}

Dashboards List

Open in API Explorer
GET /dashboards

The Dashboards List endpoint returns a list of Dashboards the current account has access to.

Example Request

Format:
curl --request GET \
  --url 'https://api.galileo.mashape.com/dashboards?page=256&pageSize=256' \
  --header 'accept: application/json' \
  --header 'service-token: YOUR API KEY HERE'
require 'uri'
require 'net/http'

url = URI("https://api.galileo.mashape.com/dashboards?page=256&pageSize=256")

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["service-token"] = 'YOUR API KEY HERE'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.galileo.mashape.com",
  "port": null,
  "path": "/dashboards?page=256&pageSize=256",
  "headers": {
    "accept": "application/json",
    "service-token": "YOUR API KEY HERE"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.galileo.mashape.com")

headers = {
    'accept': "application/json",
    'service-token': "YOUR API KEY HERE"
    }

conn.request("GET", "/dashboards?page=256&pageSize=256", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.galileo.mashape.com/dashboards?page=256&pageSize=256",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "service-token: YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.galileo.mashape.com/dashboards?page=256&pageSize=256"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("service-token", "YOUR API KEY HERE")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Query Parameters

Name Type Required Description Example
page Integer (int32) Optional

Returns results of the specified page index

256
pageSize Integer (int32) Optional

The number of results to return per page up to a maximum of 100. Defaults to 15.

256

Responses

200 OK

An array of dashboards

Dashboards Dashboard success
{
  results: [
Array

Results

    {
    { ... }
Object

Dashboard

      "id": "foo",
String

Unique identifier for the individual dashboard.

      "name": "foo",
String

Display name for Dashboard.

      "slug": "foo"
String

Slugified representation of the Display Name for the dashboard.

    }
  ]
  "totalCount": 42.0,
Number

Total number of items available.

  "currentPage": 42.0
Number

Current page of results

}
default Default

Unexpected error

Stats Error
{
  "code": 42.0,
Number

Code

  "message": "foo",
String

Message

  fields: [
Array

Returns array of field errors upon validation error.

    {
    { ... }
Object

Field Error

      "name": "foo",
String

Field name with error.

      "errors": [
    "foo",
    "foo",
    "foo"
  ]
Array

Array of error messages for the field.

    }
  ]
}

Create Dashboard

Open in API Explorer
POST /dashboards

The Create Dashboard endpoint creates a single Dashboard with the specified dashboard details described within the body payload.

Example Request

Format:
curl --request POST \
  --url https://api.galileo.mashape.com/dashboards \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'service-token: YOUR API KEY HERE' \
  --data '{"name":"foo"}'
require 'uri'
require 'net/http'

url = URI("https://api.galileo.mashape.com/dashboards")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["service-token"] = 'YOUR API KEY HERE'
request["content-type"] = 'application/json'
request.body = "{\"name\":\"foo\"}"

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "api.galileo.mashape.com",
  "port": null,
  "path": "/dashboards",
  "headers": {
    "accept": "application/json",
    "service-token": "YOUR API KEY HERE",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ name: 'foo' }));
req.end();
import http.client

conn = http.client.HTTPSConnection("api.galileo.mashape.com")

payload = "{\"name\":\"foo\"}"

headers = {
    'accept': "application/json",
    'service-token': "YOUR API KEY HERE",
    'content-type': "application/json"
    }

conn.request("POST", "/dashboards", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.galileo.mashape.com/dashboards",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"name\":\"foo\"}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "content-type: application/json",
    "service-token: YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.galileo.mashape.com/dashboards"

	payload := strings.NewReader("{\"name\":\"foo\"}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("service-token", "YOUR API KEY HERE")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Request Body

Name Type Required Description Example
body Object Required
{
  "name": "foo"
String

Display name for Dashboard.

}

Responses

200 OK

Dashboard creation success response

Dashboards Dashboard success2
{
  results: [
Array

Results

    {
    { ... }
Object

Dashboard

      "id": "foo",
String

Unique identifier for the individual dashboard.

      "name": "foo",
String

Display name for Dashboard.

      "slug": "foo"
String

Slugified representation of the Display Name for the dashboard.

    }
  ]
}
default Default

Unexpected error

Stats Error
{
  "code": 42.0,
Number

Code

  "message": "foo",
String

Message

  fields: [
Array

Returns array of field errors upon validation error.

    {
    { ... }
Object

Field Error

      "name": "foo",
String

Field name with error.

      "errors": [
    "foo",
    "foo",
    "foo"
  ]
Array

Array of error messages for the field.

    }
  ]
}

Dashboard

Open in API Explorer
GET /dashboards/{dashboardId}

The Dashboard endpoint returns a single Dashboard, specified by the dashboardId.

Example Request

Format:
curl --request GET \
  --url https://api.galileo.mashape.com/dashboards/foo \
  --header 'accept: application/json' \
  --header 'service-token: YOUR API KEY HERE'
require 'uri'
require 'net/http'

url = URI("https://api.galileo.mashape.com/dashboards/foo")

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["service-token"] = 'YOUR API KEY HERE'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.galileo.mashape.com",
  "port": null,
  "path": "/dashboards/foo",
  "headers": {
    "accept": "application/json",
    "service-token": "YOUR API KEY HERE"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.galileo.mashape.com")

headers = {
    'accept': "application/json",
    'service-token': "YOUR API KEY HERE"
    }

conn.request("GET", "/dashboards/foo", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.galileo.mashape.com/dashboards/foo",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "service-token: YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.galileo.mashape.com/dashboards/foo"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("service-token", "YOUR API KEY HERE")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
dashboardId String Required

The unique identifier (ID or Slug) of the desired dashboard.

foo

Responses

200 OK

Individual endpoint

Dashboards Dashboard success23
{
  results: [
Array

Results

    {
    { ... }
Object

Dashboard

      "id": "foo",
String

Unique identifier for the individual dashboard.

      "name": "foo",
String

Display name for Dashboard.

      "slug": "foo"
String

Slugified representation of the Display Name for the dashboard.

    }
  ]
}
default Default

Unexpected error

Stats Error
{
  "code": 42.0,
Number

Code

  "message": "foo",
String

Message

  fields: [
Array

Returns array of field errors upon validation error.

    {
    { ... }
Object

Field Error

      "name": "foo",
String

Field name with error.

      "errors": [
    "foo",
    "foo",
    "foo"
  ]
Array

Array of error messages for the field.

    }
  ]
}

Update Dashboard

Open in API Explorer
PUT /dashboards/{dashboardId}

The Update Dashboard endpoint updates a single Dashboard, specified by the dashboardId with the details described in the body payload.

Example Request

Format:
curl --request PUT \
  --url https://api.galileo.mashape.com/dashboards/foo \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'service-token: YOUR API KEY HERE' \
  --data '{"name":"foo"}'
require 'uri'
require 'net/http'

url = URI("https://api.galileo.mashape.com/dashboards/foo")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["accept"] = 'application/json'
request["service-token"] = 'YOUR API KEY HERE'
request["content-type"] = 'application/json'
request.body = "{\"name\":\"foo\"}"

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "api.galileo.mashape.com",
  "port": null,
  "path": "/dashboards/foo",
  "headers": {
    "accept": "application/json",
    "service-token": "YOUR API KEY HERE",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ name: 'foo' }));
req.end();
import http.client

conn = http.client.HTTPSConnection("api.galileo.mashape.com")

payload = "{\"name\":\"foo\"}"

headers = {
    'accept': "application/json",
    'service-token': "YOUR API KEY HERE",
    'content-type': "application/json"
    }

conn.request("PUT", "/dashboards/foo", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.galileo.mashape.com/dashboards/foo",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\"name\":\"foo\"}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "content-type: application/json",
    "service-token: YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.galileo.mashape.com/dashboards/foo"

	payload := strings.NewReader("{\"name\":\"foo\"}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("service-token", "YOUR API KEY HERE")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
dashboardId String Required

The unique identifier (ID or Slug) of the desired dashboard.

foo

Request Body

Name Type Required Description Example
body Object Required

Body payload

{
  "name": "foo"
String

Display name for Dashboard.

}

Responses

200 OK

Update dashboard success response

Dashboards Dashboard success234
{
  results: [
Array

Results

    {
    { ... }
Object

Dashboard

      "id": "foo",
String

Unique identifier for the individual dashboard.

      "name": "foo",
String

Display name for Dashboard.

      "slug": "foo"
String

Slugified representation of the Display Name for the dashboard.

    }
  ]
}
default Default

Unexpected error

Stats Error
{
  "code": 42.0,
Number

Code

  "message": "foo",
String

Message

  fields: [
Array

Returns array of field errors upon validation error.

    {
    { ... }
Object

Field Error

      "name": "foo",
String

Field name with error.

      "errors": [
    "foo",
    "foo",
    "foo"
  ]
Array

Array of error messages for the field.

    }
  ]
}

Delete Dashboard

Open in API Explorer
DELETE /dashboards/{dashboardId}

The Update Dashboard endpoint deletes a single Dashboard, specified by the dashboardId parameter.

Example Request

Format:
curl --request DELETE \
  --url https://api.galileo.mashape.com/dashboards/foo \
  --header 'accept: application/json' \
  --header 'service-token: YOUR API KEY HERE'
require 'uri'
require 'net/http'

url = URI("https://api.galileo.mashape.com/dashboards/foo")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["accept"] = 'application/json'
request["service-token"] = 'YOUR API KEY HERE'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "DELETE",
  "hostname": "api.galileo.mashape.com",
  "port": null,
  "path": "/dashboards/foo",
  "headers": {
    "accept": "application/json",
    "service-token": "YOUR API KEY HERE"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.galileo.mashape.com")

headers = {
    'accept': "application/json",
    'service-token': "YOUR API KEY HERE"
    }

conn.request("DELETE", "/dashboards/foo", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.galileo.mashape.com/dashboards/foo",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "service-token: YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.galileo.mashape.com/dashboards/foo"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("service-token", "YOUR API KEY HERE")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
dashboardId String Required

The unique identifier (ID or Slug) of the desired dashboard.

foo

Responses

204 No Content

No Content

(Empty Response)
default Default

Unexpected error

Stats Error
{
  "code": 42.0,
Number

Code

  "message": "foo",
String

Message

  fields: [
Array

Returns array of field errors upon validation error.

    {
    { ... }
Object

Field Error

      "name": "foo",
String

Field name with error.

      "errors": [
    "foo",
    "foo",
    "foo"
  ]
Array

Array of error messages for the field.

    }
  ]
}

Dashboard Widget Preview

Open in API Explorer
POST /dashboards/{dashboardId}/widget-preview

The Dashboard Widget Results endpoint returns a list of widgets along with its data

Example Request

Format:
curl --request POST \
  --url https://api.galileo.mashape.com/dashboards/foo/widget-preview \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'service-token: YOUR API KEY HERE' \
  --data '{"title":"foo","reportId":"foo","reportSlug":"foo","environmentSlug":"foo","type":"foo","metric":"foo","interval":"foo","timeframe":"foo","size":42.0,"rowCount":42.0,"primaryColor":"foo","sort":"foo"}'
require 'uri'
require 'net/http'

url = URI("https://api.galileo.mashape.com/dashboards/foo/widget-preview")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["service-token"] = 'YOUR API KEY HERE'
request["content-type"] = 'application/json'
request.body = "{\"title\":\"foo\",\"reportId\":\"foo\",\"reportSlug\":\"foo\",\"environmentSlug\":\"foo\",\"type\":\"foo\",\"metric\":\"foo\",\"interval\":\"foo\",\"timeframe\":\"foo\",\"size\":42.0,\"rowCount\":42.0,\"primaryColor\":\"foo\",\"sort\":\"foo\"}"

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "api.galileo.mashape.com",
  "port": null,
  "path": "/dashboards/foo/widget-preview",
  "headers": {
    "accept": "application/json",
    "service-token": "YOUR API KEY HERE",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ title: 'foo',
  reportId: 'foo',
  reportSlug: 'foo',
  environmentSlug: 'foo',
  type: 'foo',
  metric: 'foo',
  interval: 'foo',
  timeframe: 'foo',
  size: 42,
  rowCount: 42,
  primaryColor: 'foo',
  sort: 'foo' }));
req.end();
import http.client

conn = http.client.HTTPSConnection("api.galileo.mashape.com")

payload = "{\"title\":\"foo\",\"reportId\":\"foo\",\"reportSlug\":\"foo\",\"environmentSlug\":\"foo\",\"type\":\"foo\",\"metric\":\"foo\",\"interval\":\"foo\",\"timeframe\":\"foo\",\"size\":42.0,\"rowCount\":42.0,\"primaryColor\":\"foo\",\"sort\":\"foo\"}"

headers = {
    'accept': "application/json",
    'service-token': "YOUR API KEY HERE",
    'content-type': "application/json"
    }

conn.request("POST", "/dashboards/foo/widget-preview", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.galileo.mashape.com/dashboards/foo/widget-preview",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"title\":\"foo\",\"reportId\":\"foo\",\"reportSlug\":\"foo\",\"environmentSlug\":\"foo\",\"type\":\"foo\",\"metric\":\"foo\",\"interval\":\"foo\",\"timeframe\":\"foo\",\"size\":42.0,\"rowCount\":42.0,\"primaryColor\":\"foo\",\"sort\":\"foo\"}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "content-type: application/json",
    "service-token: YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.galileo.mashape.com/dashboards/foo/widget-preview"

	payload := strings.NewReader("{\"title\":\"foo\",\"reportId\":\"foo\",\"reportSlug\":\"foo\",\"environmentSlug\":\"foo\",\"type\":\"foo\",\"metric\":\"foo\",\"interval\":\"foo\",\"timeframe\":\"foo\",\"size\":42.0,\"rowCount\":42.0,\"primaryColor\":\"foo\",\"sort\":\"foo\"}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("service-token", "YOUR API KEY HERE")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
dashboardId String Required

The unique identifier (ID or Slug) of the desired dashboard.

foo

Request Body

Name Type Required Description Example
body Object Required
{
  "title": "foo",
String

Display title for Widget.

  "reportId": "foo",
String

Associated unique identifier for an individual report.

  "reportSlug": "foo",
String

Associated slugified representation of the Display Name for the report.

  "environmentSlug": "foo",
String

Associated slugified representation of the Display Name for the environment.

  "type": "foo",
String

Chart type.

  "metric": "foo",
String

Unit of measurement for chart and stat widget types.

  "interval": "foo",
String

Histogram date bucketing interval for chart and stat widget types.

  "timeframe": "foo",
String

Timeframe to measure.

  "size": 42.0,
Number

Widget size.

  "rowCount": 42.0,
Number

Number of rows for table widget type.

  "primaryColor": "foo",
String

Primary color to use to render widget.

  "sort": "foo"
String

Sort order for table widget type.

}

Responses

200 OK

Table widget preview response

Dashboards Dashboard success2345
{
  results: [
Array

Results

    {
    { ... }
Object

Widget Table Results

      "id": "foo",
String

Unique identifier for the individual dashboard.

      "title": "foo",
String

Display title for Widget.

      "reportId": "foo",
String

Associated unique identifier for an individual report.

      "reportSlug": "foo",
String

Associated slugified representation of the Display Name for the report.

      "environmentSlug": "foo",
String

Associated slugified representation of the Display Name for the environment.

      "type": "foo",
String

Chart type.

      "metric": "foo",
String

Unit of measurement for chart and stat widget types.

      "interval": "foo",
String

Histogram date bucketing interval for chart and stat widget types.

      "timeframe": "foo",
String

Timeframe to measure.

      "size": 42.0,
Number

Widget size.

      "rowCount": 42.0,
Number

Number of rows for table widget type.

      "primaryColor": "foo",
String

Primary color to use to render widget.

      "sort": "foo",
String

Sort order for table widget type.

      "data": {
      "data": { ... }
Object

Data

        columns: [
Array

Tabular column cells

          {
          { ... }
Object

Column

            "dimension": "foo",
String

Dimension

            "operator": "foo",
String

Operator

            "value": "foo"
String

Value

          }
        ]
      }
    }
  ]
}
default Default

Unexpected error

Stats Error
{
  "code": 42.0,
Number

Code

  "message": "foo",
String

Message

  fields: [
Array

Returns array of field errors upon validation error.

    {
    { ... }
Object

Field Error

      "name": "foo",
String

Field name with error.

      "errors": [
    "foo",
    "foo",
    "foo"
  ]
Array

Array of error messages for the field.

    }
  ]
}

Dashboard Widget Results List

Open in API Explorer
GET /dashboards/{dashboardId}/results

The Dashboard Widget Results List endpoint returns a list of widgets associated with the specified dashboardId along with the widget results data.

Example Request

Format:
curl --request GET \
  --url https://api.galileo.mashape.com/dashboards/foo/results \
  --header 'accept: application/json' \
  --header 'service-token: YOUR API KEY HERE'
require 'uri'
require 'net/http'

url = URI("https://api.galileo.mashape.com/dashboards/foo/results")

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["service-token"] = 'YOUR API KEY HERE'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.galileo.mashape.com",
  "port": null,
  "path": "/dashboards/foo/results",
  "headers": {
    "accept": "application/json",
    "service-token": "YOUR API KEY HERE"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.galileo.mashape.com")

headers = {
    'accept': "application/json",
    'service-token': "YOUR API KEY HERE"
    }

conn.request("GET", "/dashboards/foo/results", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.galileo.mashape.com/dashboards/foo/results",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "service-token: YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.galileo.mashape.com/dashboards/foo/results"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("service-token", "YOUR API KEY HERE")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
dashboardId String Required

The unique identifier (ID or Slug) of the desired dashboard.

foo

Responses

200 OK

Table widget preview response

Dashboards Dashboard success23456
{
  results: [
Array

Results

    {
    { ... }
Object

Widget Table Results

      "id": "foo",
String

Unique identifier for the individual dashboard.

      "title": "foo",
String

Display title for Widget.

      "reportId": "foo",
String

Associated unique identifier for an individual report.

      "reportSlug": "foo",
String

Associated slugified representation of the Display Name for the report.

      "environmentSlug": "foo",
String

Associated slugified representation of the Display Name for the environment.

      "type": "foo",
String

Chart type.

      "metric": "foo",
String

Unit of measurement for chart and stat widget types.

      "interval": "foo",
String

Histogram date bucketing interval for chart and stat widget types.

      "timeframe": "foo",
String

Timeframe to measure.

      "size": 42.0,
Number

Widget size.

      "rowCount": 42.0,
Number

Number of rows for table widget type.

      "primaryColor": "foo",
String

Primary color to use to render widget.

      "sort": "foo",
String

Sort order for table widget type.

      "data": {
      "data": { ... }
Object

Data

        columns: [
Array

Tabular column cells

          {
          { ... }
Object

Column

            "dimension": "foo",
String

Dimension

            "operator": "foo",
String

Operator

            "value": "foo"
String

Value

          }
        ]
      }
    }
  ]
}
default Default

Unexpected error

Stats Error
{
  "code": 42.0,
Number

Code

  "message": "foo",
String

Message

  fields: [
Array

Returns array of field errors upon validation error.

    {
    { ... }
Object

Field Error

      "name": "foo",
String

Field name with error.

      "errors": [
    "foo",
    "foo",
    "foo"
  ]
Array

Array of error messages for the field.

    }
  ]
}

Dashboard Widget Results List

Open in API Explorer
GET /dashboards/{dashboardId}/widgets/{widgetId}/results

The Dashboard Widget Results List endpoint returns a list of widgets associated with the specified dashboardId along with the widget results data.

Example Request

Format:
curl --request GET \
  --url https://api.galileo.mashape.com/dashboards/foo/widgets/foo/results \
  --header 'accept: application/json' \
  --header 'service-token: YOUR API KEY HERE'
require 'uri'
require 'net/http'

url = URI("https://api.galileo.mashape.com/dashboards/foo/widgets/foo/results")

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["service-token"] = 'YOUR API KEY HERE'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.galileo.mashape.com",
  "port": null,
  "path": "/dashboards/foo/widgets/foo/results",
  "headers": {
    "accept": "application/json",
    "service-token": "YOUR API KEY HERE"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.galileo.mashape.com")

headers = {
    'accept': "application/json",
    'service-token': "YOUR API KEY HERE"
    }

conn.request("GET", "/dashboards/foo/widgets/foo/results", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.galileo.mashape.com/dashboards/foo/widgets/foo/results",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "service-token: YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.galileo.mashape.com/dashboards/foo/widgets/foo/results"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("service-token", "YOUR API KEY HERE")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
dashboardId String Required

The unique identifier (ID or Slug) of the desired dashboard.

foo
widgetId String Required

The unique identifier of the desired widget.

foo

Responses

200 OK

Table widget preview response

Dashboards Dashboard success234567
{
  results: [
Array

Results

    {
    { ... }
Object

Widget Table Results

      "id": "foo",
String

Unique identifier for the individual dashboard.

      "title": "foo",
String

Display title for Widget.

      "reportId": "foo",
String

Associated unique identifier for an individual report.

      "reportSlug": "foo",
String

Associated slugified representation of the Display Name for the report.

      "environmentSlug": "foo",
String

Associated slugified representation of the Display Name for the environment.

      "type": "foo",
String

Chart type.

      "metric": "foo",
String

Unit of measurement for chart and stat widget types.

      "interval": "foo",
String

Histogram date bucketing interval for chart and stat widget types.

      "timeframe": "foo",
String

Timeframe to measure.

      "size": 42.0,
Number

Widget size.

      "rowCount": 42.0,
Number

Number of rows for table widget type.

      "primaryColor": "foo",
String

Primary color to use to render widget.

      "sort": "foo",
String

Sort order for table widget type.

      "data": {
      "data": { ... }
Object

Data

        columns: [
Array

Tabular column cells

          {
          { ... }
Object

Column

            "dimension": "foo",
String

Dimension

            "operator": "foo",
String

Operator

            "value": "foo"
String

Value

          }
        ]
      }
    }
  ]
}