Get all budgets
curl --request GET \
--url https://api.vantage.sh/v2/budgets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vantage.sh/v2/budgets"
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/budgets', 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/budgets",
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/budgets"
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/budgets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vantage.sh/v2/budgets")
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/v2/budgets",
"first": "https://api.vantage.sh/v2/budgets?page=1",
"next": null,
"last": "https://api.vantage.sh/v2/budgets?page=1",
"prev": null
},
"budgets": [
{
"token": "bdgt_0d825e79a0682cc2",
"name": "database",
"workspace_token": "wrkspc_226ab053bd01bb2b",
"user_token": "usr_8e44c17792242852",
"created_by_token": "usr_8e44c17792242852",
"cost_report_token": "rprt_92062240b4ffda91",
"created_at": "2024-07-11T20:22:49Z",
"budget_alert_tokens": [],
"periods": [
{
"start_at": "2024-07-01",
"end_at": "2024-09-30",
"amount": "10000.0"
}
],
"performance": [
{
"date": "July, 2024",
"actual": "-100%",
"amount": "10000.0"
}
]
}
]
}Budgets
Get all budgets
Return all Budgets.
GET
/
budgets
Get all budgets
curl --request GET \
--url https://api.vantage.sh/v2/budgets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vantage.sh/v2/budgets"
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/budgets', 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/budgets",
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/budgets"
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/budgets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vantage.sh/v2/budgets")
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/v2/budgets",
"first": "https://api.vantage.sh/v2/budgets?page=1",
"next": null,
"last": "https://api.vantage.sh/v2/budgets?page=1",
"prev": null
},
"budgets": [
{
"token": "bdgt_0d825e79a0682cc2",
"name": "database",
"workspace_token": "wrkspc_226ab053bd01bb2b",
"user_token": "usr_8e44c17792242852",
"created_by_token": "usr_8e44c17792242852",
"cost_report_token": "rprt_92062240b4ffda91",
"created_at": "2024-07-11T20:22:49Z",
"budget_alert_tokens": [],
"periods": [
{
"start_at": "2024-07-01",
"end_at": "2024-09-30",
"amount": "10000.0"
}
],
"performance": [
{
"date": "July, 2024",
"actual": "-100%",
"amount": "10000.0"
}
]
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Query Parameters
The page of results to return.
The number of results to return. The maximum is 1000.
⌘I