Skip to main content
GET
/
recommendation_views
/
{recommendation_view_token}
Get recommendation view by token
curl --request GET \
  --url https://api.vantage.sh/v2/recommendation_views/{recommendation_view_token} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.vantage.sh/v2/recommendation_views/{recommendation_view_token}"

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/recommendation_views/{recommendation_view_token}', 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/recommendation_views/{recommendation_view_token}",
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/recommendation_views/{recommendation_view_token}"

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/recommendation_views/{recommendation_view_token}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.vantage.sh/v2/recommendation_views/{recommendation_view_token}")

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
{
  "token": "rec_vw_be3f24eb1b5aabf6",
  "title": "Production Recommendations",
  "workspace_token": "wrkspc_be6568a301b1d06c",
  "start_date": "2024-01-01",
  "end_date": "2024-12-31",
  "provider_ids": [
    "aws",
    "gcp"
  ],
  "billing_account_ids": [],
  "account_ids": [
    "123456789012"
  ],
  "regions": [
    "us-east-1",
    "us-west-2"
  ],
  "tag_key": "environment",
  "tag_value": "production",
  "created_at": "2024-07-15T16:08:54Z",
  "created_by": "team_73f6001f98e9012b"
}
{
"errors": [
"<string>"
],
"links": {
"self": "<string>",
"first": "<string>",
"next": "<string>",
"last": "<string>",
"prev": "<string>"
}
}

Authorizations

Authorization
string
header
required

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

Path Parameters

recommendation_view_token
string
required

Response

RecommendationView model

token
string | null
title
string | null

The title of the RecommendationView.

Example:

"Production Recommendations"

workspace_token
string | null

The token for the Workspace the RecommendationView is a part of.

start_date
string | null

Filter recommendations created on/after this YYYY-MM-DD date.

Example:

"2024-01-01"

end_date
string | null

Filter recommendations created on/before this YYYY-MM-DD date.

Example:

"2024-12-31"

provider_ids
string[] | null

Filter by one or more providers.

billing_account_ids
string[] | null

Filter by billing account identifiers.

account_ids
string[] | null

Filter by cloud account identifiers.

regions
string[] | null

Filter by region slugs (e.g. us-east-1, eastus, asia-east1).

types
string[] | null

Filter by one or more recommendation type slugs.

tag_key
string | null

Filter by tag key (must be used with tag_value).

Example:

"environment"

tag_value
string | null

Filter by tag value (requires tag_key).

Example:

"production"

min_savings
number<float> | null

Filter recommendations with at least this amount of potential savings.

Example:

100.5

created_at
string | null

The date and time, in UTC, the view was created. ISO 8601 Formatted.

Example:

"2023-08-04T00:00:00Z"

created_by
string | null

The token for the Creator of this RecommendationView.