Chilkat Online Tools

PowerBuilder / Datadog API Collection / Update a notebook

Back to Collection Items

integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_Json
oleobject loo_SbRequestBody
oleobject loo_Resp
oleobject loo_SbResponseBody
oleobject loo_JResp
integer li_RespStatusCode
string ls_Id
string ls_V_type
string ls_DefinitionType
string ls_Text
integer li_Id
string ls_V_Type
string ls_Live_span
string ls_Name
string ls_Created_at
integer li_Disabled
string ls_V_Email
string ls_Handle
string ls_Icon
string ls_AuthorName
string ls_Status
string ls_Title
integer li_Verified
string ls_Created
integer li_Is_template
integer li_Take_snapshots
string ls_MetadataType
string ls_Modified
string ls_AttributesStatus
integer i
integer li_Count_i

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

loo_Http = create oleobject
li_rc = loo_Http.ConnectToNewObject("Chilkat_9_5_0.Http")
if li_rc < 0 then
    destroy loo_Http
    MessageBox("Error","Connecting to COM object failed")
    return
end if

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

// The following JSON is sent in the request body.

// {
//   "data": {
//     "attributes": {
//       "cells": [
//         {
//           "attributes": {
//             "definition": {
//               "text": "## Some updated test markdown\n\nWith some example content.",
//               "type": "markdown"
//             }
//           },
//           "type": "notebook_cells"
//         },
//         {
//           "attributes": {
//             "definition": {
//               "requests": [
//                 {
//                   "display_type": "bars",
//                   "q": "avg:system.load.1{*}",
//                   "style": {
//                     "line_type": "solid",
//                     "line_width": "normal",
//                     "palette": "warm"
//                   }
//                 }
//               ],
//               "show_legend": true,
//               "type": "timeseries",
//               "yaxis": {
//                 "scale": "linear"
//               }
//             },
//             "graph_size": "m",
//             "split_by": {
//               "keys": [
//               ],
//               "tags": [
//               ]
//             },
//             "time": null
//           },
//           "id": "abcd1234",
//           "type": "notebook_cells"
//         }
//       ],
//       "name": "Example Notebook",
//       "time": {
//         "live_span": "1h"
//       }
//     },
//     "type": "notebooks"
//   }
// }

loo_Json = create oleobject
li_rc = loo_Json.ConnectToNewObject("Chilkat_9_5_0.JsonObject")

loo_Json.UpdateString("data.attributes.cells[0].attributes.definition.text","## Some updated test markdown~n~nWith some example content.")
loo_Json.UpdateString("data.attributes.cells[0].attributes.definition.type","markdown")
loo_Json.UpdateString("data.attributes.cells[0].type","notebook_cells")
loo_Json.UpdateString("data.attributes.cells[1].attributes.definition.requests[0].display_type","bars")
loo_Json.UpdateString("data.attributes.cells[1].attributes.definition.requests[0].q","avg:system.load.1{*}")
loo_Json.UpdateString("data.attributes.cells[1].attributes.definition.requests[0].style.line_type","solid")
loo_Json.UpdateString("data.attributes.cells[1].attributes.definition.requests[0].style.line_width","normal")
loo_Json.UpdateString("data.attributes.cells[1].attributes.definition.requests[0].style.palette","warm")
loo_Json.UpdateBool("data.attributes.cells[1].attributes.definition.show_legend",1)
loo_Json.UpdateString("data.attributes.cells[1].attributes.definition.type","timeseries")
loo_Json.UpdateString("data.attributes.cells[1].attributes.definition.yaxis.scale","linear")
loo_Json.UpdateString("data.attributes.cells[1].attributes.graph_size","m")
loo_Json.UpdateNewArray("data.attributes.cells[1].attributes.split_by.keys")
loo_Json.UpdateNewArray("data.attributes.cells[1].attributes.split_by.tags")
loo_Json.UpdateNull("data.attributes.cells[1].attributes.time")
loo_Json.UpdateString("data.attributes.cells[1].id","abcd1234")
loo_Json.UpdateString("data.attributes.cells[1].type","notebook_cells")
loo_Json.UpdateString("data.attributes.name","Example Notebook")
loo_Json.UpdateString("data.attributes.time.live_span","1h")
loo_Json.UpdateString("data.type","notebooks")

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

loo_SbRequestBody = create oleobject
li_rc = loo_SbRequestBody.ConnectToNewObject("Chilkat_9_5_0.StringBuilder")

loo_Json.EmitSb(loo_SbRequestBody)

loo_Resp = loo_Http.PTextSb("PUT","https://api.app.ddog-gov.com/api/v1/notebooks/:notebook_id",loo_SbRequestBody,"utf-8","application/json",0,0)
if loo_Http.LastMethodSuccess = 0 then
    Write-Debug loo_Http.LastErrorText
    destroy loo_Http
    destroy loo_Json
    destroy loo_SbRequestBody
    return
end if

loo_SbResponseBody = create oleobject
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat_9_5_0.StringBuilder")

loo_Resp.GetBodySb(loo_SbResponseBody)

loo_JResp = create oleobject
li_rc = loo_JResp.ConnectToNewObject("Chilkat_9_5_0.JsonObject")

loo_JResp.LoadSb(loo_SbResponseBody)
loo_JResp.EmitCompact = 0

Write-Debug "Response Body:"
Write-Debug loo_JResp.Emit()

li_RespStatusCode = loo_Resp.StatusCode
Write-Debug "Response Status Code = " + string(li_RespStatusCode)
if li_RespStatusCode >= 400 then
    Write-Debug "Response Header:"
    Write-Debug loo_Resp.Header
    Write-Debug "Failed."
    destroy loo_Resp
    destroy loo_Http
    destroy loo_Json
    destroy loo_SbRequestBody
    destroy loo_SbResponseBody
    destroy loo_JResp
    return
end if

destroy loo_Resp

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

// {
//   "data": {
//     "id": 123456,
//     "type": "notebooks",
//     "attributes": {
//       "cells": [
//         {
//           "id": "abcd1234",
//           "type": "notebook_cells",
//           "attributes": {
//             "definition": {
//               "type": "markdown",
//               "text": "# Example Header \nexample content"
//             }
//           }
//         },
//         {
//           "id": "abcd1234",
//           "type": "notebook_cells",
//           "attributes": {
//             "definition": {
//               "type": "markdown",
//               "text": "# Example Header \nexample content"
//             }
//           }
//         }
//       ],
//       "time": {
//         "live_span": "1h"
//       },
//       "name": "Example Notebook",
//       "author": {
//         "created_at": "1944-02-06T04:58:13.667Z",
//         "disabled": false,
//         "email": "tempor exercitation",
//         "handle": "est eu aliquip officia",
//         "icon": "nostrud n",
//         "name": "dolor dolor",
//         "status": "anim Ut pariatur",
//         "title": "eu",
//         "verified": true
//       },
//       "created": "2021-02-24T23:14:15.173964+00:00",
//       "metadata": {
//         "is_template": false,
//         "take_snapshots": false,
//         "type": "investigation"
//       },
//       "modified": "2021-02-24T23:15:23.274966+00:00",
//       "status": "published"
//     }
//   }
// }

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

li_Id = loo_JResp.IntOf("data.id")
ls_V_Type = loo_JResp.StringOf("data.type")
ls_Live_span = loo_JResp.StringOf("data.attributes.time.live_span")
ls_Name = loo_JResp.StringOf("data.attributes.name")
ls_Created_at = loo_JResp.StringOf("data.attributes.author.created_at")
li_Disabled = loo_JResp.BoolOf("data.attributes.author.disabled")
ls_V_Email = loo_JResp.StringOf("data.attributes.author.email")
ls_Handle = loo_JResp.StringOf("data.attributes.author.handle")
ls_Icon = loo_JResp.StringOf("data.attributes.author.icon")
ls_AuthorName = loo_JResp.StringOf("data.attributes.author.name")
ls_Status = loo_JResp.StringOf("data.attributes.author.status")
ls_Title = loo_JResp.StringOf("data.attributes.author.title")
li_Verified = loo_JResp.BoolOf("data.attributes.author.verified")
ls_Created = loo_JResp.StringOf("data.attributes.created")
li_Is_template = loo_JResp.BoolOf("data.attributes.metadata.is_template")
li_Take_snapshots = loo_JResp.BoolOf("data.attributes.metadata.take_snapshots")
ls_MetadataType = loo_JResp.StringOf("data.attributes.metadata.type")
ls_Modified = loo_JResp.StringOf("data.attributes.modified")
ls_AttributesStatus = loo_JResp.StringOf("data.attributes.status")
i = 0
li_Count_i = loo_JResp.SizeOfArray("data.attributes.cells")
do while i < li_Count_i
    loo_JResp.I = i
    ls_Id = loo_JResp.StringOf("data.attributes.cells[i].id")
    ls_V_type = loo_JResp.StringOf("data.attributes.cells[i].type")
    ls_DefinitionType = loo_JResp.StringOf("data.attributes.cells[i].attributes.definition.type")
    ls_Text = loo_JResp.StringOf("data.attributes.cells[i].attributes.definition.text")
    i = i + 1
loop


destroy loo_Http
destroy loo_Json
destroy loo_SbRequestBody
destroy loo_SbResponseBody
destroy loo_JResp

Curl Command

curl -X PUT
	-H "Content-Type: application/json"
	-H "Accept: application/json"
	-d '{
  "data": {
    "attributes": {
      "cells": [
        {
          "attributes": {
            "definition": {
              "text": "## Some updated test markdown\n\nWith some example content.",
              "type": "markdown"
            }
          },
          "type": "notebook_cells"
        },
        {
          "attributes": {
            "definition": {
              "requests": [
                {
                  "display_type": "bars",
                  "q": "avg:system.load.1{*}",
                  "style": {
                    "line_type": "solid",
                    "line_width": "normal",
                    "palette": "warm"
                  }
                }
              ],
              "show_legend": true,
              "type": "timeseries",
              "yaxis": {
                "scale": "linear"
              }
            },
            "graph_size": "m",
            "split_by": {
              "keys": [],
              "tags": []
            },
            "time": null
          },
          "id": "abcd1234",
          "type": "notebook_cells"
        }
      ],
      "name": "Example Notebook",
      "time": {
        "live_span": "1h"
      }
    },
    "type": "notebooks"
  }
}'
https://api.app.ddog-gov.com/api/v1/notebooks/:notebook_id

Postman Collection Item JSON

{
  "name": "Update a notebook",
  "request": {
    "method": "PUT",
    "header": [
      {
        "key": "Content-Type",
        "value": "application/json"
      },
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"data\": {\n    \"attributes\": {\n      \"cells\": [\n        {\n          \"attributes\": {\n            \"definition\": {\n              \"text\": \"## Some updated test markdown\\n\\nWith some example content.\",\n              \"type\": \"markdown\"\n            }\n          },\n          \"type\": \"notebook_cells\"\n        },\n        {\n          \"attributes\": {\n            \"definition\": {\n              \"requests\": [\n                {\n                  \"display_type\": \"bars\",\n                  \"q\": \"avg:system.load.1{*}\",\n                  \"style\": {\n                    \"line_type\": \"solid\",\n                    \"line_width\": \"normal\",\n                    \"palette\": \"warm\"\n                  }\n                }\n              ],\n              \"show_legend\": true,\n              \"type\": \"timeseries\",\n              \"yaxis\": {\n                \"scale\": \"linear\"\n              }\n            },\n            \"graph_size\": \"m\",\n            \"split_by\": {\n              \"keys\": [],\n              \"tags\": []\n            },\n            \"time\": null\n          },\n          \"id\": \"abcd1234\",\n          \"type\": \"notebook_cells\"\n        }\n      ],\n      \"name\": \"Example Notebook\",\n      \"time\": {\n        \"live_span\": \"1h\"\n      }\n    },\n    \"type\": \"notebooks\"\n  }\n}",
      "options": {
        "raw": {
          "headerFamily": "json",
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{baseUrl}}/api/v1/notebooks/:notebook_id",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v1",
        "notebooks",
        ":notebook_id"
      ],
      "variable": [
        {
          "key": "notebook_id",
          "value": "-62147425"
        }
      ]
    },
    "description": "Update a notebook 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  \"data\": {\n    \"attributes\": {\n      \"cells\": [\n        {\n          \"attributes\": {\n            \"definition\": {\n              \"text\": \"## Some updated test markdown\\n\\nWith some example content.\",\n              \"type\": \"markdown\"\n            }\n          },\n          \"type\": \"notebook_cells\"\n        },\n        {\n          \"attributes\": {\n            \"definition\": {\n              \"requests\": [\n                {\n                  \"display_type\": \"bars\",\n                  \"q\": \"avg:system.load.1{*}\",\n                  \"style\": {\n                    \"line_type\": \"solid\",\n                    \"line_width\": \"normal\",\n                    \"palette\": \"warm\"\n                  }\n                }\n              ],\n              \"show_legend\": true,\n              \"type\": \"timeseries\",\n              \"yaxis\": {\n                \"scale\": \"linear\"\n              }\n            },\n            \"graph_size\": \"m\",\n            \"split_by\": {\n              \"keys\": [],\n              \"tags\": []\n            },\n            \"time\": null\n          },\n          \"id\": \"abcd1234\",\n          \"type\": \"notebook_cells\"\n        }\n      ],\n      \"name\": \"Example Notebook\",\n      \"time\": {\n        \"live_span\": \"1h\"\n      }\n    },\n    \"type\": \"notebooks\"\n  }\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/notebooks/:notebook_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "notebooks",
            ":notebook_id"
          ],
          "variable": [
            {
              "key": "notebook_id"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"data\": {\n    \"id\": 123456,\n    \"type\": \"notebooks\",\n    \"attributes\": {\n      \"cells\": [\n        {\n          \"id\": \"abcd1234\",\n          \"type\": \"notebook_cells\",\n          \"attributes\": {\n            \"definition\": {\n              \"type\": \"markdown\",\n              \"text\": \"# Example Header \\nexample content\"\n            }\n          }\n        },\n        {\n          \"id\": \"abcd1234\",\n          \"type\": \"notebook_cells\",\n          \"attributes\": {\n            \"definition\": {\n              \"type\": \"markdown\",\n              \"text\": \"# Example Header \\nexample content\"\n            }\n          }\n        }\n      ],\n      \"time\": {\n        \"live_span\": \"1h\"\n      },\n      \"name\": \"Example Notebook\",\n      \"author\": {\n        \"created_at\": \"1944-02-06T04:58:13.667Z\",\n        \"disabled\": false,\n        \"email\": \"tempor exercitation\",\n        \"handle\": \"est eu aliquip officia\",\n        \"icon\": \"nostrud n\",\n        \"name\": \"dolor dolor\",\n        \"status\": \"anim Ut pariatur\",\n        \"title\": \"eu\",\n        \"verified\": true\n      },\n      \"created\": \"2021-02-24T23:14:15.173964+00:00\",\n      \"metadata\": {\n        \"is_template\": false,\n        \"take_snapshots\": false,\n        \"type\": \"investigation\"\n      },\n      \"modified\": \"2021-02-24T23:15:23.274966+00:00\",\n      \"status\": \"published\"\n    }\n  }\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  \"data\": {\n    \"attributes\": {\n      \"cells\": [\n        {\n          \"attributes\": {\n            \"definition\": {\n              \"text\": \"## Some updated test markdown\\n\\nWith some example content.\",\n              \"type\": \"markdown\"\n            }\n          },\n          \"type\": \"notebook_cells\"\n        },\n        {\n          \"attributes\": {\n            \"definition\": {\n              \"requests\": [\n                {\n                  \"display_type\": \"bars\",\n                  \"q\": \"avg:system.load.1{*}\",\n                  \"style\": {\n                    \"line_type\": \"solid\",\n                    \"line_width\": \"normal\",\n                    \"palette\": \"warm\"\n                  }\n                }\n              ],\n              \"show_legend\": true,\n              \"type\": \"timeseries\",\n              \"yaxis\": {\n                \"scale\": \"linear\"\n              }\n            },\n            \"graph_size\": \"m\",\n            \"split_by\": {\n              \"keys\": [],\n              \"tags\": []\n            },\n            \"time\": null\n          },\n          \"id\": \"abcd1234\",\n          \"type\": \"notebook_cells\"\n        }\n      ],\n      \"name\": \"Example Notebook\",\n      \"time\": {\n        \"live_span\": \"1h\"\n      }\n    },\n    \"type\": \"notebooks\"\n  }\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/notebooks/:notebook_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "notebooks",
            ":notebook_id"
          ],
          "variable": [
            {
              "key": "notebook_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  \"data\": {\n    \"attributes\": {\n      \"cells\": [\n        {\n          \"attributes\": {\n            \"definition\": {\n              \"text\": \"## Some updated test markdown\\n\\nWith some example content.\",\n              \"type\": \"markdown\"\n            }\n          },\n          \"type\": \"notebook_cells\"\n        },\n        {\n          \"attributes\": {\n            \"definition\": {\n              \"requests\": [\n                {\n                  \"display_type\": \"bars\",\n                  \"q\": \"avg:system.load.1{*}\",\n                  \"style\": {\n                    \"line_type\": \"solid\",\n                    \"line_width\": \"normal\",\n                    \"palette\": \"warm\"\n                  }\n                }\n              ],\n              \"show_legend\": true,\n              \"type\": \"timeseries\",\n              \"yaxis\": {\n                \"scale\": \"linear\"\n              }\n            },\n            \"graph_size\": \"m\",\n            \"split_by\": {\n              \"keys\": [],\n              \"tags\": []\n            },\n            \"time\": null\n          },\n          \"id\": \"abcd1234\",\n          \"type\": \"notebook_cells\"\n        }\n      ],\n      \"name\": \"Example Notebook\",\n      \"time\": {\n        \"live_span\": \"1h\"\n      }\n    },\n    \"type\": \"notebooks\"\n  }\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/notebooks/:notebook_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "notebooks",
            ":notebook_id"
          ],
          "variable": [
            {
              "key": "notebook_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": "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  \"data\": {\n    \"attributes\": {\n      \"cells\": [\n        {\n          \"attributes\": {\n            \"definition\": {\n              \"text\": \"## Some updated test markdown\\n\\nWith some example content.\",\n              \"type\": \"markdown\"\n            }\n          },\n          \"type\": \"notebook_cells\"\n        },\n        {\n          \"attributes\": {\n            \"definition\": {\n              \"requests\": [\n                {\n                  \"display_type\": \"bars\",\n                  \"q\": \"avg:system.load.1{*}\",\n                  \"style\": {\n                    \"line_type\": \"solid\",\n                    \"line_width\": \"normal\",\n                    \"palette\": \"warm\"\n                  }\n                }\n              ],\n              \"show_legend\": true,\n              \"type\": \"timeseries\",\n              \"yaxis\": {\n                \"scale\": \"linear\"\n              }\n            },\n            \"graph_size\": \"m\",\n            \"split_by\": {\n              \"keys\": [],\n              \"tags\": []\n            },\n            \"time\": null\n          },\n          \"id\": \"abcd1234\",\n          \"type\": \"notebook_cells\"\n        }\n      ],\n      \"name\": \"Example Notebook\",\n      \"time\": {\n        \"live_span\": \"1h\"\n      }\n    },\n    \"type\": \"notebooks\"\n  }\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/notebooks/:notebook_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "notebooks",
            ":notebook_id"
          ],
          "variable": [
            {
              "key": "notebook_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": "Conflict",
      "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  \"data\": {\n    \"attributes\": {\n      \"cells\": [\n        {\n          \"attributes\": {\n            \"definition\": {\n              \"text\": \"## Some updated test markdown\\n\\nWith some example content.\",\n              \"type\": \"markdown\"\n            }\n          },\n          \"type\": \"notebook_cells\"\n        },\n        {\n          \"attributes\": {\n            \"definition\": {\n              \"requests\": [\n                {\n                  \"display_type\": \"bars\",\n                  \"q\": \"avg:system.load.1{*}\",\n                  \"style\": {\n                    \"line_type\": \"solid\",\n                    \"line_width\": \"normal\",\n                    \"palette\": \"warm\"\n                  }\n                }\n              ],\n              \"show_legend\": true,\n              \"type\": \"timeseries\",\n              \"yaxis\": {\n                \"scale\": \"linear\"\n              }\n            },\n            \"graph_size\": \"m\",\n            \"split_by\": {\n              \"keys\": [],\n              \"tags\": []\n            },\n            \"time\": null\n          },\n          \"id\": \"abcd1234\",\n          \"type\": \"notebook_cells\"\n        }\n      ],\n      \"name\": \"Example Notebook\",\n      \"time\": {\n        \"live_span\": \"1h\"\n      }\n    },\n    \"type\": \"notebooks\"\n  }\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/notebooks/:notebook_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "notebooks",
            ":notebook_id"
          ],
          "variable": [
            {
              "key": "notebook_id"
            }
          ]
        }
      },
      "status": "Conflict",
      "code": 409,
      "_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  \"data\": {\n    \"attributes\": {\n      \"cells\": [\n        {\n          \"attributes\": {\n            \"definition\": {\n              \"text\": \"## Some updated test markdown\\n\\nWith some example content.\",\n              \"type\": \"markdown\"\n            }\n          },\n          \"type\": \"notebook_cells\"\n        },\n        {\n          \"attributes\": {\n            \"definition\": {\n              \"requests\": [\n                {\n                  \"display_type\": \"bars\",\n                  \"q\": \"avg:system.load.1{*}\",\n                  \"style\": {\n                    \"line_type\": \"solid\",\n                    \"line_width\": \"normal\",\n                    \"palette\": \"warm\"\n                  }\n                }\n              ],\n              \"show_legend\": true,\n              \"type\": \"timeseries\",\n              \"yaxis\": {\n                \"scale\": \"linear\"\n              }\n            },\n            \"graph_size\": \"m\",\n            \"split_by\": {\n              \"keys\": [],\n              \"tags\": []\n            },\n            \"time\": null\n          },\n          \"id\": \"abcd1234\",\n          \"type\": \"notebook_cells\"\n        }\n      ],\n      \"name\": \"Example Notebook\",\n      \"time\": {\n        \"live_span\": \"1h\"\n      }\n    },\n    \"type\": \"notebooks\"\n  }\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/notebooks/:notebook_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "notebooks",
            ":notebook_id"
          ],
          "variable": [
            {
              "key": "notebook_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}"
    }
  ]
}