cURL
curl --request POST \
--url https://{tenant}.chronosphere.io/api/v1/config/otel-metrics-ingestion \
--header 'API-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"dry_run": true,
"otel_metrics_ingestion": {
"resource_attributes": {
"exclude_keys": [
"<string>"
],
"generate_target_info": true
}
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.chronosphere.io/api/v1/config/otel-metrics-ingestion"
payload := strings.NewReader("{\n \"dry_run\": true,\n \"otel_metrics_ingestion\": {\n \"resource_attributes\": {\n \"exclude_keys\": [\n \"<string>\"\n ],\n \"generate_target_info\": true\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/otel-metrics-ingestion")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dry_run\": true,\n \"otel_metrics_ingestion\": {\n \"resource_attributes\": {\n \"exclude_keys\": [\n \"<string>\"\n ],\n \"generate_target_info\": true\n }\n }\n}")
.asString();const options = {
method: 'POST',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dry_run: true,
otel_metrics_ingestion: {resource_attributes: {exclude_keys: ['<string>'], generate_target_info: true}}
})
};
fetch('https://{tenant}.chronosphere.io/api/v1/config/otel-metrics-ingestion', 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/otel-metrics-ingestion"
payload = {
"dry_run": True,
"otel_metrics_ingestion": { "resource_attributes": {
"exclude_keys": ["<string>"],
"generate_target_info": True
} }
}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"otel_metrics_ingestion": {
"created_at": "2023-11-07T05:31:56Z",
"resource_attributes": {
"exclude_keys": [
"<string>"
],
"generate_target_info": true
},
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{}CreateOtelMetricsIngestion
POST
/
api
/
v1
/
config
/
otel-metrics-ingestion
cURL
curl --request POST \
--url https://{tenant}.chronosphere.io/api/v1/config/otel-metrics-ingestion \
--header 'API-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"dry_run": true,
"otel_metrics_ingestion": {
"resource_attributes": {
"exclude_keys": [
"<string>"
],
"generate_target_info": true
}
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.chronosphere.io/api/v1/config/otel-metrics-ingestion"
payload := strings.NewReader("{\n \"dry_run\": true,\n \"otel_metrics_ingestion\": {\n \"resource_attributes\": {\n \"exclude_keys\": [\n \"<string>\"\n ],\n \"generate_target_info\": true\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/otel-metrics-ingestion")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dry_run\": true,\n \"otel_metrics_ingestion\": {\n \"resource_attributes\": {\n \"exclude_keys\": [\n \"<string>\"\n ],\n \"generate_target_info\": true\n }\n }\n}")
.asString();const options = {
method: 'POST',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dry_run: true,
otel_metrics_ingestion: {resource_attributes: {exclude_keys: ['<string>'], generate_target_info: true}}
})
};
fetch('https://{tenant}.chronosphere.io/api/v1/config/otel-metrics-ingestion', 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/otel-metrics-ingestion"
payload = {
"dry_run": True,
"otel_metrics_ingestion": { "resource_attributes": {
"exclude_keys": ["<string>"],
"generate_target_info": True
} }
}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"otel_metrics_ingestion": {
"created_at": "2023-11-07T05:31:56Z",
"resource_attributes": {
"exclude_keys": [
"<string>"
],
"generate_target_info": true
},
"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 OtelMetricsIngestion. If the specified configuration is valid, the endpoint returns a partial response without the OtelMetricsIngestion. If the specified configuration is invalid, the endpoint returns an error.
The OtelMetricsIngestion to create.
Show child attributes
Show child attributes
Response
A successful response containing the created OtelMetricsIngestion.
Show child attributes
Show child attributes
⌘I

