Skip to main content
GET
/
products
Get all products
curl --request GET \
  --url https://api.vantage.sh/v2/products \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.vantage.sh/v2/products"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.vantage.sh/v2/products', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.vantage.sh/v2/products",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

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

func main() {

	url := "https://api.vantage.sh/v2/products"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.vantage.sh/v2/products")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.vantage.sh/v2/products")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "links": {
    "self": "https://api.vantage.sh/v1/products",
    "first": "https://api.vantage.sh/v1/products?page=1",
    "next": null,
    "last": "https://api.vantage.sh/v1/products?page=1",
    "prev": null
  },
  "products": [
    {
      "id": "aws-ec2-m5d_16xlarge",
      "category": "compute",
      "name": "m5d.16xlarge",
      "service_id": "aws-ec2",
      "provider_id": "aws",
      "details": {
        "gpu": 0,
        "name": "M5 General Purpose 16xlarge",
        "vcpu": 64,
        "memory": 256,
        "clock_speed_ghz": 3.1,
        "physical_processor_description": "Intel Xeon Platinum 8175 (Skylake)",
        "network_performance_description": "20 Gigabit"
      }
    },
    {
      "id": "aws-ec2-c5a_8xlarge",
      "category": "compute",
      "name": "c5a.8xlarge",
      "service_id": "aws-ec2",
      "provider_id": "aws",
      "details": {
        "gpu": 0,
        "name": "C5A 8xlarge",
        "vcpu": 64,
        "memory": 256
      }
    },
    {
      "id": "aws-ec2-c5a_4large",
      "category": "compute",
      "name": "c5a.4large",
      "service_id": "aws-ec2",
      "provider_id": "aws",
      "details": {
        "gpu": 0,
        "name": "C5A 4large",
        "vcpu": 64,
        "memory": 4
      }
    },
    {
      "id": "aws-s3-standard",
      "category": "object_storage",
      "name": "standard",
      "service_id": "aws-s3",
      "provider_id": "aws",
      "details": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

provider_id
string

Query by Provider to list all Products across all Services for a Provider. e.g. aws

service_id
string

Query by Service to list all Products for a specific provider service. e.g. aws-ec2

name
string

Query by name of the Product to see a list of products which match that name. e.g. m5a.16xlarge

page
integer<int32>

The page of results to return.

limit
integer<int32>

The amount of results to return. The maximum is 1000

Response

200 - application/json

Products model

products
object[]
required