Create a new dashboard
curl --request POST \
--url https://api.coralogix.com/mgmt/openapi/3/v1/dashboards/dashboards \
--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": {
"markdown": {
"markdownText": "<string>",
"tooltipText": "<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": {
"metrics": {
"labels": [
"<string>"
],
"messageTemplate": "<string>",
"promqlQuery": {
"value": "<string>"
},
"strategy": {
"startTimeMetric": {}
}
}
}
}
],
"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/3/v1/dashboards/dashboards"
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": { "markdown": {
"markdownText": "<string>",
"tooltipText": "<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": { "metrics": {
"labels": ["<string>"],
"messageTemplate": "<string>",
"promqlQuery": { "value": "<string>" },
"strategy": { "startTimeMetric": {} }
} }
}
],
"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: {markdown: {markdownText: '<string>', tooltipText: '<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: {
metrics: {
labels: ['<string>'],
messageTemplate: '<string>',
promqlQuery: {value: '<string>'},
strategy: {startTimeMetric: {}}
}
}
}
],
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/3/v1/dashboards/dashboards', 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/3/v1/dashboards/dashboards",
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' => [
'markdown' => [
'markdownText' => '<string>',
'tooltipText' => '<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' => [
'metrics' => [
'labels' => [
'<string>'
],
'messageTemplate' => '<string>',
'promqlQuery' => [
'value' => '<string>'
],
'strategy' => [
'startTimeMetric' => [
]
]
]
]
]
],
'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/3/v1/dashboards/dashboards"
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 \"markdown\": {\n \"markdownText\": \"<string>\",\n \"tooltipText\": \"<string>\"\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 \"metrics\": {\n \"labels\": [\n \"<string>\"\n ],\n \"messageTemplate\": \"<string>\",\n \"promqlQuery\": {\n \"value\": \"<string>\"\n },\n \"strategy\": {\n \"startTimeMetric\": {}\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/3/v1/dashboards/dashboards")
.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 \"markdown\": {\n \"markdownText\": \"<string>\",\n \"tooltipText\": \"<string>\"\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 \"metrics\": {\n \"labels\": [\n \"<string>\"\n ],\n \"messageTemplate\": \"<string>\",\n \"promqlQuery\": {\n \"value\": \"<string>\"\n },\n \"strategy\": {\n \"startTimeMetric\": {}\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/3/v1/dashboards/dashboards")
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 \"markdown\": {\n \"markdownText\": \"<string>\",\n \"tooltipText\": \"<string>\"\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 \"metrics\": {\n \"labels\": [\n \"<string>\"\n ],\n \"messageTemplate\": \"<string>\",\n \"promqlQuery\": {\n \"value\": \"<string>\"\n },\n \"strategy\": {\n \"startTimeMetric\": {}\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/3/v1/dashboards/dashboards \
--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": {
"markdown": {
"markdownText": "<string>",
"tooltipText": "<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": {
"metrics": {
"labels": [
"<string>"
],
"messageTemplate": "<string>",
"promqlQuery": {
"value": "<string>"
},
"strategy": {
"startTimeMetric": {}
}
}
}
}
],
"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/3/v1/dashboards/dashboards"
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": { "markdown": {
"markdownText": "<string>",
"tooltipText": "<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": { "metrics": {
"labels": ["<string>"],
"messageTemplate": "<string>",
"promqlQuery": { "value": "<string>" },
"strategy": { "startTimeMetric": {} }
} }
}
],
"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: {markdown: {markdownText: '<string>', tooltipText: '<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: {
metrics: {
labels: ['<string>'],
messageTemplate: '<string>',
promqlQuery: {value: '<string>'},
strategy: {startTimeMetric: {}}
}
}
}
],
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/3/v1/dashboards/dashboards', 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/3/v1/dashboards/dashboards",
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' => [
'markdown' => [
'markdownText' => '<string>',
'tooltipText' => '<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' => [
'metrics' => [
'labels' => [
'<string>'
],
'messageTemplate' => '<string>',
'promqlQuery' => [
'value' => '<string>'
],
'strategy' => [
'startTimeMetric' => [
]
]
]
]
]
],
'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/3/v1/dashboards/dashboards"
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 \"markdown\": {\n \"markdownText\": \"<string>\",\n \"tooltipText\": \"<string>\"\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 \"metrics\": {\n \"labels\": [\n \"<string>\"\n ],\n \"messageTemplate\": \"<string>\",\n \"promqlQuery\": {\n \"value\": \"<string>\"\n },\n \"strategy\": {\n \"startTimeMetric\": {}\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/3/v1/dashboards/dashboards")
.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 \"markdown\": {\n \"markdownText\": \"<string>\",\n \"tooltipText\": \"<string>\"\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 \"metrics\": {\n \"labels\": [\n \"<string>\"\n ],\n \"messageTemplate\": \"<string>\",\n \"promqlQuery\": {\n \"value\": \"<string>\"\n },\n \"strategy\": {\n \"startTimeMetric\": {}\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/3/v1/dashboards/dashboards")
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 \"markdown\": {\n \"markdownText\": \"<string>\",\n \"tooltipText\": \"<string>\"\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 \"metrics\": {\n \"labels\": [\n \"<string>\"\n ],\n \"messageTemplate\": \"<string>\",\n \"promqlQuery\": {\n \"value\": \"<string>\"\n },\n \"strategy\": {\n \"startTimeMetric\": {}\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