Chilkat Online Tools

VB.NET / Datadog API Collection / Create a new dashboard

Back to Collection Items

' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.

Dim http As New Chilkat.Http
Dim success As Boolean

' Use this online tool to generate code from sample JSON: Generate Code to Create JSON

' The following JSON is sent in the request body.

' {
'   "title": "",
'   "layout_type": "ordered",
'   "widgets": [
'     {
'       "definition": {
'         "type": "alert_graph",
'         "alert_id": "",
'         "viz_type": "timeseries",
'         "time": {
'           "live_span": "5m"
'         },
'         "title": "nisi et cupidatat sunt",
'         "title_align": "right",
'         "title_size": "officia anim occaecat aliq"
'       },
'       "id": 45068649,
'       "layout": {
'         "x": 0,
'         "y": 0,
'         "width": 0,
'         "height": 0,
'         "is_column_break": true
'       }
'     },
'     {
'       "definition": {
'         "type": "alert_graph",
'         "alert_id": "",
'         "viz_type": "timeseries",
'         "time": {
'           "live_span": "5m"
'         },
'         "title": "laborum dolor cillum ad",
'         "title_align": "center",
'         "title_size": "et"
'       },
'       "id": -40196020,
'       "layout": {
'         "x": 0,
'         "y": 0,
'         "width": 0,
'         "height": 0,
'         "is_column_break": false
'       }
'     }
'   ],
'   "author_handle": "test@datadoghq.com",
'   "author_name": "John Doe",
'   "created_at": "2017-08-17T07:10:36.438Z",
'   "description": "eiusmod do est velit enim",
'   "id": "123-abc-456",
'   "is_read_only": false,
'   "modified_at": "1996-07-08T08:32:43.112Z",
'   "notify_list": [
'     "commodo voluptate eu",
'     "consectetur amet"
'   ],
'   "reflow_type": "fixed",
'   "restricted_roles": [
'     "id cupidatat",
'     "quis ullamco"
'   ],
'   "tags": [
'     "quis qui mollit ex",
'     "ullamco enim cupidatat"
'   ],
'   "template_variable_presets": [
'     {
'       "name": "Lorem ex enim",
'       "template_variables": [
'         {
'           "name": "sed ",
'           "value": "quis eu",
'           "values": [
'             "in"
'           ]
'         },
'         {
'           "name": "non",
'           "value": "ea dolore esse elit Lorem",
'           "values": [
'             "sed voluptate nulla"
'           ]
'         }
'       ]
'     },
'     {
'       "name": "est ",
'       "template_variables": [
'         {
'           "name": "ullamco sint",
'           "value": "ad ex irure",
'           "values": [
'             "Duis elit dolor"
'           ]
'         },
'         {
'           "name": "proident adipisicing culpa cons",
'           "value": "occaecat",
'           "values": [
'             "esse fugiat"
'           ]
'         }
'       ]
'     }
'   ],
'   "template_variables": [
'     {
'       "name": "host1",
'       "available_values": [
'         "my-host",
'         "host1",
'         "host2"
'       ],
'       "default": "my-host",
'       "defaults": [
'         "my-host-1",
'         "my-host-2"
'       ],
'       "prefix": "host"
'     },
'     {
'       "name": "host1",
'       "available_values": [
'         "my-host",
'         "host1",
'         "host2"
'       ],
'       "default": "my-host",
'       "defaults": [
'         "my-host-1",
'         "my-host-2"
'       ],
'       "prefix": "host"
'     }
'   ],
'   "url": "/dashboard/123-abc-456/example-dashboard-title"
' }

Dim json As New Chilkat.JsonObject
json.UpdateString("title","")
json.UpdateString("layout_type","ordered")
json.UpdateString("widgets[0].definition.type","alert_graph")
json.UpdateString("widgets[0].definition.alert_id","")
json.UpdateString("widgets[0].definition.viz_type","timeseries")
json.UpdateString("widgets[0].definition.time.live_span","5m")
json.UpdateString("widgets[0].definition.title","nisi et cupidatat sunt")
json.UpdateString("widgets[0].definition.title_align","right")
json.UpdateString("widgets[0].definition.title_size","officia anim occaecat aliq")
json.UpdateInt("widgets[0].id",45068649)
json.UpdateInt("widgets[0].layout.x",0)
json.UpdateInt("widgets[0].layout.y",0)
json.UpdateInt("widgets[0].layout.width",0)
json.UpdateInt("widgets[0].layout.height",0)
json.UpdateBool("widgets[0].layout.is_column_break",True)
json.UpdateString("widgets[1].definition.type","alert_graph")
json.UpdateString("widgets[1].definition.alert_id","")
json.UpdateString("widgets[1].definition.viz_type","timeseries")
json.UpdateString("widgets[1].definition.time.live_span","5m")
json.UpdateString("widgets[1].definition.title","laborum dolor cillum ad")
json.UpdateString("widgets[1].definition.title_align","center")
json.UpdateString("widgets[1].definition.title_size","et")
json.UpdateInt("widgets[1].id",-40196020)
json.UpdateInt("widgets[1].layout.x",0)
json.UpdateInt("widgets[1].layout.y",0)
json.UpdateInt("widgets[1].layout.width",0)
json.UpdateInt("widgets[1].layout.height",0)
json.UpdateBool("widgets[1].layout.is_column_break",False)
json.UpdateString("author_handle","test@datadoghq.com")
json.UpdateString("author_name","John Doe")
json.UpdateString("created_at","2017-08-17T07:10:36.438Z")
json.UpdateString("description","eiusmod do est velit enim")
json.UpdateString("id","123-abc-456")
json.UpdateBool("is_read_only",False)
json.UpdateString("modified_at","1996-07-08T08:32:43.112Z")
json.UpdateString("notify_list[0]","commodo voluptate eu")
json.UpdateString("notify_list[1]","consectetur amet")
json.UpdateString("reflow_type","fixed")
json.UpdateString("restricted_roles[0]","id cupidatat")
json.UpdateString("restricted_roles[1]","quis ullamco")
json.UpdateString("tags[0]","quis qui mollit ex")
json.UpdateString("tags[1]","ullamco enim cupidatat")
json.UpdateString("template_variable_presets[0].name","Lorem ex enim")
json.UpdateString("template_variable_presets[0].template_variables[0].name","sed ")
json.UpdateString("template_variable_presets[0].template_variables[0].value","quis eu")
json.UpdateString("template_variable_presets[0].template_variables[0].values[0]","in")
json.UpdateString("template_variable_presets[0].template_variables[1].name","non")
json.UpdateString("template_variable_presets[0].template_variables[1].value","ea dolore esse elit Lorem")
json.UpdateString("template_variable_presets[0].template_variables[1].values[0]","sed voluptate nulla")
json.UpdateString("template_variable_presets[1].name","est ")
json.UpdateString("template_variable_presets[1].template_variables[0].name","ullamco sint")
json.UpdateString("template_variable_presets[1].template_variables[0].value","ad ex irure")
json.UpdateString("template_variable_presets[1].template_variables[0].values[0]","Duis elit dolor")
json.UpdateString("template_variable_presets[1].template_variables[1].name","proident adipisicing culpa cons")
json.UpdateString("template_variable_presets[1].template_variables[1].value","occaecat")
json.UpdateString("template_variable_presets[1].template_variables[1].values[0]","esse fugiat")
json.UpdateString("template_variables[0].name","host1")
json.UpdateString("template_variables[0].available_values[0]","my-host")
json.UpdateString("template_variables[0].available_values[1]","host1")
json.UpdateString("template_variables[0].available_values[2]","host2")
json.UpdateString("template_variables[0].default","my-host")
json.UpdateString("template_variables[0].defaults[0]","my-host-1")
json.UpdateString("template_variables[0].defaults[1]","my-host-2")
json.UpdateString("template_variables[0].prefix","host")
json.UpdateString("template_variables[1].name","host1")
json.UpdateString("template_variables[1].available_values[0]","my-host")
json.UpdateString("template_variables[1].available_values[1]","host1")
json.UpdateString("template_variables[1].available_values[2]","host2")
json.UpdateString("template_variables[1].default","my-host")
json.UpdateString("template_variables[1].defaults[0]","my-host-1")
json.UpdateString("template_variables[1].defaults[1]","my-host-2")
json.UpdateString("template_variables[1].prefix","host")
json.UpdateString("url","/dashboard/123-abc-456/example-dashboard-title")

http.SetRequestHeader("Content-Type","application/json")
http.SetRequestHeader("Accept","application/json")

Dim resp As Chilkat.HttpResponse = http.PostJson3("https://api.app.ddog-gov.com/api/v1/dashboard","application/json",json)
If (http.LastMethodSuccess = False) Then
    Debug.WriteLine(http.LastErrorText)
    Exit Sub
End If


Dim sbResponseBody As New Chilkat.StringBuilder
resp.GetBodySb(sbResponseBody)

Dim jResp As New Chilkat.JsonObject
jResp.LoadSb(sbResponseBody)
jResp.EmitCompact = False

Debug.WriteLine("Response Body:")
Debug.WriteLine(jResp.Emit())

Dim respStatusCode As Integer = resp.StatusCode
Debug.WriteLine("Response Status Code = " & respStatusCode)
If (respStatusCode >= 400) Then
    Debug.WriteLine("Response Header:")
    Debug.WriteLine(resp.Header)
    Debug.WriteLine("Failed.")

    Exit Sub
End If



' Sample JSON response:
' (Sample code for parsing the JSON response is shown below)

' {
'   "title": "",
'   "layout_type": "ordered",
'   "widgets": [
'     {
'       "definition": {
'         "type": "alert_graph",
'         "alert_id": "",
'         "viz_type": "timeseries",
'         "time": {
'           "live_span": "5m"
'         },
'         "title": "nisi et cupidatat sunt",
'         "title_align": "right",
'         "title_size": "officia anim occaecat aliq"
'       },
'       "id": 45068649,
'       "layout": {
'         "x": 0,
'         "y": 0,
'         "width": 0,
'         "height": 0,
'         "is_column_break": true
'       }
'     },
'     {
'       "definition": {
'         "type": "alert_graph",
'         "alert_id": "",
'         "viz_type": "timeseries",
'         "time": {
'           "live_span": "5m"
'         },
'         "title": "laborum dolor cillum ad",
'         "title_align": "center",
'         "title_size": "et"
'       },
'       "id": -40196020,
'       "layout": {
'         "x": 0,
'         "y": 0,
'         "width": 0,
'         "height": 0,
'         "is_column_break": false
'       }
'     }
'   ],
'   "author_handle": "test@datadoghq.com",
'   "author_name": "John Doe",
'   "created_at": "2017-08-17T07:10:36.438Z",
'   "description": "eiusmod do est velit enim",
'   "id": "123-abc-456",
'   "is_read_only": false,
'   "modified_at": "1996-07-08T08:32:43.112Z",
'   "notify_list": [
'     "commodo voluptate eu",
'     "consectetur amet"
'   ],
'   "reflow_type": "fixed",
'   "restricted_roles": [
'     "id cupidatat",
'     "quis ullamco"
'   ],
'   "tags": [
'     "quis qui mollit ex",
'     "ullamco enim cupidatat"
'   ],
'   "template_variable_presets": [
'     {
'       "name": "Lorem ex enim",
'       "template_variables": [
'         {
'           "name": "sed ",
'           "value": "quis eu",
'           "values": [
'             "in"
'           ]
'         },
'         {
'           "name": "non",
'           "value": "ea dolore esse elit Lorem",
'           "values": [
'             "sed voluptate nulla"
'           ]
'         }
'       ]
'     },
'     {
'       "name": "est ",
'       "template_variables": [
'         {
'           "name": "ullamco sint",
'           "value": "ad ex irure",
'           "values": [
'             "Duis elit dolor"
'           ]
'         },
'         {
'           "name": "proident adipisicing culpa cons",
'           "value": "occaecat",
'           "values": [
'             "esse fugiat"
'           ]
'         }
'       ]
'     }
'   ],
'   "template_variables": [
'     {
'       "name": "host1",
'       "available_values": [
'         "my-host",
'         "host1",
'         "host2"
'       ],
'       "default": "my-host",
'       "defaults": [
'         "my-host-1",
'         "my-host-2"
'       ],
'       "prefix": "host"
'     },
'     {
'       "name": "host1",
'       "available_values": [
'         "my-host",
'         "host1",
'         "host2"
'       ],
'       "default": "my-host",
'       "defaults": [
'         "my-host-1",
'         "my-host-2"
'       ],
'       "prefix": "host"
'     }
'   ],
'   "url": "/dashboard/123-abc-456/example-dashboard-title"
' }

' Sample code for parsing the JSON response...
' Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code



Dim v_Type As String
Dim Alert_id As String
Dim Viz_type As String
Dim Live_span As String
Dim Title As String
Dim Title_align As String
Dim Title_size As String
Dim id_int As Integer
Dim X As Integer
Dim Y As Integer
Dim Width As Integer
Dim Height As Integer
Dim Is_column_break As Boolean
Dim strVal As String
Dim name As String
Dim j As Integer
Dim count_j As Integer
Dim value As String
Dim k As Integer
Dim count_k As Integer
Dim default As String
Dim prefix As String

Dim title As String = jResp.StringOf("title")
Dim layout_type As String = jResp.StringOf("layout_type")
Dim author_handle As String = jResp.StringOf("author_handle")
Dim author_name As String = jResp.StringOf("author_name")
Dim created_at As String = jResp.StringOf("created_at")
Dim description As String = jResp.StringOf("description")
Dim id As String = jResp.StringOf("id")
Dim is_read_only As Boolean = jResp.BoolOf("is_read_only")
Dim modified_at As String = jResp.StringOf("modified_at")
Dim reflow_type As String = jResp.StringOf("reflow_type")
Dim url As String = jResp.StringOf("url")
Dim i As Integer = 0
Dim count_i As Integer = jResp.SizeOfArray("widgets")
While i < count_i
    jResp.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
End While
i = 0
count_i = jResp.SizeOfArray("notify_list")
While i < count_i
    jResp.I = i
    strVal = jResp.StringOf("notify_list[i]")
    i = i + 1
End While
i = 0
count_i = jResp.SizeOfArray("restricted_roles")
While i < count_i
    jResp.I = i
    strVal = jResp.StringOf("restricted_roles[i]")
    i = i + 1
End While
i = 0
count_i = jResp.SizeOfArray("tags")
While i < count_i
    jResp.I = i
    strVal = jResp.StringOf("tags[i]")
    i = i + 1
End While
i = 0
count_i = jResp.SizeOfArray("template_variable_presets")
While i < count_i
    jResp.I = i
    name = jResp.StringOf("template_variable_presets[i].name")
    j = 0
    count_j = jResp.SizeOfArray("template_variable_presets[i].template_variables")
    While j < count_j
        jResp.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")
        While k < count_k
            jResp.K = k
            strVal = jResp.StringOf("template_variable_presets[i].template_variables[j].values[k]")
            k = k + 1
        End While
        j = j + 1
    End While
    i = i + 1
End While
i = 0
count_i = jResp.SizeOfArray("template_variables")
While i < count_i
    jResp.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")
    While j < count_j
        jResp.J = j
        strVal = jResp.StringOf("template_variables[i].available_values[j]")
        j = j + 1
    End While
    j = 0
    count_j = jResp.SizeOfArray("template_variables[i].defaults")
    While j < count_j
        jResp.J = j
        strVal = jResp.StringOf("template_variables[i].defaults[j]")
        j = j + 1
    End While
    i = i + 1
End While

Curl Command

curl -X POST
	-H "Content-Type: application/json"
	-H "Accept: application/json"
	-d '{
  "title": "",
  "layout_type": "ordered",
  "widgets": [
    {
      "definition": {
        "type": "alert_graph",
        "alert_id": "",
        "viz_type": "timeseries",
        "time": {
          "live_span": "5m"
        },
        "title": "nisi et cupidatat sunt",
        "title_align": "right",
        "title_size": "officia anim occaecat aliq"
      },
      "id": 45068649,
      "layout": {
        "x": 0,
        "y": 0,
        "width": 0,
        "height": 0,
        "is_column_break": true
      }
    },
    {
      "definition": {
        "type": "alert_graph",
        "alert_id": "",
        "viz_type": "timeseries",
        "time": {
          "live_span": "5m"
        },
        "title": "laborum dolor cillum ad",
        "title_align": "center",
        "title_size": "et"
      },
      "id": -40196020,
      "layout": {
        "x": 0,
        "y": 0,
        "width": 0,
        "height": 0,
        "is_column_break": false
      }
    }
  ],
  "author_handle": "test@datadoghq.com",
  "author_name": "John Doe",
  "created_at": "2017-08-17T07:10:36.438Z",
  "description": "eiusmod do est velit enim",
  "id": "123-abc-456",
  "is_read_only": false,
  "modified_at": "1996-07-08T08:32:43.112Z",
  "notify_list": [
    "commodo voluptate eu",
    "consectetur amet"
  ],
  "reflow_type": "fixed",
  "restricted_roles": [
    "id cupidatat",
    "quis ullamco"
  ],
  "tags": [
    "quis qui mollit ex",
    "ullamco enim cupidatat"
  ],
  "template_variable_presets": [
    {
      "name": "Lorem ex enim",
      "template_variables": [
        {
          "name": "sed ",
          "value": "quis eu",
          "values": [
            "in"
          ]
        },
        {
          "name": "non",
          "value": "ea dolore esse elit Lorem",
          "values": [
            "sed voluptate nulla"
          ]
        }
      ]
    },
    {
      "name": "est ",
      "template_variables": [
        {
          "name": "ullamco sint",
          "value": "ad ex irure",
          "values": [
            "Duis elit dolor"
          ]
        },
        {
          "name": "proident adipisicing culpa cons",
          "value": "occaecat",
          "values": [
            "esse fugiat"
          ]
        }
      ]
    }
  ],
  "template_variables": [
    {
      "name": "host1",
      "available_values": [
        "my-host",
        "host1",
        "host2"
      ],
      "default": "my-host",
      "defaults": [
        "my-host-1",
        "my-host-2"
      ],
      "prefix": "host"
    },
    {
      "name": "host1",
      "available_values": [
        "my-host",
        "host1",
        "host2"
      ],
      "default": "my-host",
      "defaults": [
        "my-host-1",
        "my-host-2"
      ],
      "prefix": "host"
    }
  ],
  "url": "/dashboard/123-abc-456/example-dashboard-title"
}'
https://api.app.ddog-gov.com/api/v1/dashboard

Postman Collection Item JSON

{
  "name": "Create a new dashboard",
  "request": {
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "value": "application/json"
      },
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\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}",
      "options": {
        "raw": {
          "headerFamily": "json",
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{baseUrl}}/api/v1/dashboard",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v1",
        "dashboard"
      ]
    },
    "description": "Create a dashboard using the specified options. When defining queries in your widgets, take note of which queries should have the `as_count()` or `as_rate()` modifiers appended.\nRefer to the following [documentation](https://docs.datadoghq.com/developers/metrics/type_modifiers/?tab=count#in-application-modifiers) for more information on these modifiers."
  },
  "response": [
    {
      "name": "OK",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\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}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/dashboard",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "dashboard"
          ]
        }
      },
      "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": "Bad Request",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\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}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/dashboard",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "dashboard"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"Bad Request\",\n    \"Bad Request\"\n  ]\n}"
    },
    {
      "name": "Authentication Error",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\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}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/dashboard",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "dashboard"
          ]
        }
      },
      "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": "Too many requests",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\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}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/dashboard",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "dashboard"
          ]
        }
      },
      "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}"
    }
  ]
}