Chilkat Online Tools

SQL Server / Datadog API Collection / Update a dashboard

Back to Collection Items

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    DECLARE @iTmp0 int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    -- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    -- 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"
    -- }

    DECLARE @json int
    -- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @json OUT

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

    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Content-Type', 'application/json'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Accept', 'application/json'

    DECLARE @sbRequestBody int
    -- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbRequestBody OUT

    EXEC sp_OAMethod @json, 'EmitSb', @success OUT, @sbRequestBody

    DECLARE @resp int
    EXEC sp_OAMethod @http, 'PTextSb', @resp OUT, 'PUT', 'https://api.app.ddog-gov.com/api/v1/dashboard/:dashboard_id', @sbRequestBody, 'utf-8', 'application/json', 0, 0
    EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
    IF @iTmp0 = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @json
        EXEC @hr = sp_OADestroy @sbRequestBody
        RETURN
      END

    DECLARE @sbResponseBody int
    -- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbResponseBody OUT

    EXEC sp_OAMethod @resp, 'GetBodySb', @success OUT, @sbResponseBody

    DECLARE @jResp int
    -- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jResp OUT

    EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
    EXEC sp_OASetProperty @jResp, 'EmitCompact', 0


    PRINT 'Response Body:'
    EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
    PRINT @sTmp0

    DECLARE @respStatusCode int
    EXEC sp_OAGetProperty @resp, 'StatusCode', @respStatusCode OUT

    PRINT 'Response Status Code = ' + @respStatusCode
    IF @respStatusCode >= 400
      BEGIN

        PRINT 'Response Header:'
        EXEC sp_OAGetProperty @resp, 'Header', @sTmp0 OUT
        PRINT @sTmp0

        PRINT 'Failed.'
        EXEC @hr = sp_OADestroy @resp

        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @json
        EXEC @hr = sp_OADestroy @sbRequestBody
        EXEC @hr = sp_OADestroy @sbResponseBody
        EXEC @hr = sp_OADestroy @jResp
        RETURN
      END
    EXEC @hr = sp_OADestroy @resp

    -- 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

    DECLARE @v_Type nvarchar(4000)

    DECLARE @Alert_id nvarchar(4000)

    DECLARE @Viz_type nvarchar(4000)

    DECLARE @Live_span nvarchar(4000)

    DECLARE @Title nvarchar(4000)

    DECLARE @Title_align nvarchar(4000)

    DECLARE @Title_size nvarchar(4000)

    DECLARE @id_int int

    DECLARE @X int

    DECLARE @Y int

    DECLARE @Width int

    DECLARE @Height int

    DECLARE @Is_column_break int

    DECLARE @strVal nvarchar(4000)

    DECLARE @name nvarchar(4000)

    DECLARE @j int

    DECLARE @count_j int

    DECLARE @value nvarchar(4000)

    DECLARE @k int

    DECLARE @count_k int

    DECLARE @default nvarchar(4000)

    DECLARE @prefix nvarchar(4000)

    DECLARE @title nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @title OUT, 'title'
    DECLARE @layout_type nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @layout_type OUT, 'layout_type'
    DECLARE @author_handle nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @author_handle OUT, 'author_handle'
    DECLARE @author_name nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @author_name OUT, 'author_name'
    DECLARE @created_at nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @created_at OUT, 'created_at'
    DECLARE @description nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @description OUT, 'description'
    DECLARE @id nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @id OUT, 'id'
    DECLARE @is_read_only int
    EXEC sp_OAMethod @jResp, 'BoolOf', @is_read_only OUT, 'is_read_only'
    DECLARE @modified_at nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @modified_at OUT, 'modified_at'
    DECLARE @reflow_type nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @reflow_type OUT, 'reflow_type'
    DECLARE @url nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @url OUT, 'url'
    DECLARE @i int
    SELECT @i = 0
    DECLARE @count_i int
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'widgets'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @v_Type OUT, 'widgets[i].definition.type'
        EXEC sp_OAMethod @jResp, 'StringOf', @Alert_id OUT, 'widgets[i].definition.alert_id'
        EXEC sp_OAMethod @jResp, 'StringOf', @Viz_type OUT, 'widgets[i].definition.viz_type'
        EXEC sp_OAMethod @jResp, 'StringOf', @Live_span OUT, 'widgets[i].definition.time.live_span'
        EXEC sp_OAMethod @jResp, 'StringOf', @Title OUT, 'widgets[i].definition.title'
        EXEC sp_OAMethod @jResp, 'StringOf', @Title_align OUT, 'widgets[i].definition.title_align'
        EXEC sp_OAMethod @jResp, 'StringOf', @Title_size OUT, 'widgets[i].definition.title_size'
        EXEC sp_OAMethod @jResp, 'IntOf', @id_int OUT, 'widgets[i].id'
        EXEC sp_OAMethod @jResp, 'IntOf', @X OUT, 'widgets[i].layout.x'
        EXEC sp_OAMethod @jResp, 'IntOf', @Y OUT, 'widgets[i].layout.y'
        EXEC sp_OAMethod @jResp, 'IntOf', @Width OUT, 'widgets[i].layout.width'
        EXEC sp_OAMethod @jResp, 'IntOf', @Height OUT, 'widgets[i].layout.height'
        EXEC sp_OAMethod @jResp, 'BoolOf', @Is_column_break OUT, 'widgets[i].layout.is_column_break'
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'notify_list'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'notify_list[i]'
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'restricted_roles'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'restricted_roles[i]'
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'tags'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'tags[i]'
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'template_variable_presets'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'template_variable_presets[i].name'
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'template_variable_presets[i].template_variables'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'template_variable_presets[i].template_variables[j].name'
            EXEC sp_OAMethod @jResp, 'StringOf', @value OUT, 'template_variable_presets[i].template_variables[j].value'
            SELECT @k = 0
            EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'template_variable_presets[i].template_variables[j].values'
            WHILE @k < @count_k
              BEGIN
                EXEC sp_OASetProperty @jResp, 'K', @k
                EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'template_variable_presets[i].template_variables[j].values[k]'
                SELECT @k = @k + 1
              END
            SELECT @j = @j + 1
          END
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'template_variables'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'template_variables[i].name'
        EXEC sp_OAMethod @jResp, 'StringOf', @default OUT, 'template_variables[i].default'
        EXEC sp_OAMethod @jResp, 'StringOf', @prefix OUT, 'template_variables[i].prefix'
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'template_variables[i].available_values'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'template_variables[i].available_values[j]'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'template_variables[i].defaults'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'template_variables[i].defaults[j]'
            SELECT @j = @j + 1
          END
        SELECT @i = @i + 1
      END

    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @json
    EXEC @hr = sp_OADestroy @sbRequestBody
    EXEC @hr = sp_OADestroy @sbResponseBody
    EXEC @hr = sp_OADestroy @jResp


END
GO

Curl Command

curl -X PUT
	-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/:dashboard_id

Postman Collection Item JSON

{
  "name": "Update a dashboard",
  "request": {
    "method": "PUT",
    "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/:dashboard_id",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v1",
        "dashboard",
        ":dashboard_id"
      ],
      "variable": [
        {
          "key": "dashboard_id",
          "value": "tempor Ut sed velit"
        }
      ]
    },
    "description": "Update a dashboard using the specified ID."
  },
  "response": [
    {
      "name": "OK",
      "originalRequest": {
        "method": "PUT",
        "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/: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": "Bad Request",
      "originalRequest": {
        "method": "PUT",
        "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/:dashboard_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "dashboard",
            ":dashboard_id"
          ],
          "variable": [
            {
              "key": "dashboard_id"
            }
          ]
        }
      },
      "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": "PUT",
        "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/: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": "PUT",
        "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/: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": "PUT",
        "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/: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}"
    }
  ]
}