Galileo

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

Widgets

Widgets Overview

{
  "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.

}

Widgets List

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

The Widgets List endpoint returns a list of Widgets within the specified dashboard.

Example Request

Format:
curl --request GET \
  --url 'https://api.galileo.mashape.com/dashboards/foo/widgets?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/foo/widgets?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/foo/widgets?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/foo/widgets?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/foo/widgets?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/foo/widgets?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))

}

Path Parameters

Name Type Required Description Example
dashboardId String Required

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

foo

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 widgets

Widgets Widget success
{
  results: [
Array

Results

    {
    { ... }
Object

Widget

      "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.

    }
  ]
  "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 Widget

Open in API Explorer
POST /dashboards/{dashboardId}/widgets

The Create Widget endpoint creates a single Widget with the specified widget details described within the body payload.

Example Request

Format:
curl --request POST \
  --url https://api.galileo.mashape.com/dashboards/foo/widgets \
  --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/widgets")

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/widgets",
  "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/widgets", 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/widgets",
  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/widgets"

	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

Widget creation success response

Widgets Widget success2
{
  results: [
Array

Results

    {
    { ... }
Object

Widget

      "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.

    }
  ]
}
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.

    }
  ]
}

Widget

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

The Widget endpoint returns a single Widget, specified by the widgetId within the specified dashboard.

Example Request

Format:
curl --request GET \
  --url https://api.galileo.mashape.com/dashboards/foo/widgets/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/widgets/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/widgets/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/widgets/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/widgets/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/widgets/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
widgetId String Required

The unique identifier of the desired widget.

foo

Responses

200 OK

Individual endpoint

Widgets Widget success23
{
  results: [
Array

Results

    {
    { ... }
Object

Widget

      "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.

    }
  ]
}
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 Widget

Open in API Explorer
PUT /dashboards/{dashboardId}/widgets/{widgetId}

The Update Widget endpoint updates a single Widget, 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/widgets/foo \
  --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/widgets/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 = "{\"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": "PUT",
  "hostname": "api.galileo.mashape.com",
  "port": null,
  "path": "/dashboards/foo/widgets/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({ 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("PUT", "/dashboards/foo/widgets/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/widgets/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 => "{\"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/widgets/foo"

	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("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
widgetId String Required

The unique identifier of the desired widget.

foo

Request Body

Name Type Required Description Example
body Object Required

Body payload

{
  "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

Update widget success response

Widgets Widget success234
{
  results: [
Array

Results

    {
    { ... }
Object

Widget

      "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.

    }
  ]
}
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 Widget

Open in API Explorer
DELETE /dashboards/{dashboardId}/widgets/{widgetId}

The Update Widget endpoint deletes a single Widget, specified by the widgetId parameter.

Example Request

Format:
curl --request DELETE \
  --url https://api.galileo.mashape.com/dashboards/foo/widgets/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/widgets/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/widgets/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/widgets/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/widgets/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/widgets/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
widgetId String Required

The unique identifier of the desired widget.

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.

    }
  ]
}