Back to Collection Items
func chilkatTest() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let http = CkoHttp()!
var success: Bool
// 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"
// }
let json = CkoJsonObject()!
json.update("title", value: "")
json.update("layout_type", value: "ordered")
json.update("widgets[0].definition.type", value: "alert_graph")
json.update("widgets[0].definition.alert_id", value: "")
json.update("widgets[0].definition.viz_type", value: "timeseries")
json.update("widgets[0].definition.time.live_span", value: "5m")
json.update("widgets[0].definition.title", value: "nisi et cupidatat sunt")
json.update("widgets[0].definition.title_align", value: "right")
json.update("widgets[0].definition.title_size", value: "officia anim occaecat aliq")
json.updateInt("widgets[0].id", value: 45068649)
json.updateInt("widgets[0].layout.x", value: 0)
json.updateInt("widgets[0].layout.y", value: 0)
json.updateInt("widgets[0].layout.width", value: 0)
json.updateInt("widgets[0].layout.height", value: 0)
json.updateBool("widgets[0].layout.is_column_break", value: true)
json.update("widgets[1].definition.type", value: "alert_graph")
json.update("widgets[1].definition.alert_id", value: "")
json.update("widgets[1].definition.viz_type", value: "timeseries")
json.update("widgets[1].definition.time.live_span", value: "5m")
json.update("widgets[1].definition.title", value: "laborum dolor cillum ad")
json.update("widgets[1].definition.title_align", value: "center")
json.update("widgets[1].definition.title_size", value: "et")
json.updateInt("widgets[1].id", value: -40196020)
json.updateInt("widgets[1].layout.x", value: 0)
json.updateInt("widgets[1].layout.y", value: 0)
json.updateInt("widgets[1].layout.width", value: 0)
json.updateInt("widgets[1].layout.height", value: 0)
json.updateBool("widgets[1].layout.is_column_break", value: false)
json.update("author_handle", value: "test@datadoghq.com")
json.update("author_name", value: "John Doe")
json.update("created_at", value: "2017-08-17T07:10:36.438Z")
json.update("description", value: "eiusmod do est velit enim")
json.update("id", value: "123-abc-456")
json.updateBool("is_read_only", value: false)
json.update("modified_at", value: "1996-07-08T08:32:43.112Z")
json.update("notify_list[0]", value: "commodo voluptate eu")
json.update("notify_list[1]", value: "consectetur amet")
json.update("reflow_type", value: "fixed")
json.update("restricted_roles[0]", value: "id cupidatat")
json.update("restricted_roles[1]", value: "quis ullamco")
json.update("tags[0]", value: "quis qui mollit ex")
json.update("tags[1]", value: "ullamco enim cupidatat")
json.update("template_variable_presets[0].name", value: "Lorem ex enim")
json.update("template_variable_presets[0].template_variables[0].name", value: "sed ")
json.update("template_variable_presets[0].template_variables[0].value", value: "quis eu")
json.update("template_variable_presets[0].template_variables[0].values[0]", value: "in")
json.update("template_variable_presets[0].template_variables[1].name", value: "non")
json.update("template_variable_presets[0].template_variables[1].value", value: "ea dolore esse elit Lorem")
json.update("template_variable_presets[0].template_variables[1].values[0]", value: "sed voluptate nulla")
json.update("template_variable_presets[1].name", value: "est ")
json.update("template_variable_presets[1].template_variables[0].name", value: "ullamco sint")
json.update("template_variable_presets[1].template_variables[0].value", value: "ad ex irure")
json.update("template_variable_presets[1].template_variables[0].values[0]", value: "Duis elit dolor")
json.update("template_variable_presets[1].template_variables[1].name", value: "proident adipisicing culpa cons")
json.update("template_variable_presets[1].template_variables[1].value", value: "occaecat")
json.update("template_variable_presets[1].template_variables[1].values[0]", value: "esse fugiat")
json.update("template_variables[0].name", value: "host1")
json.update("template_variables[0].available_values[0]", value: "my-host")
json.update("template_variables[0].available_values[1]", value: "host1")
json.update("template_variables[0].available_values[2]", value: "host2")
json.update("template_variables[0].default", value: "my-host")
json.update("template_variables[0].defaults[0]", value: "my-host-1")
json.update("template_variables[0].defaults[1]", value: "my-host-2")
json.update("template_variables[0].prefix", value: "host")
json.update("template_variables[1].name", value: "host1")
json.update("template_variables[1].available_values[0]", value: "my-host")
json.update("template_variables[1].available_values[1]", value: "host1")
json.update("template_variables[1].available_values[2]", value: "host2")
json.update("template_variables[1].default", value: "my-host")
json.update("template_variables[1].defaults[0]", value: "my-host-1")
json.update("template_variables[1].defaults[1]", value: "my-host-2")
json.update("template_variables[1].prefix", value: "host")
json.update("url", value: "/dashboard/123-abc-456/example-dashboard-title")
http.setRequestHeader("Content-Type", value: "application/json")
http.setRequestHeader("Accept", value: "application/json")
let sbRequestBody = CkoStringBuilder()!
json.emitSb(sbRequestBody)
var resp: CkoHttpResponse? = http.pTextSb("PUT", url: "https://api.app.ddog-gov.com/api/v1/dashboard/:dashboard_id", textData: sbRequestBody, charset: "utf-8", contentType: "application/json", md5: false, gzip: false)
if http.lastMethodSuccess == false {
print("\(http.lastErrorText!)")
return
}
let sbResponseBody = CkoStringBuilder()!
resp!.getBodySb(sbResponseBody)
let jResp = CkoJsonObject()!
jResp.loadSb(sbResponseBody)
jResp.emitCompact = false
print("Response Body:")
print("\(jResp.emit()!)")
var respStatusCode: Int = resp!.statusCode.intValue
print("Response Status Code = \(respStatusCode)")
if respStatusCode >= 400 {
print("Response Header:")
print("\(resp!.header!)")
print("Failed.")
resp = nil
return
}
resp = nil
// 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
var v_Type: String?
var Alert_id: String?
var Viz_type: String?
var Live_span: String?
var Title: String?
var Title_align: String?
var Title_size: String?
var id_int: Int
var X: Int
var Y: Int
var Width: Int
var Height: Int
var Is_column_break: Bool
var strVal: String?
var name: String?
var j: Int
var count_j: Int
var value: String?
var k: Int
var count_k: Int
var default: String?
var prefix: String?
var title: String? = jResp.string(of: "title")
var layout_type: String? = jResp.string(of: "layout_type")
var author_handle: String? = jResp.string(of: "author_handle")
var author_name: String? = jResp.string(of: "author_name")
var created_at: String? = jResp.string(of: "created_at")
var description: String? = jResp.string(of: "description")
var id: String? = jResp.string(of: "id")
var is_read_only: Bool = jResp.bool(of: "is_read_only")
var modified_at: String? = jResp.string(of: "modified_at")
var reflow_type: String? = jResp.string(of: "reflow_type")
var url: String? = jResp.string(of: "url")
var i: Int = 0
var count_i: Int = jResp.size(ofArray: "widgets").intValue
while i < count_i {
jResp.i = i
v_Type = jResp.string(of: "widgets[i].definition.type")
Alert_id = jResp.string(of: "widgets[i].definition.alert_id")
Viz_type = jResp.string(of: "widgets[i].definition.viz_type")
Live_span = jResp.string(of: "widgets[i].definition.time.live_span")
Title = jResp.string(of: "widgets[i].definition.title")
Title_align = jResp.string(of: "widgets[i].definition.title_align")
Title_size = jResp.string(of: "widgets[i].definition.title_size")
id_int = jResp.int(of: "widgets[i].id").intValue
X = jResp.int(of: "widgets[i].layout.x").intValue
Y = jResp.int(of: "widgets[i].layout.y").intValue
Width = jResp.int(of: "widgets[i].layout.width").intValue
Height = jResp.int(of: "widgets[i].layout.height").intValue
Is_column_break = jResp.bool(of: "widgets[i].layout.is_column_break")
i = i + 1
}
i = 0
count_i = jResp.size(ofArray: "notify_list").intValue
while i < count_i {
jResp.i = i
strVal = jResp.string(of: "notify_list[i]")
i = i + 1
}
i = 0
count_i = jResp.size(ofArray: "restricted_roles").intValue
while i < count_i {
jResp.i = i
strVal = jResp.string(of: "restricted_roles[i]")
i = i + 1
}
i = 0
count_i = jResp.size(ofArray: "tags").intValue
while i < count_i {
jResp.i = i
strVal = jResp.string(of: "tags[i]")
i = i + 1
}
i = 0
count_i = jResp.size(ofArray: "template_variable_presets").intValue
while i < count_i {
jResp.i = i
name = jResp.string(of: "template_variable_presets[i].name")
j = 0
count_j = jResp.size(ofArray: "template_variable_presets[i].template_variables").intValue
while j < count_j {
jResp.j = j
name = jResp.string(of: "template_variable_presets[i].template_variables[j].name")
value = jResp.string(of: "template_variable_presets[i].template_variables[j].value")
k = 0
count_k = jResp.size(ofArray: "template_variable_presets[i].template_variables[j].values").intValue
while k < count_k {
jResp.k = k
strVal = jResp.string(of: "template_variable_presets[i].template_variables[j].values[k]")
k = k + 1
}
j = j + 1
}
i = i + 1
}
i = 0
count_i = jResp.size(ofArray: "template_variables").intValue
while i < count_i {
jResp.i = i
name = jResp.string(of: "template_variables[i].name")
default = jResp.string(of: "template_variables[i].default")
prefix = jResp.string(of: "template_variables[i].prefix")
j = 0
count_j = jResp.size(ofArray: "template_variables[i].available_values").intValue
while j < count_j {
jResp.j = j
strVal = jResp.string(of: "template_variables[i].available_values[j]")
j = j + 1
}
j = 0
count_j = jResp.size(ofArray: "template_variables[i].defaults").intValue
while j < count_j {
jResp.j = j
strVal = jResp.string(of: "template_variables[i].defaults[j]")
j = j + 1
}
i = i + 1
}
}
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}"
}
]
}