Galileo

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

Environments

Environments Overview

{
  "id": "foo",
String

Unique identifier of the environment.

  "name": "foo",
String

Display name of the Environment

  "slug": "foo",
String

Slugified representation of the Display Name. Unique identifier for the environment.

  "default": true,
Boolean

Boolean denoting whether Environment is the catch-all bucket for data coming in with a missing or non-existant Environment.

  filters: [
Array

Filters

    {
    { ... }
Object

Filter

      "dimension": "foo",
String

Dimension

      "operator": "foo",
String

Operator

      "value": "foo"
String

Value

    }
  ]
}

Environments List

Open in API Explorer
GET /environments

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

Example Request

Format:
curl --request GET \
  --url 'https://api.galileo.mashape.com/environments?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/environments?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": "/environments?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", "/environments?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/environments?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/environments?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 environments

Environments Environment success
{
  results: [
Array

Results

    {
    { ... }
Object

Environment List Item

      "id": "foo",
String

Unique identifier for the individual environment.

      "slug": "foo",
String

Slugified representation of the Environment name.

      "name": "foo",
String

Display name of Environment.

      "default": true
Boolean

Boolean denoting whether Environment is the catch-all bucket for data coming in with a missing or non-existant Environment.

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

Open in API Explorer
POST /environments

The Create Environment endpoint creates a single Environment with the specified environment details described within the body payload.

Example Request

Format:
curl --request POST \
  --url https://api.galileo.mashape.com/environments \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'service-token: YOUR API KEY HERE' \
  --data '{"name":"foo","default":true,"filters":[{"dimension":"foo","operator":"foo","value":"foo"}]}'
require 'uri'
require 'net/http'

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

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\",\"default\":true,\"filters\":[{\"dimension\":\"foo\",\"operator\":\"foo\",\"value\":\"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": "/environments",
  "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',
  default: true,
  filters: [ { dimension: 'foo', operator: 'foo', value: 'foo' } ] }));
req.end();
import http.client

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

payload = "{\"name\":\"foo\",\"default\":true,\"filters\":[{\"dimension\":\"foo\",\"operator\":\"foo\",\"value\":\"foo\"}]}"

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

conn.request("POST", "/environments", 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/environments",
  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\",\"default\":true,\"filters\":[{\"dimension\":\"foo\",\"operator\":\"foo\",\"value\":\"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/environments"

	payload := strings.NewReader("{\"name\":\"foo\",\"default\":true,\"filters\":[{\"dimension\":\"foo\",\"operator\":\"foo\",\"value\":\"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 of the Environment. Slug is generated from this value.

  "default": true,
Boolean

Boolean denoting whether Environment is the catch-all bucket for data coming in with a missing or non-existant Environment.

  filters: [
Array

Filters

    {
    { ... }
Object

Filter

      "dimension": "foo",
String

Dimension

      "operator": "foo",
String

Operator

      "value": "foo"
String

Value

    }
  ]
}

Responses

200 OK

Environment creation success response

Environments Environment success2
{
  results: [
Array

Results

    {
    { ... }
Object

Environment

      "id": "foo",
String

Unique identifier of the environment.

      "name": "foo",
String

Display name of the Environment

      "slug": "foo",
String

Slugified representation of the Display Name. Unique identifier for the environment.

      "default": true,
Boolean

Boolean denoting whether Environment is the catch-all bucket for data coming in with a missing or non-existant Environment.

      filters: [
Array

Filters

        {
        { ... }
Object

Filter

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

    }
  ]
}

Environment

Open in API Explorer
GET /environments/{environmentId}

The Environment endpoint returns a single Environment, specified by the environmentId.

Example Request

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

url = URI("https://api.galileo.mashape.com/environments/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": "/environments/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", "/environments/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/environments/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/environments/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
environmentId String Required

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

foo

Responses

200 OK

Individual endpoint

Environments Environment success23
{
  results: [
Array

Results

    {
    { ... }
Object

Environment

      "id": "foo",
String

Unique identifier of the environment.

      "name": "foo",
String

Display name of the Environment

      "slug": "foo",
String

Slugified representation of the Display Name. Unique identifier for the environment.

      "default": true,
Boolean

Boolean denoting whether Environment is the catch-all bucket for data coming in with a missing or non-existant Environment.

      filters: [
Array

Filters

        {
        { ... }
Object

Filter

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

    }
  ]
}

Update Environment

Open in API Explorer
PUT /environments/{environmentId}

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

Example Request

Format:
curl --request PUT \
  --url https://api.galileo.mashape.com/environments/foo \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'service-token: YOUR API KEY HERE' \
  --data '{"name":"foo","default":true,"filters":[{"dimension":"foo","operator":"foo","value":"foo"}]}'
require 'uri'
require 'net/http'

url = URI("https://api.galileo.mashape.com/environments/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\",\"default\":true,\"filters\":[{\"dimension\":\"foo\",\"operator\":\"foo\",\"value\":\"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": "/environments/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',
  default: true,
  filters: [ { dimension: 'foo', operator: 'foo', value: 'foo' } ] }));
req.end();
import http.client

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

payload = "{\"name\":\"foo\",\"default\":true,\"filters\":[{\"dimension\":\"foo\",\"operator\":\"foo\",\"value\":\"foo\"}]}"

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

conn.request("PUT", "/environments/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/environments/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\",\"default\":true,\"filters\":[{\"dimension\":\"foo\",\"operator\":\"foo\",\"value\":\"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/environments/foo"

	payload := strings.NewReader("{\"name\":\"foo\",\"default\":true,\"filters\":[{\"dimension\":\"foo\",\"operator\":\"foo\",\"value\":\"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
environmentId String Required

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

foo

Request Body

Name Type Required Description Example
body Object Required

Body payload

{
  "name": "foo",
String

Display name of the Environment. Slug is generated from this value.

  "default": true,
Boolean

Boolean denoting whether Environment is the catch-all bucket for data coming in with a missing or non-existant Environment.

  filters: [
Array

Filters

    {
    { ... }
Object

Filter

      "dimension": "foo",
String

Dimension

      "operator": "foo",
String

Operator

      "value": "foo"
String

Value

    }
  ]
}

Responses

200 OK

Update environment success response

Environments Environment success234
{
  results: [
Array

Results

    {
    { ... }
Object

Environment

      "id": "foo",
String

Unique identifier of the environment.

      "name": "foo",
String

Display name of the Environment

      "slug": "foo",
String

Slugified representation of the Display Name. Unique identifier for the environment.

      "default": true,
Boolean

Boolean denoting whether Environment is the catch-all bucket for data coming in with a missing or non-existant Environment.

      filters: [
Array

Filters

        {
        { ... }
Object

Filter

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

    }
  ]
}

Delete Environment

Open in API Explorer
DELETE /environments/{environmentId}

The Update Environment endpoint deletes a single Environment, specified by the environmentId parameter.

Example Request

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

url = URI("https://api.galileo.mashape.com/environments/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": "/environments/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", "/environments/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/environments/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/environments/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
environmentId String Required

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

foo

Request Body

Name Type Required Description Example
body Object Required

Body payload

{
  "purge": true
Boolean

Boolean denoting whether data associated to the Environment is set to be deleted along with the Environment.

}

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.

    }
  ]
}

Environment Stats

Open in API Explorer
GET /environments/{environmentId}/stats

The Environment Stats endpoint returns the stats of a single Environment, specified by the environmentId.

Example Request

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

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

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": "/environments/foo/stats",
  "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", "/environments/foo/stats", 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/environments/foo/stats",
  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/environments/foo/stats"

	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
environmentId String Required

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

foo

Responses

200 OK

Environment stats

Environments Environment success2345
{
  results: [
Array

Results

    {
    { ... }
Object

Stats

      "avgReqPerSec": 42,
Integer

Average number of Requests incoming per second.

      "nbReq": 42,
Integer

Total number of Requests received.

      "rateLimitingRemaining": 42,
Integer

Total number of Requests remaining in quota.

      "rateLimitingBase": 42
Integer

Total number of Requests allowed in quota.

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

    }
  ]
}

Populate Environment with Test Data

Open in API Explorer
POST /environments/{environmentId}/test-data

The Populate Environment with Test Data endpoint populates the specified environment with 1,000 randomized Stripe API ALFs without affecting quota.

Example Request

Format:
curl --request POST \
  --url https://api.galileo.mashape.com/environments/foo/test-data \
  --header 'accept: application/json' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --header 'service-token: YOUR API KEY HERE'
require 'uri'
require 'net/http'

url = URI("https://api.galileo.mashape.com/environments/foo/test-data")

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"] = 'multipart/form-data; boundary=---011000010111000001101001'

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

var options = {
  "method": "POST",
  "hostname": "api.galileo.mashape.com",
  "port": null,
  "path": "/environments/foo/test-data",
  "headers": {
    "accept": "application/json",
    "service-token": "YOUR API KEY HERE",
    "content-type": "multipart/form-data; boundary=---011000010111000001101001"
  }
};

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

payload = ""

headers = {
    'accept': "application/json",
    'service-token': "YOUR API KEY HERE",
    'content-type': "multipart/form-data; boundary=---011000010111000001101001"
    }

conn.request("POST", "/environments/foo/test-data", 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/environments/foo/test-data",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "content-type: multipart/form-data; boundary=---011000010111000001101001",
    "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/environments/foo/test-data"

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

	req.Header.Add("accept", "application/json")
	req.Header.Add("service-token", "YOUR API KEY HERE")
	req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")

	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
environmentId String Required

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

foo

Responses

200 OK

Array containing the updated environment.

Environments Environment success23456
{
  results: [
Array

Results

    {
    { ... }
Object

Environment Populate

      "batchSize": 42.0,
Number

Number representing ALFs populated.

      "initialTotal": 42.0,
Number

Number representing Environment ALFs before population.

      "newTotal": 42.0
Number

Number representing Environment ALFs after population.

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

    }
  ]
}