cURL
curl --request POST \
--url https://{tenant}.chronosphere.io/api/v1/config/log-allocation-config \
--header 'API-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"dry_run": true,
"log_allocation_config": {
"dataset_allocations": [
{
"allocation": {
"percent_of_license": 123
},
"dataset_slug": "<string>",
"priorities": {
"high_priority_filters": [
{
"query": "<string>"
}
],
"low_priority_filters": [
{
"query": "<string>"
}
]
}
}
],
"default_dataset": {
"allocation": {
"percent_of_license": 123
},
"priorities": {
"high_priority_filters": [
{
"query": "<string>"
}
],
"low_priority_filters": [
{
"query": "<string>"
}
]
}
}
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.chronosphere.io/api/v1/config/log-allocation-config"
payload := strings.NewReader("{\n \"dry_run\": true,\n \"log_allocation_config\": {\n \"dataset_allocations\": [\n {\n \"allocation\": {\n \"percent_of_license\": 123\n },\n \"dataset_slug\": \"<string>\",\n \"priorities\": {\n \"high_priority_filters\": [\n {\n \"query\": \"<string>\"\n }\n ],\n \"low_priority_filters\": [\n {\n \"query\": \"<string>\"\n }\n ]\n }\n }\n ],\n \"default_dataset\": {\n \"allocation\": {\n \"percent_of_license\": 123\n },\n \"priorities\": {\n \"high_priority_filters\": [\n {\n \"query\": \"<string>\"\n }\n ],\n \"low_priority_filters\": [\n {\n \"query\": \"<string>\"\n }\n ]\n }\n }\n }\n}")
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/log-allocation-config")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dry_run\": true,\n \"log_allocation_config\": {\n \"dataset_allocations\": [\n {\n \"allocation\": {\n \"percent_of_license\": 123\n },\n \"dataset_slug\": \"<string>\",\n \"priorities\": {\n \"high_priority_filters\": [\n {\n \"query\": \"<string>\"\n }\n ],\n \"low_priority_filters\": [\n {\n \"query\": \"<string>\"\n }\n ]\n }\n }\n ],\n \"default_dataset\": {\n \"allocation\": {\n \"percent_of_license\": 123\n },\n \"priorities\": {\n \"high_priority_filters\": [\n {\n \"query\": \"<string>\"\n }\n ],\n \"low_priority_filters\": [\n {\n \"query\": \"<string>\"\n }\n ]\n }\n }\n }\n}")
.asString();const options = {
method: 'POST',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dry_run: true,
log_allocation_config: {
dataset_allocations: [
{
allocation: {percent_of_license: 123},
dataset_slug: '<string>',
priorities: {
high_priority_filters: [{query: '<string>'}],
low_priority_filters: [{query: '<string>'}]
}
}
],
default_dataset: {
allocation: {percent_of_license: 123},
priorities: {
high_priority_filters: [{query: '<string>'}],
low_priority_filters: [{query: '<string>'}]
}
}
}
})
};
fetch('https://{tenant}.chronosphere.io/api/v1/config/log-allocation-config', 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/log-allocation-config"
payload = {
"dry_run": True,
"log_allocation_config": {
"dataset_allocations": [
{
"allocation": { "percent_of_license": 123 },
"dataset_slug": "<string>",
"priorities": {
"high_priority_filters": [{ "query": "<string>" }],
"low_priority_filters": [{ "query": "<string>" }]
}
}
],
"default_dataset": {
"allocation": { "percent_of_license": 123 },
"priorities": {
"high_priority_filters": [{ "query": "<string>" }],
"low_priority_filters": [{ "query": "<string>" }]
}
}
}
}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"log_allocation_config": {
"created_at": "2023-11-07T05:31:56Z",
"dataset_allocations": [
{
"allocation": {
"percent_of_license": 123
},
"dataset_slug": "<string>",
"priorities": {
"high_priority_filters": [
{
"query": "<string>"
}
],
"low_priority_filters": [
{
"query": "<string>"
}
]
}
}
],
"default_dataset": {
"allocation": {
"percent_of_license": 123
},
"priorities": {
"high_priority_filters": [
{
"query": "<string>"
}
],
"low_priority_filters": [
{
"query": "<string>"
}
]
}
},
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{}CreateLogAllocationConfig
POST
/
api
/
v1
/
config
/
log-allocation-config
cURL
curl --request POST \
--url https://{tenant}.chronosphere.io/api/v1/config/log-allocation-config \
--header 'API-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"dry_run": true,
"log_allocation_config": {
"dataset_allocations": [
{
"allocation": {
"percent_of_license": 123
},
"dataset_slug": "<string>",
"priorities": {
"high_priority_filters": [
{
"query": "<string>"
}
],
"low_priority_filters": [
{
"query": "<string>"
}
]
}
}
],
"default_dataset": {
"allocation": {
"percent_of_license": 123
},
"priorities": {
"high_priority_filters": [
{
"query": "<string>"
}
],
"low_priority_filters": [
{
"query": "<string>"
}
]
}
}
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.chronosphere.io/api/v1/config/log-allocation-config"
payload := strings.NewReader("{\n \"dry_run\": true,\n \"log_allocation_config\": {\n \"dataset_allocations\": [\n {\n \"allocation\": {\n \"percent_of_license\": 123\n },\n \"dataset_slug\": \"<string>\",\n \"priorities\": {\n \"high_priority_filters\": [\n {\n \"query\": \"<string>\"\n }\n ],\n \"low_priority_filters\": [\n {\n \"query\": \"<string>\"\n }\n ]\n }\n }\n ],\n \"default_dataset\": {\n \"allocation\": {\n \"percent_of_license\": 123\n },\n \"priorities\": {\n \"high_priority_filters\": [\n {\n \"query\": \"<string>\"\n }\n ],\n \"low_priority_filters\": [\n {\n \"query\": \"<string>\"\n }\n ]\n }\n }\n }\n}")
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/log-allocation-config")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dry_run\": true,\n \"log_allocation_config\": {\n \"dataset_allocations\": [\n {\n \"allocation\": {\n \"percent_of_license\": 123\n },\n \"dataset_slug\": \"<string>\",\n \"priorities\": {\n \"high_priority_filters\": [\n {\n \"query\": \"<string>\"\n }\n ],\n \"low_priority_filters\": [\n {\n \"query\": \"<string>\"\n }\n ]\n }\n }\n ],\n \"default_dataset\": {\n \"allocation\": {\n \"percent_of_license\": 123\n },\n \"priorities\": {\n \"high_priority_filters\": [\n {\n \"query\": \"<string>\"\n }\n ],\n \"low_priority_filters\": [\n {\n \"query\": \"<string>\"\n }\n ]\n }\n }\n }\n}")
.asString();const options = {
method: 'POST',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dry_run: true,
log_allocation_config: {
dataset_allocations: [
{
allocation: {percent_of_license: 123},
dataset_slug: '<string>',
priorities: {
high_priority_filters: [{query: '<string>'}],
low_priority_filters: [{query: '<string>'}]
}
}
],
default_dataset: {
allocation: {percent_of_license: 123},
priorities: {
high_priority_filters: [{query: '<string>'}],
low_priority_filters: [{query: '<string>'}]
}
}
}
})
};
fetch('https://{tenant}.chronosphere.io/api/v1/config/log-allocation-config', 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/log-allocation-config"
payload = {
"dry_run": True,
"log_allocation_config": {
"dataset_allocations": [
{
"allocation": { "percent_of_license": 123 },
"dataset_slug": "<string>",
"priorities": {
"high_priority_filters": [{ "query": "<string>" }],
"low_priority_filters": [{ "query": "<string>" }]
}
}
],
"default_dataset": {
"allocation": { "percent_of_license": 123 },
"priorities": {
"high_priority_filters": [{ "query": "<string>" }],
"low_priority_filters": [{ "query": "<string>" }]
}
}
}
}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"log_allocation_config": {
"created_at": "2023-11-07T05:31:56Z",
"dataset_allocations": [
{
"allocation": {
"percent_of_license": 123
},
"dataset_slug": "<string>",
"priorities": {
"high_priority_filters": [
{
"query": "<string>"
}
],
"low_priority_filters": [
{
"query": "<string>"
}
]
}
}
],
"default_dataset": {
"allocation": {
"percent_of_license": 123
},
"priorities": {
"high_priority_filters": [
{
"query": "<string>"
}
],
"low_priority_filters": [
{
"query": "<string>"
}
]
}
},
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{}Authorizations
Chronosphere API token
Body
application/json
If true, validates the specified configuration without creating the LogAllocationConfig. If the specified configuration is valid, the endpoint returns a partial response without the LogAllocationConfig. If the specified configuration is invalid, the endpoint returns an error.
The LogAllocationConfig to create.
Show child attributes
Show child attributes
Response
A successful response containing the created LogAllocationConfig.
LogAllocationConfig is a singleton configuration object that specifies the configuration for Log budget allocations.
Show child attributes
Show child attributes
⌘I

