cURL
curl --request POST \
--url https://{tenant}.chronosphere.io/api/v1/config/consumption-budgets \
--header 'API-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '{}'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.chronosphere.io/api/v1/config/consumption-budgets"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{tenant}.chronosphere.io/api/v1/config/consumption-budgets")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();const options = {
method: 'POST',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://{tenant}.chronosphere.io/api/v1/config/consumption-budgets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{tenant}.chronosphere.io/api/v1/config/consumption-budgets"
payload = {}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"consumption_budget": {
"name": "<string>",
"partition_slug_path": "<string>",
"alert_action_config": {
"annotations": {},
"instant_rate_sustain_secs": 123,
"labels": {}
},
"created_at": "2023-11-07T05:31:56Z",
"default_priority": 123,
"notification_policy_slug": "<string>",
"priorities": [
{
"filters": [
{
"dataset_slug": "<string>",
"log_filter": {
"query": "<string>"
}
}
],
"priority": 123
}
],
"slug": "<string>",
"thresholds": [
{
"instant_rate": {
"fixed_value_per_sec": "<string>"
},
"volume": {
"fixed_value": "<string>"
}
}
],
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{}CreateConsumptionBudget
POST
/
api
/
v1
/
config
/
consumption-budgets
cURL
curl --request POST \
--url https://{tenant}.chronosphere.io/api/v1/config/consumption-budgets \
--header 'API-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '{}'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.chronosphere.io/api/v1/config/consumption-budgets"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{tenant}.chronosphere.io/api/v1/config/consumption-budgets")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();const options = {
method: 'POST',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://{tenant}.chronosphere.io/api/v1/config/consumption-budgets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{tenant}.chronosphere.io/api/v1/config/consumption-budgets"
payload = {}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"consumption_budget": {
"name": "<string>",
"partition_slug_path": "<string>",
"alert_action_config": {
"annotations": {},
"instant_rate_sustain_secs": 123,
"labels": {}
},
"created_at": "2023-11-07T05:31:56Z",
"default_priority": 123,
"notification_policy_slug": "<string>",
"priorities": [
{
"filters": [
{
"dataset_slug": "<string>",
"log_filter": {
"query": "<string>"
}
}
],
"priority": 123
}
],
"slug": "<string>",
"thresholds": [
{
"instant_rate": {
"fixed_value_per_sec": "<string>"
},
"volume": {
"fixed_value": "<string>"
}
}
],
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{}Authorizations
Chronosphere API token
Body
application/json
The ConsumptionBudget to create.
Show child attributes
Show child attributes
If true, validates the specified configuration without creating the ConsumptionBudget. If the specified configuration is valid, the endpoint returns a partial response without the ConsumptionBudget. If the specified configuration is invalid, the endpoint returns an error.
Response
A successful response containing the created ConsumptionBudget.
Show child attributes
Show child attributes
⌘I

