Skip to main content
POST
/
api
/
v1
/
config
/
trace-behavior-config
cURL
curl --request POST \
  --url https://{tenant}.chronosphere.io/api/v1/config/trace-behavior-config \
  --header 'API-Token: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "dry_run": true,
  "trace_behavior_config": {
    "baseline_behavior_slug": "<string>",
    "dataset_priorities": [
      "<string>"
    ],
    "main_behavior_assignments": [
      {
        "behavior_slug": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "created_by": "<string>",
        "dataset_slug": "<string>",
        "description": "<string>",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "override_behavior_assignments": [
      {
        "behavior_slug": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "created_by": "<string>",
        "dataset_slug": "<string>",
        "description": "<string>",
        "end_time": "2023-11-07T05:31:56Z",
        "start_time": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "preview_behavior_assignments": [
      {
        "behavior_slug": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "created_by": "<string>",
        "dataset_slug": "<string>",
        "description": "<string>",
        "end_time": "2023-11-07T05:31:56Z",
        "start_time": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ]
  }
}
'
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://{tenant}.chronosphere.io/api/v1/config/trace-behavior-config"

payload := strings.NewReader("{\n \"dry_run\": true,\n \"trace_behavior_config\": {\n \"baseline_behavior_slug\": \"<string>\",\n \"dataset_priorities\": [\n \"<string>\"\n ],\n \"main_behavior_assignments\": [\n {\n \"behavior_slug\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"created_by\": \"<string>\",\n \"dataset_slug\": \"<string>\",\n \"description\": \"<string>\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"override_behavior_assignments\": [\n {\n \"behavior_slug\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"created_by\": \"<string>\",\n \"dataset_slug\": \"<string>\",\n \"description\": \"<string>\",\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"preview_behavior_assignments\": [\n {\n \"behavior_slug\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"created_by\": \"<string>\",\n \"dataset_slug\": \"<string>\",\n \"description\": \"<string>\",\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\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/trace-behavior-config")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dry_run\": true,\n \"trace_behavior_config\": {\n \"baseline_behavior_slug\": \"<string>\",\n \"dataset_priorities\": [\n \"<string>\"\n ],\n \"main_behavior_assignments\": [\n {\n \"behavior_slug\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"created_by\": \"<string>\",\n \"dataset_slug\": \"<string>\",\n \"description\": \"<string>\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"override_behavior_assignments\": [\n {\n \"behavior_slug\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"created_by\": \"<string>\",\n \"dataset_slug\": \"<string>\",\n \"description\": \"<string>\",\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"preview_behavior_assignments\": [\n {\n \"behavior_slug\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"created_by\": \"<string>\",\n \"dataset_slug\": \"<string>\",\n \"description\": \"<string>\",\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n}")
.asString();
const options = {
method: 'POST',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dry_run: true,
trace_behavior_config: {
baseline_behavior_slug: '<string>',
dataset_priorities: ['<string>'],
main_behavior_assignments: [
{
behavior_slug: '<string>',
created_at: '2023-11-07T05:31:56Z',
created_by: '<string>',
dataset_slug: '<string>',
description: '<string>',
updated_at: '2023-11-07T05:31:56Z'
}
],
override_behavior_assignments: [
{
behavior_slug: '<string>',
created_at: '2023-11-07T05:31:56Z',
created_by: '<string>',
dataset_slug: '<string>',
description: '<string>',
end_time: '2023-11-07T05:31:56Z',
start_time: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z'
}
],
preview_behavior_assignments: [
{
behavior_slug: '<string>',
created_at: '2023-11-07T05:31:56Z',
created_by: '<string>',
dataset_slug: '<string>',
description: '<string>',
end_time: '2023-11-07T05:31:56Z',
start_time: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z'
}
]
}
})
};

fetch('https://{tenant}.chronosphere.io/api/v1/config/trace-behavior-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/trace-behavior-config"

payload = {
"dry_run": True,
"trace_behavior_config": {
"baseline_behavior_slug": "<string>",
"dataset_priorities": ["<string>"],
"main_behavior_assignments": [
{
"behavior_slug": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"dataset_slug": "<string>",
"description": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"override_behavior_assignments": [
{
"behavior_slug": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"dataset_slug": "<string>",
"description": "<string>",
"end_time": "2023-11-07T05:31:56Z",
"start_time": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"preview_behavior_assignments": [
{
"behavior_slug": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"dataset_slug": "<string>",
"description": "<string>",
"end_time": "2023-11-07T05:31:56Z",
"start_time": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "trace_behavior_config": {
    "baseline_behavior_slug": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "dataset_priorities": [
      "<string>"
    ],
    "main_behavior_assignments": [
      {
        "behavior_slug": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "created_by": "<string>",
        "dataset_slug": "<string>",
        "description": "<string>",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "override_behavior_assignments": [
      {
        "behavior_slug": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "created_by": "<string>",
        "dataset_slug": "<string>",
        "description": "<string>",
        "end_time": "2023-11-07T05:31:56Z",
        "start_time": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "preview_behavior_assignments": [
      {
        "behavior_slug": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "created_by": "<string>",
        "dataset_slug": "<string>",
        "description": "<string>",
        "end_time": "2023-11-07T05:31:56Z",
        "start_time": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "updated_at": "2023-11-07T05:31:56Z"
  }
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{}

Authorizations

API-Token
string
header
required

Chronosphere API token

Body

application/json
dry_run
boolean

If true, validates the specified configuration without creating the TraceBehaviorConfig. If the specified configuration is valid, the endpoint returns a partial response without the TraceBehaviorConfig. If the specified configuration is invalid, the endpoint returns an error.

trace_behavior_config
object

The TraceBehaviorConfig to create.

Response

A successful response containing the created TraceBehaviorConfig.

trace_behavior_config
object

TraceBehaviorConfig is a singleton configuration object that specifies the configuration for trace behaviors.