cURL
curl --request POST \
--url https://{tenant}.chronosphere.io/api/v1/config/services/{service_slug}/attributes \
--header 'API-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"dry_run": true,
"service_attribute": {
"description": "<string>",
"name": "<string>",
"notification_policy_slug": "<string>",
"service_slug": "<string>",
"team_slug": "<string>"
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.chronosphere.io/api/v1/config/services/{service_slug}/attributes"
payload := strings.NewReader("{\n \"dry_run\": true,\n \"service_attribute\": {\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"notification_policy_slug\": \"<string>\",\n \"service_slug\": \"<string>\",\n \"team_slug\": \"<string>\"\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/services/{service_slug}/attributes")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dry_run\": true,\n \"service_attribute\": {\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"notification_policy_slug\": \"<string>\",\n \"service_slug\": \"<string>\",\n \"team_slug\": \"<string>\"\n }\n}")
.asString();const options = {
method: 'POST',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dry_run: true,
service_attribute: {
description: '<string>',
name: '<string>',
notification_policy_slug: '<string>',
service_slug: '<string>',
team_slug: '<string>'
}
})
};
fetch('https://{tenant}.chronosphere.io/api/v1/config/services/{service_slug}/attributes', 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/services/{service_slug}/attributes"
payload = {
"dry_run": True,
"service_attribute": {
"description": "<string>",
"name": "<string>",
"notification_policy_slug": "<string>",
"service_slug": "<string>",
"team_slug": "<string>"
}
}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"service_attribute": {
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"name": "<string>",
"notification_policy_slug": "<string>",
"service_slug": "<string>",
"team_slug": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"service_slug": "<string>"
}{
"message": "<string>"
}POST
/
api
/
v1
/
config
/
services
/
{service_slug}
/
attributes
cURL
curl --request POST \
--url https://{tenant}.chronosphere.io/api/v1/config/services/{service_slug}/attributes \
--header 'API-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"dry_run": true,
"service_attribute": {
"description": "<string>",
"name": "<string>",
"notification_policy_slug": "<string>",
"service_slug": "<string>",
"team_slug": "<string>"
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.chronosphere.io/api/v1/config/services/{service_slug}/attributes"
payload := strings.NewReader("{\n \"dry_run\": true,\n \"service_attribute\": {\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"notification_policy_slug\": \"<string>\",\n \"service_slug\": \"<string>\",\n \"team_slug\": \"<string>\"\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/services/{service_slug}/attributes")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dry_run\": true,\n \"service_attribute\": {\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"notification_policy_slug\": \"<string>\",\n \"service_slug\": \"<string>\",\n \"team_slug\": \"<string>\"\n }\n}")
.asString();const options = {
method: 'POST',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dry_run: true,
service_attribute: {
description: '<string>',
name: '<string>',
notification_policy_slug: '<string>',
service_slug: '<string>',
team_slug: '<string>'
}
})
};
fetch('https://{tenant}.chronosphere.io/api/v1/config/services/{service_slug}/attributes', 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/services/{service_slug}/attributes"
payload = {
"dry_run": True,
"service_attribute": {
"description": "<string>",
"name": "<string>",
"notification_policy_slug": "<string>",
"service_slug": "<string>",
"team_slug": "<string>"
}
}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"service_attribute": {
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"name": "<string>",
"notification_policy_slug": "<string>",
"service_slug": "<string>",
"team_slug": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"service_slug": "<string>"
}{
"message": "<string>"
}⌘I

