Chilkat Online Tools

DataFlex / Datadog API Collection / Update a notebook

Back to Collection Items

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Handle hoJson
    Variant vSbRequestBody
    Handle hoSbRequestBody
    Variant vResp
    Handle hoResp
    Variant vSbResponseBody
    Handle hoSbResponseBody
    Handle hoJResp
    Integer iRespStatusCode
    String sId
    String sV_type
    String sDefinitionType
    String sText
    Integer iId
    String sV_Type
    String sLive_span
    String sName
    String sCreated_at
    Boolean iDisabled
    String sV_Email
    String sHandle
    String sIcon
    String sAuthorName
    String sStatus
    String sTitle
    Boolean iVerified
    String sCreated
    Boolean iIs_template
    Boolean iTake_snapshots
    String sMetadataType
    String sModified
    String sAttributesStatus
    Integer i
    Integer iCount_i
    String sTemp1
    Boolean bTemp1

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

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

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

    Get Create (RefClass(cComChilkatJsonObject)) To hoJson
    If (Not(IsComObjectCreated(hoJson))) Begin
        Send CreateComObject of hoJson
    End
    Get ComUpdateString Of hoJson "data.attributes.cells[0].attributes.definition.text" "## Some updated test markdown" + (character(10)) + (character(10)) + "With some example content." To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.cells[0].attributes.definition.type" "markdown" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.cells[0].type" "notebook_cells" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.cells[1].attributes.definition.requests[0].display_type" "bars" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.cells[1].attributes.definition.requests[0].q" "avg:system.load.1{*}" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.cells[1].attributes.definition.requests[0].style.line_type" "solid" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.cells[1].attributes.definition.requests[0].style.line_width" "normal" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.cells[1].attributes.definition.requests[0].style.palette" "warm" To iSuccess
    Get ComUpdateBool Of hoJson "data.attributes.cells[1].attributes.definition.show_legend" True To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.cells[1].attributes.definition.type" "timeseries" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.cells[1].attributes.definition.yaxis.scale" "linear" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.cells[1].attributes.graph_size" "m" To iSuccess
    Get ComUpdateNewArray Of hoJson "data.attributes.cells[1].attributes.split_by.keys" To iSuccess
    Get ComUpdateNewArray Of hoJson "data.attributes.cells[1].attributes.split_by.tags" To iSuccess
    Get ComUpdateNull Of hoJson "data.attributes.cells[1].attributes.time" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.cells[1].id" "abcd1234" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.cells[1].type" "notebook_cells" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.name" "Example Notebook" To iSuccess
    Get ComUpdateString Of hoJson "data.attributes.time.live_span" "1h" To iSuccess
    Get ComUpdateString Of hoJson "data.type" "notebooks" To iSuccess

    Send ComSetRequestHeader To hoHttp "Content-Type" "application/json"
    Send ComSetRequestHeader To hoHttp "Accept" "application/json"

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSbRequestBody
    If (Not(IsComObjectCreated(hoSbRequestBody))) Begin
        Send CreateComObject of hoSbRequestBody
    End
    Get pvComObject of hoSbRequestBody to vSbRequestBody
    Get ComEmitSb Of hoJson vSbRequestBody To iSuccess

    Get pvComObject of hoSbRequestBody to vSbRequestBody
    Get ComPTextSb Of hoHttp "PUT" "https://api.app.ddog-gov.com/api/v1/notebooks/:notebook_id" vSbRequestBody "utf-8" "application/json" False False To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
    If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
        Send CreateComObject of hoSbResponseBody
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComGetBodySb Of hoResp vSbResponseBody To iSuccess

    Get Create (RefClass(cComChilkatJsonObject)) To hoJResp
    If (Not(IsComObjectCreated(hoJResp))) Begin
        Send CreateComObject of hoJResp
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComLoadSb Of hoJResp vSbResponseBody To iSuccess
    Set ComEmitCompact Of hoJResp To False

    Showln "Response Body:"
    Get ComEmit Of hoJResp To sTemp1
    Showln sTemp1

    Get ComStatusCode Of hoResp To iRespStatusCode
    Showln "Response Status Code = " iRespStatusCode
    If (iRespStatusCode >= 400) Begin
        Showln "Response Header:"
        Get ComHeader Of hoResp To sTemp1
        Showln sTemp1
        Showln "Failed."
        Send Destroy of hoResp
        Procedure_Return
    End

    Send Destroy of hoResp

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

    Get ComIntOf Of hoJResp "data.id" To iId
    Get ComStringOf Of hoJResp "data.type" To sV_Type
    Get ComStringOf Of hoJResp "data.attributes.time.live_span" To sLive_span
    Get ComStringOf Of hoJResp "data.attributes.name" To sName
    Get ComStringOf Of hoJResp "data.attributes.author.created_at" To sCreated_at
    Get ComBoolOf Of hoJResp "data.attributes.author.disabled" To iDisabled
    Get ComStringOf Of hoJResp "data.attributes.author.email" To sV_Email
    Get ComStringOf Of hoJResp "data.attributes.author.handle" To sHandle
    Get ComStringOf Of hoJResp "data.attributes.author.icon" To sIcon
    Get ComStringOf Of hoJResp "data.attributes.author.name" To sAuthorName
    Get ComStringOf Of hoJResp "data.attributes.author.status" To sStatus
    Get ComStringOf Of hoJResp "data.attributes.author.title" To sTitle
    Get ComBoolOf Of hoJResp "data.attributes.author.verified" To iVerified
    Get ComStringOf Of hoJResp "data.attributes.created" To sCreated
    Get ComBoolOf Of hoJResp "data.attributes.metadata.is_template" To iIs_template
    Get ComBoolOf Of hoJResp "data.attributes.metadata.take_snapshots" To iTake_snapshots
    Get ComStringOf Of hoJResp "data.attributes.metadata.type" To sMetadataType
    Get ComStringOf Of hoJResp "data.attributes.modified" To sModified
    Get ComStringOf Of hoJResp "data.attributes.status" To sAttributesStatus
    Move 0 To i
    Get ComSizeOfArray Of hoJResp "data.attributes.cells" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Get ComStringOf Of hoJResp "data.attributes.cells[i].id" To sId
        Get ComStringOf Of hoJResp "data.attributes.cells[i].type" To sV_type
        Get ComStringOf Of hoJResp "data.attributes.cells[i].attributes.definition.type" To sDefinitionType
        Get ComStringOf Of hoJResp "data.attributes.cells[i].attributes.definition.text" To sText
        Move (i + 1) To i
    Loop



End_Procedure

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