Create a new dashboard
curl --request POST \
--url https://api.coralogix.com/mgmt/openapi/4/dashboards/dashboards/v1 \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"dashboard": {
"layout": {
"sections": [
{
"id": {
"value": "<string>"
},
"options": {
"internal": {}
},
"rows": [
{
"appearance": {
"height": 123
},
"id": {
"value": "<string>"
},
"widgets": [
{
"appearance": {
"width": 123
},
"createdAt": "2023-11-07T05:31:56Z",
"definition": {
"hexagon": {
"customUnit": "<string>",
"decimal": 2,
"decimalPrecision": false,
"legend": {
"columns": [
1,
2,
6
],
"groupByQuery": true,
"isVisible": true
},
"max": 150000,
"min": 0,
"query": {
"spans": {
"filters": [
{
"field": {
"processTagField": "<string>"
},
"observationField": {
"keypath": [
"<string>"
]
},
"operator": {
"equals": {
"selection": {
"all": {}
}
}
}
}
],
"groupBy": [
{
"processTagField": "<string>"
}
],
"groupBys": [
{
"keypath": [
"<string>"
]
}
],
"luceneQuery": {
"value": "<string>"
},
"spansAggregation": {
"metricAggregation": {}
},
"timeFrame": {
"absoluteTimeFrame": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
}
}
}
},
"thresholds": [
{
"color": "<string>",
"from": 123,
"label": "<string>"
}
]
}
},
"description": "<string>",
"id": {
"value": "<string>"
},
"title": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
]
}
]
},
"name": "Example Name",
"absoluteTimeFrame": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"actions": [
{
"definition": {
"customAction": {
"url": "<string>"
}
},
"id": "<string>",
"name": "<string>",
"shouldOpenInNewWindow": true,
"widgetId": "<string>"
}
],
"annotations": [
{
"description": "<string>",
"enabled": true,
"id": "<string>",
"name": "<string>",
"scope": {
"allWidgets": {}
},
"source": {
"spans": {
"labelFields": [
{
"keypath": [
"<string>"
]
}
],
"luceneQuery": {
"value": "<string>"
},
"messageTemplate": "<string>",
"strategy": {
"instant": {
"timestampField": {
"keypath": [
"<string>"
]
}
}
}
}
}
}
],
"description": "Sample description",
"filters": [
{
"collapsed": true,
"displayName": "<string>",
"enabled": true,
"id": {
"value": "<string>"
},
"source": {
"logs": {
"field": "<string>",
"observationField": {
"keypath": [
"<string>"
]
},
"operator": {
"equals": {
"selection": {
"all": {}
}
}
}
}
}
}
],
"folderId": {
"value": "<string>"
},
"folderPath": {
"segments": [
"<string>"
]
},
"id": "GZLHSeqelCbD3I7HbIDtL",
"off": {},
"slugName": "system-health-monitoring",
"variables": [
{
"definition": {
"constant": {
"value": "<string>"
}
},
"description": "<string>",
"displayName": "<string>",
"name": "<string>"
}
],
"variablesV2": [
{
"description": "<string>",
"displayFullRow": true,
"displayName": "<string>",
"id": {
"value": "<string>"
},
"name": "<string>",
"source": {
"static": {
"allOption": {
"includeAll": true,
"label": "<string>"
},
"values": [
{
"isDefault": true,
"label": "<string>",
"value": "<string>"
}
]
}
},
"value": {
"multiString": {
"all": {}
}
}
}
]
},
"requestId": "<string>",
"isLocked": true
}
'import requests
url = "https://api.coralogix.com/mgmt/openapi/4/dashboards/dashboards/v1"
payload = {
"dashboard": {
"layout": { "sections": [
{
"id": { "value": "<string>" },
"options": { "internal": {} },
"rows": [
{
"appearance": { "height": 123 },
"id": { "value": "<string>" },
"widgets": [
{
"appearance": { "width": 123 },
"createdAt": "2023-11-07T05:31:56Z",
"definition": { "hexagon": {
"customUnit": "<string>",
"decimal": 2,
"decimalPrecision": False,
"legend": {
"columns": [1, 2, 6],
"groupByQuery": True,
"isVisible": True
},
"max": 150000,
"min": 0,
"query": { "spans": {
"filters": [
{
"field": { "processTagField": "<string>" },
"observationField": { "keypath": ["<string>"] },
"operator": { "equals": { "selection": { "all": {} } } }
}
],
"groupBy": [{ "processTagField": "<string>" }],
"groupBys": [{ "keypath": ["<string>"] }],
"luceneQuery": { "value": "<string>" },
"spansAggregation": { "metricAggregation": {} },
"timeFrame": { "absoluteTimeFrame": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
} }
} },
"thresholds": [
{
"color": "<string>",
"from": 123,
"label": "<string>"
}
]
} },
"description": "<string>",
"id": { "value": "<string>" },
"title": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
]
}
] },
"name": "Example Name",
"absoluteTimeFrame": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"actions": [
{
"definition": { "customAction": { "url": "<string>" } },
"id": "<string>",
"name": "<string>",
"shouldOpenInNewWindow": True,
"widgetId": "<string>"
}
],
"annotations": [
{
"description": "<string>",
"enabled": True,
"id": "<string>",
"name": "<string>",
"scope": { "allWidgets": {} },
"source": { "spans": {
"labelFields": [{ "keypath": ["<string>"] }],
"luceneQuery": { "value": "<string>" },
"messageTemplate": "<string>",
"strategy": { "instant": { "timestampField": { "keypath": ["<string>"] } } }
} }
}
],
"description": "Sample description",
"filters": [
{
"collapsed": True,
"displayName": "<string>",
"enabled": True,
"id": { "value": "<string>" },
"source": { "logs": {
"field": "<string>",
"observationField": { "keypath": ["<string>"] },
"operator": { "equals": { "selection": { "all": {} } } }
} }
}
],
"folderId": { "value": "<string>" },
"folderPath": { "segments": ["<string>"] },
"id": "GZLHSeqelCbD3I7HbIDtL",
"off": {},
"slugName": "system-health-monitoring",
"variables": [
{
"definition": { "constant": { "value": "<string>" } },
"description": "<string>",
"displayName": "<string>",
"name": "<string>"
}
],
"variablesV2": [
{
"description": "<string>",
"displayFullRow": True,
"displayName": "<string>",
"id": { "value": "<string>" },
"name": "<string>",
"source": { "static": {
"allOption": {
"includeAll": True,
"label": "<string>"
},
"values": [
{
"isDefault": True,
"label": "<string>",
"value": "<string>"
}
]
} },
"value": { "multiString": { "all": {} } }
}
]
},
"requestId": "<string>",
"isLocked": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dashboard: {
layout: {
sections: [
{
id: {value: '<string>'},
options: {internal: {}},
rows: [
{
appearance: {height: 123},
id: {value: '<string>'},
widgets: [
{
appearance: {width: 123},
createdAt: '2023-11-07T05:31:56Z',
definition: {
hexagon: {
customUnit: '<string>',
decimal: 2,
decimalPrecision: false,
legend: {columns: [1, 2, 6], groupByQuery: true, isVisible: true},
max: 150000,
min: 0,
query: {
spans: {
filters: [
{
field: {processTagField: '<string>'},
observationField: {keypath: ['<string>']},
operator: {equals: {selection: {all: {}}}}
}
],
groupBy: [{processTagField: '<string>'}],
groupBys: [{keypath: ['<string>']}],
luceneQuery: {value: '<string>'},
spansAggregation: {metricAggregation: {}},
timeFrame: {absoluteTimeFrame: {from: '2023-11-07T05:31:56Z', to: '2023-11-07T05:31:56Z'}}
}
},
thresholds: [{color: '<string>', from: 123, label: '<string>'}]
}
},
description: '<string>',
id: {value: '<string>'},
title: '<string>',
updatedAt: '2023-11-07T05:31:56Z'
}
]
}
]
}
]
},
name: 'Example Name',
absoluteTimeFrame: {from: '2023-11-07T05:31:56Z', to: '2023-11-07T05:31:56Z'},
actions: [
{
definition: {customAction: {url: '<string>'}},
id: '<string>',
name: '<string>',
shouldOpenInNewWindow: true,
widgetId: '<string>'
}
],
annotations: [
{
description: '<string>',
enabled: true,
id: '<string>',
name: '<string>',
scope: {allWidgets: {}},
source: {
spans: {
labelFields: [{keypath: ['<string>']}],
luceneQuery: {value: '<string>'},
messageTemplate: '<string>',
strategy: {instant: {timestampField: {keypath: ['<string>']}}}
}
}
}
],
description: 'Sample description',
filters: [
{
collapsed: true,
displayName: '<string>',
enabled: true,
id: {value: '<string>'},
source: {
logs: {
field: '<string>',
observationField: {keypath: ['<string>']},
operator: {equals: {selection: {all: {}}}}
}
}
}
],
folderId: {value: '<string>'},
folderPath: {segments: ['<string>']},
id: 'GZLHSeqelCbD3I7HbIDtL',
off: {},
slugName: 'system-health-monitoring',
variables: [
{
definition: {constant: {value: '<string>'}},
description: '<string>',
displayName: '<string>',
name: '<string>'
}
],
variablesV2: [
{
description: '<string>',
displayFullRow: true,
displayName: '<string>',
id: {value: '<string>'},
name: '<string>',
source: {
static: {
allOption: {includeAll: true, label: '<string>'},
values: [{isDefault: true, label: '<string>', value: '<string>'}]
}
},
value: {multiString: {all: {}}}
}
]
},
requestId: '<string>',
isLocked: true
})
};
fetch('https://api.coralogix.com/mgmt/openapi/4/dashboards/dashboards/v1', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coralogix.com/mgmt/openapi/4/dashboards/dashboards/v1",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dashboard' => [
'layout' => [
'sections' => [
[
'id' => [
'value' => '<string>'
],
'options' => [
'internal' => [
]
],
'rows' => [
[
'appearance' => [
'height' => 123
],
'id' => [
'value' => '<string>'
],
'widgets' => [
[
'appearance' => [
'width' => 123
],
'createdAt' => '2023-11-07T05:31:56Z',
'definition' => [
'hexagon' => [
'customUnit' => '<string>',
'decimal' => 2,
'decimalPrecision' => false,
'legend' => [
'columns' => [
1,
2,
6
],
'groupByQuery' => true,
'isVisible' => true
],
'max' => 150000,
'min' => 0,
'query' => [
'spans' => [
'filters' => [
[
'field' => [
'processTagField' => '<string>'
],
'observationField' => [
'keypath' => [
'<string>'
]
],
'operator' => [
'equals' => [
'selection' => [
'all' => [
]
]
]
]
]
],
'groupBy' => [
[
'processTagField' => '<string>'
]
],
'groupBys' => [
[
'keypath' => [
'<string>'
]
]
],
'luceneQuery' => [
'value' => '<string>'
],
'spansAggregation' => [
'metricAggregation' => [
]
],
'timeFrame' => [
'absoluteTimeFrame' => [
'from' => '2023-11-07T05:31:56Z',
'to' => '2023-11-07T05:31:56Z'
]
]
]
],
'thresholds' => [
[
'color' => '<string>',
'from' => 123,
'label' => '<string>'
]
]
]
],
'description' => '<string>',
'id' => [
'value' => '<string>'
],
'title' => '<string>',
'updatedAt' => '2023-11-07T05:31:56Z'
]
]
]
]
]
]
],
'name' => 'Example Name',
'absoluteTimeFrame' => [
'from' => '2023-11-07T05:31:56Z',
'to' => '2023-11-07T05:31:56Z'
],
'actions' => [
[
'definition' => [
'customAction' => [
'url' => '<string>'
]
],
'id' => '<string>',
'name' => '<string>',
'shouldOpenInNewWindow' => true,
'widgetId' => '<string>'
]
],
'annotations' => [
[
'description' => '<string>',
'enabled' => true,
'id' => '<string>',
'name' => '<string>',
'scope' => [
'allWidgets' => [
]
],
'source' => [
'spans' => [
'labelFields' => [
[
'keypath' => [
'<string>'
]
]
],
'luceneQuery' => [
'value' => '<string>'
],
'messageTemplate' => '<string>',
'strategy' => [
'instant' => [
'timestampField' => [
'keypath' => [
'<string>'
]
]
]
]
]
]
]
],
'description' => 'Sample description',
'filters' => [
[
'collapsed' => true,
'displayName' => '<string>',
'enabled' => true,
'id' => [
'value' => '<string>'
],
'source' => [
'logs' => [
'field' => '<string>',
'observationField' => [
'keypath' => [
'<string>'
]
],
'operator' => [
'equals' => [
'selection' => [
'all' => [
]
]
]
]
]
]
]
],
'folderId' => [
'value' => '<string>'
],
'folderPath' => [
'segments' => [
'<string>'
]
],
'id' => 'GZLHSeqelCbD3I7HbIDtL',
'off' => [
],
'slugName' => 'system-health-monitoring',
'variables' => [
[
'definition' => [
'constant' => [
'value' => '<string>'
]
],
'description' => '<string>',
'displayName' => '<string>',
'name' => '<string>'
]
],
'variablesV2' => [
[
'description' => '<string>',
'displayFullRow' => true,
'displayName' => '<string>',
'id' => [
'value' => '<string>'
],
'name' => '<string>',
'source' => [
'static' => [
'allOption' => [
'includeAll' => true,
'label' => '<string>'
],
'values' => [
[
'isDefault' => true,
'label' => '<string>',
'value' => '<string>'
]
]
]
],
'value' => [
'multiString' => [
'all' => [
]
]
]
]
]
],
'requestId' => '<string>',
'isLocked' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coralogix.com/mgmt/openapi/4/dashboards/dashboards/v1"
payload := strings.NewReader("{\n \"dashboard\": {\n \"layout\": {\n \"sections\": [\n {\n \"id\": {\n \"value\": \"<string>\"\n },\n \"options\": {\n \"internal\": {}\n },\n \"rows\": [\n {\n \"appearance\": {\n \"height\": 123\n },\n \"id\": {\n \"value\": \"<string>\"\n },\n \"widgets\": [\n {\n \"appearance\": {\n \"width\": 123\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"definition\": {\n \"hexagon\": {\n \"customUnit\": \"<string>\",\n \"decimal\": 2,\n \"decimalPrecision\": false,\n \"legend\": {\n \"columns\": [\n 1,\n 2,\n 6\n ],\n \"groupByQuery\": true,\n \"isVisible\": true\n },\n \"max\": 150000,\n \"min\": 0,\n \"query\": {\n \"spans\": {\n \"filters\": [\n {\n \"field\": {\n \"processTagField\": \"<string>\"\n },\n \"observationField\": {\n \"keypath\": [\n \"<string>\"\n ]\n },\n \"operator\": {\n \"equals\": {\n \"selection\": {\n \"all\": {}\n }\n }\n }\n }\n ],\n \"groupBy\": [\n {\n \"processTagField\": \"<string>\"\n }\n ],\n \"groupBys\": [\n {\n \"keypath\": [\n \"<string>\"\n ]\n }\n ],\n \"luceneQuery\": {\n \"value\": \"<string>\"\n },\n \"spansAggregation\": {\n \"metricAggregation\": {}\n },\n \"timeFrame\": {\n \"absoluteTimeFrame\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n }\n }\n }\n },\n \"thresholds\": [\n {\n \"color\": \"<string>\",\n \"from\": 123,\n \"label\": \"<string>\"\n }\n ]\n }\n },\n \"description\": \"<string>\",\n \"id\": {\n \"value\": \"<string>\"\n },\n \"title\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n ]\n }\n ]\n },\n \"name\": \"Example Name\",\n \"absoluteTimeFrame\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n },\n \"actions\": [\n {\n \"definition\": {\n \"customAction\": {\n \"url\": \"<string>\"\n }\n },\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"shouldOpenInNewWindow\": true,\n \"widgetId\": \"<string>\"\n }\n ],\n \"annotations\": [\n {\n \"description\": \"<string>\",\n \"enabled\": true,\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"scope\": {\n \"allWidgets\": {}\n },\n \"source\": {\n \"spans\": {\n \"labelFields\": [\n {\n \"keypath\": [\n \"<string>\"\n ]\n }\n ],\n \"luceneQuery\": {\n \"value\": \"<string>\"\n },\n \"messageTemplate\": \"<string>\",\n \"strategy\": {\n \"instant\": {\n \"timestampField\": {\n \"keypath\": [\n \"<string>\"\n ]\n }\n }\n }\n }\n }\n }\n ],\n \"description\": \"Sample description\",\n \"filters\": [\n {\n \"collapsed\": true,\n \"displayName\": \"<string>\",\n \"enabled\": true,\n \"id\": {\n \"value\": \"<string>\"\n },\n \"source\": {\n \"logs\": {\n \"field\": \"<string>\",\n \"observationField\": {\n \"keypath\": [\n \"<string>\"\n ]\n },\n \"operator\": {\n \"equals\": {\n \"selection\": {\n \"all\": {}\n }\n }\n }\n }\n }\n }\n ],\n \"folderId\": {\n \"value\": \"<string>\"\n },\n \"folderPath\": {\n \"segments\": [\n \"<string>\"\n ]\n },\n \"id\": \"GZLHSeqelCbD3I7HbIDtL\",\n \"off\": {},\n \"slugName\": \"system-health-monitoring\",\n \"variables\": [\n {\n \"definition\": {\n \"constant\": {\n \"value\": \"<string>\"\n }\n },\n \"description\": \"<string>\",\n \"displayName\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"variablesV2\": [\n {\n \"description\": \"<string>\",\n \"displayFullRow\": true,\n \"displayName\": \"<string>\",\n \"id\": {\n \"value\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"source\": {\n \"static\": {\n \"allOption\": {\n \"includeAll\": true,\n \"label\": \"<string>\"\n },\n \"values\": [\n {\n \"isDefault\": true,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n },\n \"value\": {\n \"multiString\": {\n \"all\": {}\n }\n }\n }\n ]\n },\n \"requestId\": \"<string>\",\n \"isLocked\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://api.coralogix.com/mgmt/openapi/4/dashboards/dashboards/v1")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dashboard\": {\n \"layout\": {\n \"sections\": [\n {\n \"id\": {\n \"value\": \"<string>\"\n },\n \"options\": {\n \"internal\": {}\n },\n \"rows\": [\n {\n \"appearance\": {\n \"height\": 123\n },\n \"id\": {\n \"value\": \"<string>\"\n },\n \"widgets\": [\n {\n \"appearance\": {\n \"width\": 123\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"definition\": {\n \"hexagon\": {\n \"customUnit\": \"<string>\",\n \"decimal\": 2,\n \"decimalPrecision\": false,\n \"legend\": {\n \"columns\": [\n 1,\n 2,\n 6\n ],\n \"groupByQuery\": true,\n \"isVisible\": true\n },\n \"max\": 150000,\n \"min\": 0,\n \"query\": {\n \"spans\": {\n \"filters\": [\n {\n \"field\": {\n \"processTagField\": \"<string>\"\n },\n \"observationField\": {\n \"keypath\": [\n \"<string>\"\n ]\n },\n \"operator\": {\n \"equals\": {\n \"selection\": {\n \"all\": {}\n }\n }\n }\n }\n ],\n \"groupBy\": [\n {\n \"processTagField\": \"<string>\"\n }\n ],\n \"groupBys\": [\n {\n \"keypath\": [\n \"<string>\"\n ]\n }\n ],\n \"luceneQuery\": {\n \"value\": \"<string>\"\n },\n \"spansAggregation\": {\n \"metricAggregation\": {}\n },\n \"timeFrame\": {\n \"absoluteTimeFrame\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n }\n }\n }\n },\n \"thresholds\": [\n {\n \"color\": \"<string>\",\n \"from\": 123,\n \"label\": \"<string>\"\n }\n ]\n }\n },\n \"description\": \"<string>\",\n \"id\": {\n \"value\": \"<string>\"\n },\n \"title\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n ]\n }\n ]\n },\n \"name\": \"Example Name\",\n \"absoluteTimeFrame\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n },\n \"actions\": [\n {\n \"definition\": {\n \"customAction\": {\n \"url\": \"<string>\"\n }\n },\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"shouldOpenInNewWindow\": true,\n \"widgetId\": \"<string>\"\n }\n ],\n \"annotations\": [\n {\n \"description\": \"<string>\",\n \"enabled\": true,\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"scope\": {\n \"allWidgets\": {}\n },\n \"source\": {\n \"spans\": {\n \"labelFields\": [\n {\n \"keypath\": [\n \"<string>\"\n ]\n }\n ],\n \"luceneQuery\": {\n \"value\": \"<string>\"\n },\n \"messageTemplate\": \"<string>\",\n \"strategy\": {\n \"instant\": {\n \"timestampField\": {\n \"keypath\": [\n \"<string>\"\n ]\n }\n }\n }\n }\n }\n }\n ],\n \"description\": \"Sample description\",\n \"filters\": [\n {\n \"collapsed\": true,\n \"displayName\": \"<string>\",\n \"enabled\": true,\n \"id\": {\n \"value\": \"<string>\"\n },\n \"source\": {\n \"logs\": {\n \"field\": \"<string>\",\n \"observationField\": {\n \"keypath\": [\n \"<string>\"\n ]\n },\n \"operator\": {\n \"equals\": {\n \"selection\": {\n \"all\": {}\n }\n }\n }\n }\n }\n }\n ],\n \"folderId\": {\n \"value\": \"<string>\"\n },\n \"folderPath\": {\n \"segments\": [\n \"<string>\"\n ]\n },\n \"id\": \"GZLHSeqelCbD3I7HbIDtL\",\n \"off\": {},\n \"slugName\": \"system-health-monitoring\",\n \"variables\": [\n {\n \"definition\": {\n \"constant\": {\n \"value\": \"<string>\"\n }\n },\n \"description\": \"<string>\",\n \"displayName\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"variablesV2\": [\n {\n \"description\": \"<string>\",\n \"displayFullRow\": true,\n \"displayName\": \"<string>\",\n \"id\": {\n \"value\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"source\": {\n \"static\": {\n \"allOption\": {\n \"includeAll\": true,\n \"label\": \"<string>\"\n },\n \"values\": [\n {\n \"isDefault\": true,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n },\n \"value\": {\n \"multiString\": {\n \"all\": {}\n }\n }\n }\n ]\n },\n \"requestId\": \"<string>\",\n \"isLocked\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coralogix.com/mgmt/openapi/4/dashboards/dashboards/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dashboard\": {\n \"layout\": {\n \"sections\": [\n {\n \"id\": {\n \"value\": \"<string>\"\n },\n \"options\": {\n \"internal\": {}\n },\n \"rows\": [\n {\n \"appearance\": {\n \"height\": 123\n },\n \"id\": {\n \"value\": \"<string>\"\n },\n \"widgets\": [\n {\n \"appearance\": {\n \"width\": 123\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"definition\": {\n \"hexagon\": {\n \"customUnit\": \"<string>\",\n \"decimal\": 2,\n \"decimalPrecision\": false,\n \"legend\": {\n \"columns\": [\n 1,\n 2,\n 6\n ],\n \"groupByQuery\": true,\n \"isVisible\": true\n },\n \"max\": 150000,\n \"min\": 0,\n \"query\": {\n \"spans\": {\n \"filters\": [\n {\n \"field\": {\n \"processTagField\": \"<string>\"\n },\n \"observationField\": {\n \"keypath\": [\n \"<string>\"\n ]\n },\n \"operator\": {\n \"equals\": {\n \"selection\": {\n \"all\": {}\n }\n }\n }\n }\n ],\n \"groupBy\": [\n {\n \"processTagField\": \"<string>\"\n }\n ],\n \"groupBys\": [\n {\n \"keypath\": [\n \"<string>\"\n ]\n }\n ],\n \"luceneQuery\": {\n \"value\": \"<string>\"\n },\n \"spansAggregation\": {\n \"metricAggregation\": {}\n },\n \"timeFrame\": {\n \"absoluteTimeFrame\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n }\n }\n }\n },\n \"thresholds\": [\n {\n \"color\": \"<string>\",\n \"from\": 123,\n \"label\": \"<string>\"\n }\n ]\n }\n },\n \"description\": \"<string>\",\n \"id\": {\n \"value\": \"<string>\"\n },\n \"title\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n ]\n }\n ]\n },\n \"name\": \"Example Name\",\n \"absoluteTimeFrame\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n },\n \"actions\": [\n {\n \"definition\": {\n \"customAction\": {\n \"url\": \"<string>\"\n }\n },\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"shouldOpenInNewWindow\": true,\n \"widgetId\": \"<string>\"\n }\n ],\n \"annotations\": [\n {\n \"description\": \"<string>\",\n \"enabled\": true,\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"scope\": {\n \"allWidgets\": {}\n },\n \"source\": {\n \"spans\": {\n \"labelFields\": [\n {\n \"keypath\": [\n \"<string>\"\n ]\n }\n ],\n \"luceneQuery\": {\n \"value\": \"<string>\"\n },\n \"messageTemplate\": \"<string>\",\n \"strategy\": {\n \"instant\": {\n \"timestampField\": {\n \"keypath\": [\n \"<string>\"\n ]\n }\n }\n }\n }\n }\n }\n ],\n \"description\": \"Sample description\",\n \"filters\": [\n {\n \"collapsed\": true,\n \"displayName\": \"<string>\",\n \"enabled\": true,\n \"id\": {\n \"value\": \"<string>\"\n },\n \"source\": {\n \"logs\": {\n \"field\": \"<string>\",\n \"observationField\": {\n \"keypath\": [\n \"<string>\"\n ]\n },\n \"operator\": {\n \"equals\": {\n \"selection\": {\n \"all\": {}\n }\n }\n }\n }\n }\n }\n ],\n \"folderId\": {\n \"value\": \"<string>\"\n },\n \"folderPath\": {\n \"segments\": [\n \"<string>\"\n ]\n },\n \"id\": \"GZLHSeqelCbD3I7HbIDtL\",\n \"off\": {},\n \"slugName\": \"system-health-monitoring\",\n \"variables\": [\n {\n \"definition\": {\n \"constant\": {\n \"value\": \"<string>\"\n }\n },\n \"description\": \"<string>\",\n \"displayName\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"variablesV2\": [\n {\n \"description\": \"<string>\",\n \"displayFullRow\": true,\n \"displayName\": \"<string>\",\n \"id\": {\n \"value\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"source\": {\n \"static\": {\n \"allOption\": {\n \"includeAll\": true,\n \"label\": \"<string>\"\n },\n \"values\": [\n {\n \"isDefault\": true,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n },\n \"value\": {\n \"multiString\": {\n \"all\": {}\n }\n }\n }\n ]\n },\n \"requestId\": \"<string>\",\n \"isLocked\": true\n}"
response = http.request(request)
puts response.read_body{
"dashboardId": "<string>"
}Dashboard Service
Create a new dashboard
No description available
Create a new dashboard
curl --request POST \
--url https://api.coralogix.com/mgmt/openapi/4/dashboards/dashboards/v1 \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"dashboard": {
"layout": {
"sections": [
{
"id": {
"value": "<string>"
},
"options": {
"internal": {}
},
"rows": [
{
"appearance": {
"height": 123
},
"id": {
"value": "<string>"
},
"widgets": [
{
"appearance": {
"width": 123
},
"createdAt": "2023-11-07T05:31:56Z",
"definition": {
"hexagon": {
"customUnit": "<string>",
"decimal": 2,
"decimalPrecision": false,
"legend": {
"columns": [
1,
2,
6
],
"groupByQuery": true,
"isVisible": true
},
"max": 150000,
"min": 0,
"query": {
"spans": {
"filters": [
{
"field": {
"processTagField": "<string>"
},
"observationField": {
"keypath": [
"<string>"
]
},
"operator": {
"equals": {
"selection": {
"all": {}
}
}
}
}
],
"groupBy": [
{
"processTagField": "<string>"
}
],
"groupBys": [
{
"keypath": [
"<string>"
]
}
],
"luceneQuery": {
"value": "<string>"
},
"spansAggregation": {
"metricAggregation": {}
},
"timeFrame": {
"absoluteTimeFrame": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
}
}
}
},
"thresholds": [
{
"color": "<string>",
"from": 123,
"label": "<string>"
}
]
}
},
"description": "<string>",
"id": {
"value": "<string>"
},
"title": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
]
}
]
},
"name": "Example Name",
"absoluteTimeFrame": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"actions": [
{
"definition": {
"customAction": {
"url": "<string>"
}
},
"id": "<string>",
"name": "<string>",
"shouldOpenInNewWindow": true,
"widgetId": "<string>"
}
],
"annotations": [
{
"description": "<string>",
"enabled": true,
"id": "<string>",
"name": "<string>",
"scope": {
"allWidgets": {}
},
"source": {
"spans": {
"labelFields": [
{
"keypath": [
"<string>"
]
}
],
"luceneQuery": {
"value": "<string>"
},
"messageTemplate": "<string>",
"strategy": {
"instant": {
"timestampField": {
"keypath": [
"<string>"
]
}
}
}
}
}
}
],
"description": "Sample description",
"filters": [
{
"collapsed": true,
"displayName": "<string>",
"enabled": true,
"id": {
"value": "<string>"
},
"source": {
"logs": {
"field": "<string>",
"observationField": {
"keypath": [
"<string>"
]
},
"operator": {
"equals": {
"selection": {
"all": {}
}
}
}
}
}
}
],
"folderId": {
"value": "<string>"
},
"folderPath": {
"segments": [
"<string>"
]
},
"id": "GZLHSeqelCbD3I7HbIDtL",
"off": {},
"slugName": "system-health-monitoring",
"variables": [
{
"definition": {
"constant": {
"value": "<string>"
}
},
"description": "<string>",
"displayName": "<string>",
"name": "<string>"
}
],
"variablesV2": [
{
"description": "<string>",
"displayFullRow": true,
"displayName": "<string>",
"id": {
"value": "<string>"
},
"name": "<string>",
"source": {
"static": {
"allOption": {
"includeAll": true,
"label": "<string>"
},
"values": [
{
"isDefault": true,
"label": "<string>",
"value": "<string>"
}
]
}
},
"value": {
"multiString": {
"all": {}
}
}
}
]
},
"requestId": "<string>",
"isLocked": true
}
'import requests
url = "https://api.coralogix.com/mgmt/openapi/4/dashboards/dashboards/v1"
payload = {
"dashboard": {
"layout": { "sections": [
{
"id": { "value": "<string>" },
"options": { "internal": {} },
"rows": [
{
"appearance": { "height": 123 },
"id": { "value": "<string>" },
"widgets": [
{
"appearance": { "width": 123 },
"createdAt": "2023-11-07T05:31:56Z",
"definition": { "hexagon": {
"customUnit": "<string>",
"decimal": 2,
"decimalPrecision": False,
"legend": {
"columns": [1, 2, 6],
"groupByQuery": True,
"isVisible": True
},
"max": 150000,
"min": 0,
"query": { "spans": {
"filters": [
{
"field": { "processTagField": "<string>" },
"observationField": { "keypath": ["<string>"] },
"operator": { "equals": { "selection": { "all": {} } } }
}
],
"groupBy": [{ "processTagField": "<string>" }],
"groupBys": [{ "keypath": ["<string>"] }],
"luceneQuery": { "value": "<string>" },
"spansAggregation": { "metricAggregation": {} },
"timeFrame": { "absoluteTimeFrame": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
} }
} },
"thresholds": [
{
"color": "<string>",
"from": 123,
"label": "<string>"
}
]
} },
"description": "<string>",
"id": { "value": "<string>" },
"title": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
]
}
] },
"name": "Example Name",
"absoluteTimeFrame": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"actions": [
{
"definition": { "customAction": { "url": "<string>" } },
"id": "<string>",
"name": "<string>",
"shouldOpenInNewWindow": True,
"widgetId": "<string>"
}
],
"annotations": [
{
"description": "<string>",
"enabled": True,
"id": "<string>",
"name": "<string>",
"scope": { "allWidgets": {} },
"source": { "spans": {
"labelFields": [{ "keypath": ["<string>"] }],
"luceneQuery": { "value": "<string>" },
"messageTemplate": "<string>",
"strategy": { "instant": { "timestampField": { "keypath": ["<string>"] } } }
} }
}
],
"description": "Sample description",
"filters": [
{
"collapsed": True,
"displayName": "<string>",
"enabled": True,
"id": { "value": "<string>" },
"source": { "logs": {
"field": "<string>",
"observationField": { "keypath": ["<string>"] },
"operator": { "equals": { "selection": { "all": {} } } }
} }
}
],
"folderId": { "value": "<string>" },
"folderPath": { "segments": ["<string>"] },
"id": "GZLHSeqelCbD3I7HbIDtL",
"off": {},
"slugName": "system-health-monitoring",
"variables": [
{
"definition": { "constant": { "value": "<string>" } },
"description": "<string>",
"displayName": "<string>",
"name": "<string>"
}
],
"variablesV2": [
{
"description": "<string>",
"displayFullRow": True,
"displayName": "<string>",
"id": { "value": "<string>" },
"name": "<string>",
"source": { "static": {
"allOption": {
"includeAll": True,
"label": "<string>"
},
"values": [
{
"isDefault": True,
"label": "<string>",
"value": "<string>"
}
]
} },
"value": { "multiString": { "all": {} } }
}
]
},
"requestId": "<string>",
"isLocked": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dashboard: {
layout: {
sections: [
{
id: {value: '<string>'},
options: {internal: {}},
rows: [
{
appearance: {height: 123},
id: {value: '<string>'},
widgets: [
{
appearance: {width: 123},
createdAt: '2023-11-07T05:31:56Z',
definition: {
hexagon: {
customUnit: '<string>',
decimal: 2,
decimalPrecision: false,
legend: {columns: [1, 2, 6], groupByQuery: true, isVisible: true},
max: 150000,
min: 0,
query: {
spans: {
filters: [
{
field: {processTagField: '<string>'},
observationField: {keypath: ['<string>']},
operator: {equals: {selection: {all: {}}}}
}
],
groupBy: [{processTagField: '<string>'}],
groupBys: [{keypath: ['<string>']}],
luceneQuery: {value: '<string>'},
spansAggregation: {metricAggregation: {}},
timeFrame: {absoluteTimeFrame: {from: '2023-11-07T05:31:56Z', to: '2023-11-07T05:31:56Z'}}
}
},
thresholds: [{color: '<string>', from: 123, label: '<string>'}]
}
},
description: '<string>',
id: {value: '<string>'},
title: '<string>',
updatedAt: '2023-11-07T05:31:56Z'
}
]
}
]
}
]
},
name: 'Example Name',
absoluteTimeFrame: {from: '2023-11-07T05:31:56Z', to: '2023-11-07T05:31:56Z'},
actions: [
{
definition: {customAction: {url: '<string>'}},
id: '<string>',
name: '<string>',
shouldOpenInNewWindow: true,
widgetId: '<string>'
}
],
annotations: [
{
description: '<string>',
enabled: true,
id: '<string>',
name: '<string>',
scope: {allWidgets: {}},
source: {
spans: {
labelFields: [{keypath: ['<string>']}],
luceneQuery: {value: '<string>'},
messageTemplate: '<string>',
strategy: {instant: {timestampField: {keypath: ['<string>']}}}
}
}
}
],
description: 'Sample description',
filters: [
{
collapsed: true,
displayName: '<string>',
enabled: true,
id: {value: '<string>'},
source: {
logs: {
field: '<string>',
observationField: {keypath: ['<string>']},
operator: {equals: {selection: {all: {}}}}
}
}
}
],
folderId: {value: '<string>'},
folderPath: {segments: ['<string>']},
id: 'GZLHSeqelCbD3I7HbIDtL',
off: {},
slugName: 'system-health-monitoring',
variables: [
{
definition: {constant: {value: '<string>'}},
description: '<string>',
displayName: '<string>',
name: '<string>'
}
],
variablesV2: [
{
description: '<string>',
displayFullRow: true,
displayName: '<string>',
id: {value: '<string>'},
name: '<string>',
source: {
static: {
allOption: {includeAll: true, label: '<string>'},
values: [{isDefault: true, label: '<string>', value: '<string>'}]
}
},
value: {multiString: {all: {}}}
}
]
},
requestId: '<string>',
isLocked: true
})
};
fetch('https://api.coralogix.com/mgmt/openapi/4/dashboards/dashboards/v1', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coralogix.com/mgmt/openapi/4/dashboards/dashboards/v1",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dashboard' => [
'layout' => [
'sections' => [
[
'id' => [
'value' => '<string>'
],
'options' => [
'internal' => [
]
],
'rows' => [
[
'appearance' => [
'height' => 123
],
'id' => [
'value' => '<string>'
],
'widgets' => [
[
'appearance' => [
'width' => 123
],
'createdAt' => '2023-11-07T05:31:56Z',
'definition' => [
'hexagon' => [
'customUnit' => '<string>',
'decimal' => 2,
'decimalPrecision' => false,
'legend' => [
'columns' => [
1,
2,
6
],
'groupByQuery' => true,
'isVisible' => true
],
'max' => 150000,
'min' => 0,
'query' => [
'spans' => [
'filters' => [
[
'field' => [
'processTagField' => '<string>'
],
'observationField' => [
'keypath' => [
'<string>'
]
],
'operator' => [
'equals' => [
'selection' => [
'all' => [
]
]
]
]
]
],
'groupBy' => [
[
'processTagField' => '<string>'
]
],
'groupBys' => [
[
'keypath' => [
'<string>'
]
]
],
'luceneQuery' => [
'value' => '<string>'
],
'spansAggregation' => [
'metricAggregation' => [
]
],
'timeFrame' => [
'absoluteTimeFrame' => [
'from' => '2023-11-07T05:31:56Z',
'to' => '2023-11-07T05:31:56Z'
]
]
]
],
'thresholds' => [
[
'color' => '<string>',
'from' => 123,
'label' => '<string>'
]
]
]
],
'description' => '<string>',
'id' => [
'value' => '<string>'
],
'title' => '<string>',
'updatedAt' => '2023-11-07T05:31:56Z'
]
]
]
]
]
]
],
'name' => 'Example Name',
'absoluteTimeFrame' => [
'from' => '2023-11-07T05:31:56Z',
'to' => '2023-11-07T05:31:56Z'
],
'actions' => [
[
'definition' => [
'customAction' => [
'url' => '<string>'
]
],
'id' => '<string>',
'name' => '<string>',
'shouldOpenInNewWindow' => true,
'widgetId' => '<string>'
]
],
'annotations' => [
[
'description' => '<string>',
'enabled' => true,
'id' => '<string>',
'name' => '<string>',
'scope' => [
'allWidgets' => [
]
],
'source' => [
'spans' => [
'labelFields' => [
[
'keypath' => [
'<string>'
]
]
],
'luceneQuery' => [
'value' => '<string>'
],
'messageTemplate' => '<string>',
'strategy' => [
'instant' => [
'timestampField' => [
'keypath' => [
'<string>'
]
]
]
]
]
]
]
],
'description' => 'Sample description',
'filters' => [
[
'collapsed' => true,
'displayName' => '<string>',
'enabled' => true,
'id' => [
'value' => '<string>'
],
'source' => [
'logs' => [
'field' => '<string>',
'observationField' => [
'keypath' => [
'<string>'
]
],
'operator' => [
'equals' => [
'selection' => [
'all' => [
]
]
]
]
]
]
]
],
'folderId' => [
'value' => '<string>'
],
'folderPath' => [
'segments' => [
'<string>'
]
],
'id' => 'GZLHSeqelCbD3I7HbIDtL',
'off' => [
],
'slugName' => 'system-health-monitoring',
'variables' => [
[
'definition' => [
'constant' => [
'value' => '<string>'
]
],
'description' => '<string>',
'displayName' => '<string>',
'name' => '<string>'
]
],
'variablesV2' => [
[
'description' => '<string>',
'displayFullRow' => true,
'displayName' => '<string>',
'id' => [
'value' => '<string>'
],
'name' => '<string>',
'source' => [
'static' => [
'allOption' => [
'includeAll' => true,
'label' => '<string>'
],
'values' => [
[
'isDefault' => true,
'label' => '<string>',
'value' => '<string>'
]
]
]
],
'value' => [
'multiString' => [
'all' => [
]
]
]
]
]
],
'requestId' => '<string>',
'isLocked' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coralogix.com/mgmt/openapi/4/dashboards/dashboards/v1"
payload := strings.NewReader("{\n \"dashboard\": {\n \"layout\": {\n \"sections\": [\n {\n \"id\": {\n \"value\": \"<string>\"\n },\n \"options\": {\n \"internal\": {}\n },\n \"rows\": [\n {\n \"appearance\": {\n \"height\": 123\n },\n \"id\": {\n \"value\": \"<string>\"\n },\n \"widgets\": [\n {\n \"appearance\": {\n \"width\": 123\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"definition\": {\n \"hexagon\": {\n \"customUnit\": \"<string>\",\n \"decimal\": 2,\n \"decimalPrecision\": false,\n \"legend\": {\n \"columns\": [\n 1,\n 2,\n 6\n ],\n \"groupByQuery\": true,\n \"isVisible\": true\n },\n \"max\": 150000,\n \"min\": 0,\n \"query\": {\n \"spans\": {\n \"filters\": [\n {\n \"field\": {\n \"processTagField\": \"<string>\"\n },\n \"observationField\": {\n \"keypath\": [\n \"<string>\"\n ]\n },\n \"operator\": {\n \"equals\": {\n \"selection\": {\n \"all\": {}\n }\n }\n }\n }\n ],\n \"groupBy\": [\n {\n \"processTagField\": \"<string>\"\n }\n ],\n \"groupBys\": [\n {\n \"keypath\": [\n \"<string>\"\n ]\n }\n ],\n \"luceneQuery\": {\n \"value\": \"<string>\"\n },\n \"spansAggregation\": {\n \"metricAggregation\": {}\n },\n \"timeFrame\": {\n \"absoluteTimeFrame\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n }\n }\n }\n },\n \"thresholds\": [\n {\n \"color\": \"<string>\",\n \"from\": 123,\n \"label\": \"<string>\"\n }\n ]\n }\n },\n \"description\": \"<string>\",\n \"id\": {\n \"value\": \"<string>\"\n },\n \"title\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n ]\n }\n ]\n },\n \"name\": \"Example Name\",\n \"absoluteTimeFrame\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n },\n \"actions\": [\n {\n \"definition\": {\n \"customAction\": {\n \"url\": \"<string>\"\n }\n },\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"shouldOpenInNewWindow\": true,\n \"widgetId\": \"<string>\"\n }\n ],\n \"annotations\": [\n {\n \"description\": \"<string>\",\n \"enabled\": true,\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"scope\": {\n \"allWidgets\": {}\n },\n \"source\": {\n \"spans\": {\n \"labelFields\": [\n {\n \"keypath\": [\n \"<string>\"\n ]\n }\n ],\n \"luceneQuery\": {\n \"value\": \"<string>\"\n },\n \"messageTemplate\": \"<string>\",\n \"strategy\": {\n \"instant\": {\n \"timestampField\": {\n \"keypath\": [\n \"<string>\"\n ]\n }\n }\n }\n }\n }\n }\n ],\n \"description\": \"Sample description\",\n \"filters\": [\n {\n \"collapsed\": true,\n \"displayName\": \"<string>\",\n \"enabled\": true,\n \"id\": {\n \"value\": \"<string>\"\n },\n \"source\": {\n \"logs\": {\n \"field\": \"<string>\",\n \"observationField\": {\n \"keypath\": [\n \"<string>\"\n ]\n },\n \"operator\": {\n \"equals\": {\n \"selection\": {\n \"all\": {}\n }\n }\n }\n }\n }\n }\n ],\n \"folderId\": {\n \"value\": \"<string>\"\n },\n \"folderPath\": {\n \"segments\": [\n \"<string>\"\n ]\n },\n \"id\": \"GZLHSeqelCbD3I7HbIDtL\",\n \"off\": {},\n \"slugName\": \"system-health-monitoring\",\n \"variables\": [\n {\n \"definition\": {\n \"constant\": {\n \"value\": \"<string>\"\n }\n },\n \"description\": \"<string>\",\n \"displayName\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"variablesV2\": [\n {\n \"description\": \"<string>\",\n \"displayFullRow\": true,\n \"displayName\": \"<string>\",\n \"id\": {\n \"value\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"source\": {\n \"static\": {\n \"allOption\": {\n \"includeAll\": true,\n \"label\": \"<string>\"\n },\n \"values\": [\n {\n \"isDefault\": true,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n },\n \"value\": {\n \"multiString\": {\n \"all\": {}\n }\n }\n }\n ]\n },\n \"requestId\": \"<string>\",\n \"isLocked\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://api.coralogix.com/mgmt/openapi/4/dashboards/dashboards/v1")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dashboard\": {\n \"layout\": {\n \"sections\": [\n {\n \"id\": {\n \"value\": \"<string>\"\n },\n \"options\": {\n \"internal\": {}\n },\n \"rows\": [\n {\n \"appearance\": {\n \"height\": 123\n },\n \"id\": {\n \"value\": \"<string>\"\n },\n \"widgets\": [\n {\n \"appearance\": {\n \"width\": 123\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"definition\": {\n \"hexagon\": {\n \"customUnit\": \"<string>\",\n \"decimal\": 2,\n \"decimalPrecision\": false,\n \"legend\": {\n \"columns\": [\n 1,\n 2,\n 6\n ],\n \"groupByQuery\": true,\n \"isVisible\": true\n },\n \"max\": 150000,\n \"min\": 0,\n \"query\": {\n \"spans\": {\n \"filters\": [\n {\n \"field\": {\n \"processTagField\": \"<string>\"\n },\n \"observationField\": {\n \"keypath\": [\n \"<string>\"\n ]\n },\n \"operator\": {\n \"equals\": {\n \"selection\": {\n \"all\": {}\n }\n }\n }\n }\n ],\n \"groupBy\": [\n {\n \"processTagField\": \"<string>\"\n }\n ],\n \"groupBys\": [\n {\n \"keypath\": [\n \"<string>\"\n ]\n }\n ],\n \"luceneQuery\": {\n \"value\": \"<string>\"\n },\n \"spansAggregation\": {\n \"metricAggregation\": {}\n },\n \"timeFrame\": {\n \"absoluteTimeFrame\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n }\n }\n }\n },\n \"thresholds\": [\n {\n \"color\": \"<string>\",\n \"from\": 123,\n \"label\": \"<string>\"\n }\n ]\n }\n },\n \"description\": \"<string>\",\n \"id\": {\n \"value\": \"<string>\"\n },\n \"title\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n ]\n }\n ]\n },\n \"name\": \"Example Name\",\n \"absoluteTimeFrame\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n },\n \"actions\": [\n {\n \"definition\": {\n \"customAction\": {\n \"url\": \"<string>\"\n }\n },\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"shouldOpenInNewWindow\": true,\n \"widgetId\": \"<string>\"\n }\n ],\n \"annotations\": [\n {\n \"description\": \"<string>\",\n \"enabled\": true,\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"scope\": {\n \"allWidgets\": {}\n },\n \"source\": {\n \"spans\": {\n \"labelFields\": [\n {\n \"keypath\": [\n \"<string>\"\n ]\n }\n ],\n \"luceneQuery\": {\n \"value\": \"<string>\"\n },\n \"messageTemplate\": \"<string>\",\n \"strategy\": {\n \"instant\": {\n \"timestampField\": {\n \"keypath\": [\n \"<string>\"\n ]\n }\n }\n }\n }\n }\n }\n ],\n \"description\": \"Sample description\",\n \"filters\": [\n {\n \"collapsed\": true,\n \"displayName\": \"<string>\",\n \"enabled\": true,\n \"id\": {\n \"value\": \"<string>\"\n },\n \"source\": {\n \"logs\": {\n \"field\": \"<string>\",\n \"observationField\": {\n \"keypath\": [\n \"<string>\"\n ]\n },\n \"operator\": {\n \"equals\": {\n \"selection\": {\n \"all\": {}\n }\n }\n }\n }\n }\n }\n ],\n \"folderId\": {\n \"value\": \"<string>\"\n },\n \"folderPath\": {\n \"segments\": [\n \"<string>\"\n ]\n },\n \"id\": \"GZLHSeqelCbD3I7HbIDtL\",\n \"off\": {},\n \"slugName\": \"system-health-monitoring\",\n \"variables\": [\n {\n \"definition\": {\n \"constant\": {\n \"value\": \"<string>\"\n }\n },\n \"description\": \"<string>\",\n \"displayName\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"variablesV2\": [\n {\n \"description\": \"<string>\",\n \"displayFullRow\": true,\n \"displayName\": \"<string>\",\n \"id\": {\n \"value\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"source\": {\n \"static\": {\n \"allOption\": {\n \"includeAll\": true,\n \"label\": \"<string>\"\n },\n \"values\": [\n {\n \"isDefault\": true,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n },\n \"value\": {\n \"multiString\": {\n \"all\": {}\n }\n }\n }\n ]\n },\n \"requestId\": \"<string>\",\n \"isLocked\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coralogix.com/mgmt/openapi/4/dashboards/dashboards/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dashboard\": {\n \"layout\": {\n \"sections\": [\n {\n \"id\": {\n \"value\": \"<string>\"\n },\n \"options\": {\n \"internal\": {}\n },\n \"rows\": [\n {\n \"appearance\": {\n \"height\": 123\n },\n \"id\": {\n \"value\": \"<string>\"\n },\n \"widgets\": [\n {\n \"appearance\": {\n \"width\": 123\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"definition\": {\n \"hexagon\": {\n \"customUnit\": \"<string>\",\n \"decimal\": 2,\n \"decimalPrecision\": false,\n \"legend\": {\n \"columns\": [\n 1,\n 2,\n 6\n ],\n \"groupByQuery\": true,\n \"isVisible\": true\n },\n \"max\": 150000,\n \"min\": 0,\n \"query\": {\n \"spans\": {\n \"filters\": [\n {\n \"field\": {\n \"processTagField\": \"<string>\"\n },\n \"observationField\": {\n \"keypath\": [\n \"<string>\"\n ]\n },\n \"operator\": {\n \"equals\": {\n \"selection\": {\n \"all\": {}\n }\n }\n }\n }\n ],\n \"groupBy\": [\n {\n \"processTagField\": \"<string>\"\n }\n ],\n \"groupBys\": [\n {\n \"keypath\": [\n \"<string>\"\n ]\n }\n ],\n \"luceneQuery\": {\n \"value\": \"<string>\"\n },\n \"spansAggregation\": {\n \"metricAggregation\": {}\n },\n \"timeFrame\": {\n \"absoluteTimeFrame\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n }\n }\n }\n },\n \"thresholds\": [\n {\n \"color\": \"<string>\",\n \"from\": 123,\n \"label\": \"<string>\"\n }\n ]\n }\n },\n \"description\": \"<string>\",\n \"id\": {\n \"value\": \"<string>\"\n },\n \"title\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n ]\n }\n ]\n },\n \"name\": \"Example Name\",\n \"absoluteTimeFrame\": {\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n },\n \"actions\": [\n {\n \"definition\": {\n \"customAction\": {\n \"url\": \"<string>\"\n }\n },\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"shouldOpenInNewWindow\": true,\n \"widgetId\": \"<string>\"\n }\n ],\n \"annotations\": [\n {\n \"description\": \"<string>\",\n \"enabled\": true,\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"scope\": {\n \"allWidgets\": {}\n },\n \"source\": {\n \"spans\": {\n \"labelFields\": [\n {\n \"keypath\": [\n \"<string>\"\n ]\n }\n ],\n \"luceneQuery\": {\n \"value\": \"<string>\"\n },\n \"messageTemplate\": \"<string>\",\n \"strategy\": {\n \"instant\": {\n \"timestampField\": {\n \"keypath\": [\n \"<string>\"\n ]\n }\n }\n }\n }\n }\n }\n ],\n \"description\": \"Sample description\",\n \"filters\": [\n {\n \"collapsed\": true,\n \"displayName\": \"<string>\",\n \"enabled\": true,\n \"id\": {\n \"value\": \"<string>\"\n },\n \"source\": {\n \"logs\": {\n \"field\": \"<string>\",\n \"observationField\": {\n \"keypath\": [\n \"<string>\"\n ]\n },\n \"operator\": {\n \"equals\": {\n \"selection\": {\n \"all\": {}\n }\n }\n }\n }\n }\n }\n ],\n \"folderId\": {\n \"value\": \"<string>\"\n },\n \"folderPath\": {\n \"segments\": [\n \"<string>\"\n ]\n },\n \"id\": \"GZLHSeqelCbD3I7HbIDtL\",\n \"off\": {},\n \"slugName\": \"system-health-monitoring\",\n \"variables\": [\n {\n \"definition\": {\n \"constant\": {\n \"value\": \"<string>\"\n }\n },\n \"description\": \"<string>\",\n \"displayName\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"variablesV2\": [\n {\n \"description\": \"<string>\",\n \"displayFullRow\": true,\n \"displayName\": \"<string>\",\n \"id\": {\n \"value\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"source\": {\n \"static\": {\n \"allOption\": {\n \"includeAll\": true,\n \"label\": \"<string>\"\n },\n \"values\": [\n {\n \"isDefault\": true,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n },\n \"value\": {\n \"multiString\": {\n \"all\": {}\n }\n }\n }\n ]\n },\n \"requestId\": \"<string>\",\n \"isLocked\": true\n}"
response = http.request(request)
puts response.read_body{
"dashboardId": "<string>"
}Authorizations
API key authentication
Body
application/json
Response
This is a response received when a custom dashboard is successfully created
Was this page helpful?
⌘I