Galileo

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

Stats

Stats Overview

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

}

Account Stats

Open in API Explorer
GET /stats

The Account Stats endpoint returns the stats of the account, specified by the service-token header.

Example Request

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

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

}

Responses

200 OK

Account stats

Stats Stat success
{
  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.

    }
  ]
}