Back to Collection Items
<?php
include("chilkat.php");
// Use "chilkat_9_5_0.php" for versions of Chilkat < 10.0.0
$success = $http->QuickGetSb('https://api.app.ddog-gov.com/api/v1/dashboard/:dashboard_id',$sbResponseBody);$jResp->LoadSb($sbResponseBody);$jResp->put_EmitCompact(false);$jResp->put_I($i);$v_Type = $jResp->stringOf('widgets[i].definition.type');$Alert_id = $jResp->stringOf('widgets[i].definition.alert_id');$Viz_type = $jResp->stringOf('widgets[i].definition.viz_type');$Live_span = $jResp->stringOf('widgets[i].definition.time.live_span');$Title = $jResp->stringOf('widgets[i].definition.title');$Title_align = $jResp->stringOf('widgets[i].definition.title_align');$Title_size = $jResp->stringOf('widgets[i].definition.title_size');$id_int = $jResp->IntOf('widgets[i].id');$X = $jResp->IntOf('widgets[i].layout.x');$Y = $jResp->IntOf('widgets[i].layout.y');$Width = $jResp->IntOf('widgets[i].layout.width');$Height = $jResp->IntOf('widgets[i].layout.height');$Is_column_break = $jResp->BoolOf('widgets[i].layout.is_column_break');$i = $i + 1;$i = 0;$count_i = $jResp->SizeOfArray('notify_list');$jResp->put_I($i);$strVal = $jResp->stringOf('notify_list[i]');$i = $i + 1;$i = 0;$count_i = $jResp->SizeOfArray('restricted_roles');$jResp->put_I($i);$strVal = $jResp->stringOf('restricted_roles[i]');$i = $i + 1;$i = 0;$count_i = $jResp->SizeOfArray('tags');$jResp->put_I($i);$strVal = $jResp->stringOf('tags[i]');$i = $i + 1;$i = 0;$count_i = $jResp->SizeOfArray('template_variable_presets');$jResp->put_I($i);$name = $jResp->stringOf('template_variable_presets[i].name');$j = 0;$count_j = $jResp->SizeOfArray('template_variable_presets[i].template_variables');$jResp->put_J($j);$name = $jResp->stringOf('template_variable_presets[i].template_variables[j].name');$value = $jResp->stringOf('template_variable_presets[i].template_variables[j].value');$k = 0;$count_k = $jResp->SizeOfArray('template_variable_presets[i].template_variables[j].values');$jResp->put_K($k);$strVal = $jResp->stringOf('template_variable_presets[i].template_variables[j].values[k]');$k = $k + 1;$j = $j + 1;$i = $i + 1;$i = 0;$count_i = $jResp->SizeOfArray('template_variables');$jResp->put_I($i);$name = $jResp->stringOf('template_variables[i].name');$default = $jResp->stringOf('template_variables[i].default');$prefix = $jResp->stringOf('template_variables[i].prefix');$j = 0;$count_j = $jResp->SizeOfArray('template_variables[i].available_values');$jResp->put_J($j);$strVal = $jResp->stringOf('template_variables[i].available_values[j]');$j = $j + 1;$j = 0;$count_j = $jResp->SizeOfArray('template_variables[i].defaults');$jResp->put_J($j);$strVal = $jResp->stringOf('template_variables[i].defaults[j]');$j = $j + 1;$i = $i + 1;
?>
Curl Command
curl -X GET
-H "Accept: application/json"
https://api.app.ddog-gov.com/api/v1/dashboard/:dashboard_id
Postman Collection Item JSON
{
"name": "Get a dashboard",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/api/v1/dashboard/:dashboard_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"dashboard",
":dashboard_id"
],
"variable": [
{
"key": "dashboard_id",
"value": "tempor Ut sed velit"
}
]
},
"description": "Get a dashboard using the specified ID."
},
"response": [
{
"name": "OK",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/api/v1/dashboard/:dashboard_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"dashboard",
":dashboard_id"
],
"variable": [
{
"key": "dashboard_id"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"title\": \"\",\n \"layout_type\": \"ordered\",\n \"widgets\": [\n {\n \"definition\": {\n \"type\": \"alert_graph\",\n \"alert_id\": \"\",\n \"viz_type\": \"timeseries\",\n \"time\": {\n \"live_span\": \"5m\"\n },\n \"title\": \"nisi et cupidatat sunt\",\n \"title_align\": \"right\",\n \"title_size\": \"officia anim occaecat aliq\"\n },\n \"id\": 45068649,\n \"layout\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 0,\n \"height\": 0,\n \"is_column_break\": true\n }\n },\n {\n \"definition\": {\n \"type\": \"alert_graph\",\n \"alert_id\": \"\",\n \"viz_type\": \"timeseries\",\n \"time\": {\n \"live_span\": \"5m\"\n },\n \"title\": \"laborum dolor cillum ad\",\n \"title_align\": \"center\",\n \"title_size\": \"et\"\n },\n \"id\": -40196020,\n \"layout\": {\n \"x\": 0,\n \"y\": 0,\n \"width\": 0,\n \"height\": 0,\n \"is_column_break\": false\n }\n }\n ],\n \"author_handle\": \"test@datadoghq.com\",\n \"author_name\": \"John Doe\",\n \"created_at\": \"2017-08-17T07:10:36.438Z\",\n \"description\": \"eiusmod do est velit enim\",\n \"id\": \"123-abc-456\",\n \"is_read_only\": false,\n \"modified_at\": \"1996-07-08T08:32:43.112Z\",\n \"notify_list\": [\n \"commodo voluptate eu\",\n \"consectetur amet\"\n ],\n \"reflow_type\": \"fixed\",\n \"restricted_roles\": [\n \"id cupidatat\",\n \"quis ullamco\"\n ],\n \"tags\": [\n \"quis qui mollit ex\",\n \"ullamco enim cupidatat\"\n ],\n \"template_variable_presets\": [\n {\n \"name\": \"Lorem ex enim\",\n \"template_variables\": [\n {\n \"name\": \"sed \",\n \"value\": \"quis eu\",\n \"values\": [\n \"in\"\n ]\n },\n {\n \"name\": \"non\",\n \"value\": \"ea dolore esse elit Lorem\",\n \"values\": [\n \"sed voluptate nulla\"\n ]\n }\n ]\n },\n {\n \"name\": \"est \",\n \"template_variables\": [\n {\n \"name\": \"ullamco sint\",\n \"value\": \"ad ex irure\",\n \"values\": [\n \"Duis elit dolor\"\n ]\n },\n {\n \"name\": \"proident adipisicing culpa cons\",\n \"value\": \"occaecat\",\n \"values\": [\n \"esse fugiat\"\n ]\n }\n ]\n }\n ],\n \"template_variables\": [\n {\n \"name\": \"host1\",\n \"available_values\": [\n \"my-host\",\n \"host1\",\n \"host2\"\n ],\n \"default\": \"my-host\",\n \"defaults\": [\n \"my-host-1\",\n \"my-host-2\"\n ],\n \"prefix\": \"host\"\n },\n {\n \"name\": \"host1\",\n \"available_values\": [\n \"my-host\",\n \"host1\",\n \"host2\"\n ],\n \"default\": \"my-host\",\n \"defaults\": [\n \"my-host-1\",\n \"my-host-2\"\n ],\n \"prefix\": \"host\"\n }\n ],\n \"url\": \"/dashboard/123-abc-456/example-dashboard-title\"\n}"
},
{
"name": "Authentication Error",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/api/v1/dashboard/:dashboard_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"dashboard",
":dashboard_id"
],
"variable": [
{
"key": "dashboard_id"
}
]
}
},
"status": "Forbidden",
"code": 403,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"errors\": [\n \"Bad Request\",\n \"Bad Request\"\n ]\n}"
},
{
"name": "Item Not Found",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/api/v1/dashboard/:dashboard_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"dashboard",
":dashboard_id"
],
"variable": [
{
"key": "dashboard_id"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"errors\": [\n \"Bad Request\",\n \"Bad Request\"\n ]\n}"
},
{
"name": "Too many requests",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "DD-API-KEY",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/api/v1/dashboard/:dashboard_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"dashboard",
":dashboard_id"
],
"variable": [
{
"key": "dashboard_id"
}
]
}
},
"status": "Too Many Requests",
"code": 429,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"errors\": [\n \"Bad Request\",\n \"Bad Request\"\n ]\n}"
}
]
}