PATCH Append block children
{{baseUrl}}/v1/blocks/:id/children
BODY json

{
  "children": [
    {
      "heading_2": {
        "text": [
          {
            "text": {
              "content": ""
            },
            "type": ""
          }
        ]
      },
      "object": "",
      "paragraph": {
        "rich_text": [
          {
            "text": {
              "content": "",
              "link": {
                "url": ""
              }
            },
            "type": ""
          }
        ]
      },
      "type": ""
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/blocks/:id/children");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"children\": [\n    {\n      \"heading_2\": {\n        \"text\": [\n          {\n            \"text\": {\n              \"content\": \"\"\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"object\": \"\",\n      \"paragraph\": {\n        \"rich_text\": [\n          {\n            \"text\": {\n              \"content\": \"\",\n              \"link\": {\n                \"url\": \"\"\n              }\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"type\": \"\"\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/v1/blocks/:id/children" {:content-type :json
                                                                    :form-params {:children [{:heading_2 {:text [{:text {:content ""}
                                                                                                                  :type ""}]}
                                                                                              :object ""
                                                                                              :paragraph {:rich_text [{:text {:content ""
                                                                                                                              :link {:url ""}}
                                                                                                                       :type ""}]}
                                                                                              :type ""}]}})
require "http/client"

url = "{{baseUrl}}/v1/blocks/:id/children"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"children\": [\n    {\n      \"heading_2\": {\n        \"text\": [\n          {\n            \"text\": {\n              \"content\": \"\"\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"object\": \"\",\n      \"paragraph\": {\n        \"rich_text\": [\n          {\n            \"text\": {\n              \"content\": \"\",\n              \"link\": {\n                \"url\": \"\"\n              }\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"type\": \"\"\n    }\n  ]\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/v1/blocks/:id/children"),
    Content = new StringContent("{\n  \"children\": [\n    {\n      \"heading_2\": {\n        \"text\": [\n          {\n            \"text\": {\n              \"content\": \"\"\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"object\": \"\",\n      \"paragraph\": {\n        \"rich_text\": [\n          {\n            \"text\": {\n              \"content\": \"\",\n              \"link\": {\n                \"url\": \"\"\n              }\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"type\": \"\"\n    }\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/blocks/:id/children");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"children\": [\n    {\n      \"heading_2\": {\n        \"text\": [\n          {\n            \"text\": {\n              \"content\": \"\"\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"object\": \"\",\n      \"paragraph\": {\n        \"rich_text\": [\n          {\n            \"text\": {\n              \"content\": \"\",\n              \"link\": {\n                \"url\": \"\"\n              }\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"type\": \"\"\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/blocks/:id/children"

	payload := strings.NewReader("{\n  \"children\": [\n    {\n      \"heading_2\": {\n        \"text\": [\n          {\n            \"text\": {\n              \"content\": \"\"\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"object\": \"\",\n      \"paragraph\": {\n        \"rich_text\": [\n          {\n            \"text\": {\n              \"content\": \"\",\n              \"link\": {\n                \"url\": \"\"\n              }\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"type\": \"\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PATCH /baseUrl/v1/blocks/:id/children HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 484

{
  "children": [
    {
      "heading_2": {
        "text": [
          {
            "text": {
              "content": ""
            },
            "type": ""
          }
        ]
      },
      "object": "",
      "paragraph": {
        "rich_text": [
          {
            "text": {
              "content": "",
              "link": {
                "url": ""
              }
            },
            "type": ""
          }
        ]
      },
      "type": ""
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1/blocks/:id/children")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"children\": [\n    {\n      \"heading_2\": {\n        \"text\": [\n          {\n            \"text\": {\n              \"content\": \"\"\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"object\": \"\",\n      \"paragraph\": {\n        \"rich_text\": [\n          {\n            \"text\": {\n              \"content\": \"\",\n              \"link\": {\n                \"url\": \"\"\n              }\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"type\": \"\"\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/blocks/:id/children"))
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"children\": [\n    {\n      \"heading_2\": {\n        \"text\": [\n          {\n            \"text\": {\n              \"content\": \"\"\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"object\": \"\",\n      \"paragraph\": {\n        \"rich_text\": [\n          {\n            \"text\": {\n              \"content\": \"\",\n              \"link\": {\n                \"url\": \"\"\n              }\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"type\": \"\"\n    }\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"children\": [\n    {\n      \"heading_2\": {\n        \"text\": [\n          {\n            \"text\": {\n              \"content\": \"\"\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"object\": \"\",\n      \"paragraph\": {\n        \"rich_text\": [\n          {\n            \"text\": {\n              \"content\": \"\",\n              \"link\": {\n                \"url\": \"\"\n              }\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"type\": \"\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/blocks/:id/children")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v1/blocks/:id/children")
  .header("content-type", "application/json")
  .body("{\n  \"children\": [\n    {\n      \"heading_2\": {\n        \"text\": [\n          {\n            \"text\": {\n              \"content\": \"\"\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"object\": \"\",\n      \"paragraph\": {\n        \"rich_text\": [\n          {\n            \"text\": {\n              \"content\": \"\",\n              \"link\": {\n                \"url\": \"\"\n              }\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"type\": \"\"\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  children: [
    {
      heading_2: {
        text: [
          {
            text: {
              content: ''
            },
            type: ''
          }
        ]
      },
      object: '',
      paragraph: {
        rich_text: [
          {
            text: {
              content: '',
              link: {
                url: ''
              }
            },
            type: ''
          }
        ]
      },
      type: ''
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/v1/blocks/:id/children');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/blocks/:id/children',
  headers: {'content-type': 'application/json'},
  data: {
    children: [
      {
        heading_2: {text: [{text: {content: ''}, type: ''}]},
        object: '',
        paragraph: {rich_text: [{text: {content: '', link: {url: ''}}, type: ''}]},
        type: ''
      }
    ]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/blocks/:id/children';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"children":[{"heading_2":{"text":[{"text":{"content":""},"type":""}]},"object":"","paragraph":{"rich_text":[{"text":{"content":"","link":{"url":""}},"type":""}]},"type":""}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/blocks/:id/children',
  method: 'PATCH',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "children": [\n    {\n      "heading_2": {\n        "text": [\n          {\n            "text": {\n              "content": ""\n            },\n            "type": ""\n          }\n        ]\n      },\n      "object": "",\n      "paragraph": {\n        "rich_text": [\n          {\n            "text": {\n              "content": "",\n              "link": {\n                "url": ""\n              }\n            },\n            "type": ""\n          }\n        ]\n      },\n      "type": ""\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"children\": [\n    {\n      \"heading_2\": {\n        \"text\": [\n          {\n            \"text\": {\n              \"content\": \"\"\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"object\": \"\",\n      \"paragraph\": {\n        \"rich_text\": [\n          {\n            \"text\": {\n              \"content\": \"\",\n              \"link\": {\n                \"url\": \"\"\n              }\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"type\": \"\"\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/blocks/:id/children")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/blocks/:id/children',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  children: [
    {
      heading_2: {text: [{text: {content: ''}, type: ''}]},
      object: '',
      paragraph: {rich_text: [{text: {content: '', link: {url: ''}}, type: ''}]},
      type: ''
    }
  ]
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/blocks/:id/children',
  headers: {'content-type': 'application/json'},
  body: {
    children: [
      {
        heading_2: {text: [{text: {content: ''}, type: ''}]},
        object: '',
        paragraph: {rich_text: [{text: {content: '', link: {url: ''}}, type: ''}]},
        type: ''
      }
    ]
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/v1/blocks/:id/children');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  children: [
    {
      heading_2: {
        text: [
          {
            text: {
              content: ''
            },
            type: ''
          }
        ]
      },
      object: '',
      paragraph: {
        rich_text: [
          {
            text: {
              content: '',
              link: {
                url: ''
              }
            },
            type: ''
          }
        ]
      },
      type: ''
    }
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/blocks/:id/children',
  headers: {'content-type': 'application/json'},
  data: {
    children: [
      {
        heading_2: {text: [{text: {content: ''}, type: ''}]},
        object: '',
        paragraph: {rich_text: [{text: {content: '', link: {url: ''}}, type: ''}]},
        type: ''
      }
    ]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/blocks/:id/children';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"children":[{"heading_2":{"text":[{"text":{"content":""},"type":""}]},"object":"","paragraph":{"rich_text":[{"text":{"content":"","link":{"url":""}},"type":""}]},"type":""}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"children": @[ @{ @"heading_2": @{ @"text": @[ @{ @"text": @{ @"content": @"" }, @"type": @"" } ] }, @"object": @"", @"paragraph": @{ @"rich_text": @[ @{ @"text": @{ @"content": @"", @"link": @{ @"url": @"" } }, @"type": @"" } ] }, @"type": @"" } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/blocks/:id/children"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/blocks/:id/children" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"children\": [\n    {\n      \"heading_2\": {\n        \"text\": [\n          {\n            \"text\": {\n              \"content\": \"\"\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"object\": \"\",\n      \"paragraph\": {\n        \"rich_text\": [\n          {\n            \"text\": {\n              \"content\": \"\",\n              \"link\": {\n                \"url\": \"\"\n              }\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"type\": \"\"\n    }\n  ]\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/blocks/:id/children",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'children' => [
        [
                'heading_2' => [
                                'text' => [
                                                                [
                                                                                                                                'text' => [
                                                                                                                                                                                                                                                                'content' => ''
                                                                                                                                ],
                                                                                                                                'type' => ''
                                                                ]
                                ]
                ],
                'object' => '',
                'paragraph' => [
                                'rich_text' => [
                                                                [
                                                                                                                                'text' => [
                                                                                                                                                                                                                                                                'content' => '',
                                                                                                                                                                                                                                                                'link' => [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                'url' => ''
                                                                                                                                                                                                                                                                ]
                                                                                                                                ],
                                                                                                                                'type' => ''
                                                                ]
                                ]
                ],
                'type' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/v1/blocks/:id/children', [
  'body' => '{
  "children": [
    {
      "heading_2": {
        "text": [
          {
            "text": {
              "content": ""
            },
            "type": ""
          }
        ]
      },
      "object": "",
      "paragraph": {
        "rich_text": [
          {
            "text": {
              "content": "",
              "link": {
                "url": ""
              }
            },
            "type": ""
          }
        ]
      },
      "type": ""
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/blocks/:id/children');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'children' => [
    [
        'heading_2' => [
                'text' => [
                                [
                                                                'text' => [
                                                                                                                                'content' => ''
                                                                ],
                                                                'type' => ''
                                ]
                ]
        ],
        'object' => '',
        'paragraph' => [
                'rich_text' => [
                                [
                                                                'text' => [
                                                                                                                                'content' => '',
                                                                                                                                'link' => [
                                                                                                                                                                                                                                                                'url' => ''
                                                                                                                                ]
                                                                ],
                                                                'type' => ''
                                ]
                ]
        ],
        'type' => ''
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'children' => [
    [
        'heading_2' => [
                'text' => [
                                [
                                                                'text' => [
                                                                                                                                'content' => ''
                                                                ],
                                                                'type' => ''
                                ]
                ]
        ],
        'object' => '',
        'paragraph' => [
                'rich_text' => [
                                [
                                                                'text' => [
                                                                                                                                'content' => '',
                                                                                                                                'link' => [
                                                                                                                                                                                                                                                                'url' => ''
                                                                                                                                ]
                                                                ],
                                                                'type' => ''
                                ]
                ]
        ],
        'type' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1/blocks/:id/children');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/blocks/:id/children' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "children": [
    {
      "heading_2": {
        "text": [
          {
            "text": {
              "content": ""
            },
            "type": ""
          }
        ]
      },
      "object": "",
      "paragraph": {
        "rich_text": [
          {
            "text": {
              "content": "",
              "link": {
                "url": ""
              }
            },
            "type": ""
          }
        ]
      },
      "type": ""
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/blocks/:id/children' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "children": [
    {
      "heading_2": {
        "text": [
          {
            "text": {
              "content": ""
            },
            "type": ""
          }
        ]
      },
      "object": "",
      "paragraph": {
        "rich_text": [
          {
            "text": {
              "content": "",
              "link": {
                "url": ""
              }
            },
            "type": ""
          }
        ]
      },
      "type": ""
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"children\": [\n    {\n      \"heading_2\": {\n        \"text\": [\n          {\n            \"text\": {\n              \"content\": \"\"\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"object\": \"\",\n      \"paragraph\": {\n        \"rich_text\": [\n          {\n            \"text\": {\n              \"content\": \"\",\n              \"link\": {\n                \"url\": \"\"\n              }\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"type\": \"\"\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("PATCH", "/baseUrl/v1/blocks/:id/children", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/blocks/:id/children"

payload = { "children": [
        {
            "heading_2": { "text": [
                    {
                        "text": { "content": "" },
                        "type": ""
                    }
                ] },
            "object": "",
            "paragraph": { "rich_text": [
                    {
                        "text": {
                            "content": "",
                            "link": { "url": "" }
                        },
                        "type": ""
                    }
                ] },
            "type": ""
        }
    ] }
headers = {"content-type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/blocks/:id/children"

payload <- "{\n  \"children\": [\n    {\n      \"heading_2\": {\n        \"text\": [\n          {\n            \"text\": {\n              \"content\": \"\"\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"object\": \"\",\n      \"paragraph\": {\n        \"rich_text\": [\n          {\n            \"text\": {\n              \"content\": \"\",\n              \"link\": {\n                \"url\": \"\"\n              }\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"type\": \"\"\n    }\n  ]\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/blocks/:id/children")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"children\": [\n    {\n      \"heading_2\": {\n        \"text\": [\n          {\n            \"text\": {\n              \"content\": \"\"\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"object\": \"\",\n      \"paragraph\": {\n        \"rich_text\": [\n          {\n            \"text\": {\n              \"content\": \"\",\n              \"link\": {\n                \"url\": \"\"\n              }\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"type\": \"\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/v1/blocks/:id/children') do |req|
  req.body = "{\n  \"children\": [\n    {\n      \"heading_2\": {\n        \"text\": [\n          {\n            \"text\": {\n              \"content\": \"\"\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"object\": \"\",\n      \"paragraph\": {\n        \"rich_text\": [\n          {\n            \"text\": {\n              \"content\": \"\",\n              \"link\": {\n                \"url\": \"\"\n              }\n            },\n            \"type\": \"\"\n          }\n        ]\n      },\n      \"type\": \"\"\n    }\n  ]\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/blocks/:id/children";

    let payload = json!({"children": (
            json!({
                "heading_2": json!({"text": (
                        json!({
                            "text": json!({"content": ""}),
                            "type": ""
                        })
                    )}),
                "object": "",
                "paragraph": json!({"rich_text": (
                        json!({
                            "text": json!({
                                "content": "",
                                "link": json!({"url": ""})
                            }),
                            "type": ""
                        })
                    )}),
                "type": ""
            })
        )});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/v1/blocks/:id/children \
  --header 'content-type: application/json' \
  --data '{
  "children": [
    {
      "heading_2": {
        "text": [
          {
            "text": {
              "content": ""
            },
            "type": ""
          }
        ]
      },
      "object": "",
      "paragraph": {
        "rich_text": [
          {
            "text": {
              "content": "",
              "link": {
                "url": ""
              }
            },
            "type": ""
          }
        ]
      },
      "type": ""
    }
  ]
}'
echo '{
  "children": [
    {
      "heading_2": {
        "text": [
          {
            "text": {
              "content": ""
            },
            "type": ""
          }
        ]
      },
      "object": "",
      "paragraph": {
        "rich_text": [
          {
            "text": {
              "content": "",
              "link": {
                "url": ""
              }
            },
            "type": ""
          }
        ]
      },
      "type": ""
    }
  ]
}' |  \
  http PATCH {{baseUrl}}/v1/blocks/:id/children \
  content-type:application/json
wget --quiet \
  --method PATCH \
  --header 'content-type: application/json' \
  --body-data '{\n  "children": [\n    {\n      "heading_2": {\n        "text": [\n          {\n            "text": {\n              "content": ""\n            },\n            "type": ""\n          }\n        ]\n      },\n      "object": "",\n      "paragraph": {\n        "rich_text": [\n          {\n            "text": {\n              "content": "",\n              "link": {\n                "url": ""\n              }\n            },\n            "type": ""\n          }\n        ]\n      },\n      "type": ""\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/v1/blocks/:id/children
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["children": [
    [
      "heading_2": ["text": [
          [
            "text": ["content": ""],
            "type": ""
          ]
        ]],
      "object": "",
      "paragraph": ["rich_text": [
          [
            "text": [
              "content": "",
              "link": ["url": ""]
            ],
            "type": ""
          ]
        ]],
      "type": ""
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/blocks/:id/children")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "child_page": {
    "title": "Who Will Teach Silicon Valley to Be Ethical? "
  },
  "created_time": "2021-04-27T20:38:19.437Z",
  "has_children": true,
  "id": "a1712d54-53e4-4893-a69d-4d581cd2c845",
  "last_edited_time": "2021-05-12T06:07:37.724Z",
  "object": "block",
  "type": "child_page"
}
DELETE Delete a block
{{baseUrl}}/v1/blocks/:id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/blocks/:id");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/v1/blocks/:id")
require "http/client"

url = "{{baseUrl}}/v1/blocks/:id"

response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/v1/blocks/:id"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/blocks/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/blocks/:id"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
DELETE /baseUrl/v1/blocks/:id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/blocks/:id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/blocks/:id"))
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/blocks/:id")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/blocks/:id")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/v1/blocks/:id');

xhr.send(data);
import axios from 'axios';

const options = {method: 'DELETE', url: '{{baseUrl}}/v1/blocks/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/blocks/:id';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/blocks/:id',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/blocks/:id")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/blocks/:id',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'DELETE', url: '{{baseUrl}}/v1/blocks/:id'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/v1/blocks/:id');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'DELETE', url: '{{baseUrl}}/v1/blocks/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/blocks/:id';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/blocks/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/blocks/:id" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/blocks/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/v1/blocks/:id');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/blocks/:id');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/blocks/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/blocks/:id' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/blocks/:id' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/v1/blocks/:id")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/blocks/:id"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/blocks/:id"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/blocks/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/v1/blocks/:id') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/blocks/:id";

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/v1/blocks/:id
http DELETE {{baseUrl}}/v1/blocks/:id
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/v1/blocks/:id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/blocks/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "archived": true,
  "created_by": {
    "id": "6794760a-1f15-45cd-9c65-0dfe42f5135a",
    "object": "user"
  },
  "created_time": "2021-08-06T17:46:00.000Z",
  "has_children": false,
  "id": "4868767d-9029-4b9d-a41b-652ef4c9c7b9",
  "last_edited_by": {
    "id": "92a680bb-6970-4726-952b-4f4c03bff617",
    "object": "user"
  },
  "last_edited_time": "2022-02-24T22:26:00.000Z",
  "object": "block",
  "paragraph": {
    "text": [
      {
        "annotations": {
          "bold": false,
          "code": false,
          "color": "default",
          "italic": false,
          "strikethrough": false,
          "underline": false
        },
        "href": null,
        "plain_text": "hello to you",
        "text": {
          "content": "hello to you",
          "link": null
        },
        "type": "text"
      }
    ]
  },
  "type": "paragraph"
}
GET Retrieve a block
{{baseUrl}}/v1/blocks/:id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/blocks/:id");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/blocks/:id")
require "http/client"

url = "{{baseUrl}}/v1/blocks/:id"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/blocks/:id"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/blocks/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/blocks/:id"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/blocks/:id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/blocks/:id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/blocks/:id"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/blocks/:id")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/blocks/:id")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/blocks/:id');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1/blocks/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/blocks/:id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/blocks/:id',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/blocks/:id")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/blocks/:id',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/v1/blocks/:id'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/blocks/:id');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/v1/blocks/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/blocks/:id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/blocks/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/blocks/:id" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/blocks/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/blocks/:id');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/blocks/:id');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/blocks/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/blocks/:id' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/blocks/:id' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/blocks/:id")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/blocks/:id"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/blocks/:id"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/blocks/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/blocks/:id') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/blocks/:id";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/blocks/:id
http GET {{baseUrl}}/v1/blocks/:id
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/blocks/:id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/blocks/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "created_time": "2021-08-06T17:46:00.000Z",
  "has_children": false,
  "id": "4868767d-9029-4b9d-a41b-652ef4c9c7b9",
  "last_edited_time": "2021-08-12T00:12:00.000Z",
  "object": "block",
  "paragraph": {
    "text": [
      {
        "annotations": {
          "bold": false,
          "code": false,
          "color": "default",
          "italic": false,
          "strikethrough": false,
          "underline": false
        },
        "href": null,
        "plain_text": "hello to you",
        "text": {
          "content": "hello to you",
          "link": null
        },
        "type": "text"
      }
    ]
  },
  "type": "paragraph"
}
GET Retrieve block children
{{baseUrl}}/v1/blocks/:id/children
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/blocks/:id/children");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/blocks/:id/children")
require "http/client"

url = "{{baseUrl}}/v1/blocks/:id/children"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/blocks/:id/children"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/blocks/:id/children");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/blocks/:id/children"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/blocks/:id/children HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/blocks/:id/children")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/blocks/:id/children"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/blocks/:id/children")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/blocks/:id/children")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/blocks/:id/children');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1/blocks/:id/children'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/blocks/:id/children';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/blocks/:id/children',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/blocks/:id/children")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/blocks/:id/children',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/v1/blocks/:id/children'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/blocks/:id/children');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/v1/blocks/:id/children'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/blocks/:id/children';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/blocks/:id/children"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/blocks/:id/children" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/blocks/:id/children",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/blocks/:id/children');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/blocks/:id/children');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/blocks/:id/children');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/blocks/:id/children' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/blocks/:id/children' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/blocks/:id/children")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/blocks/:id/children"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/blocks/:id/children"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/blocks/:id/children")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/blocks/:id/children') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/blocks/:id/children";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/blocks/:id/children
http GET {{baseUrl}}/v1/blocks/:id/children
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/blocks/:id/children
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/blocks/:id/children")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "has_more": false,
  "next_cursor": null,
  "object": "list",
  "results": [
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "48c1ffb5-2789-4025-937b-2c35eaaaab3f",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "type": "unsupported",
      "unsupported": {}
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "e381a0a3-4efb-4ba9-aa93-45b70fa9ce7f",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "I think we can all agree that Silicon Valley needs more adult supervision right about now.",
            "text": {
              "content": "I think we can all agree that Silicon Valley needs more adult supervision right about now.",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "ce5f79ac-8145-44ab-be3b-8ad143d6f8a7",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "Is the solution for its companies to hire a chief ethics officer?",
            "text": {
              "content": "Is the solution for its companies to hire a chief ethics officer?",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "0387b374-7847-4ddc-bc53-6b0813ce4ed4",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "While some tech companies like Google have top compliance officers and others turn to legal teams to police themselves, no big tech companies that I know of have yet taken this step. But a lot of them seem to be talking about it, and I’ve discussed the idea with several chief executives recently. Why? Because slowly, then all at once, it feels like too many digital leaders have lost their minds.",
            "text": {
              "content": "While some tech companies like Google have top compliance officers and others turn to legal teams to police themselves, no big tech companies that I know of have yet taken this step. But a lot of them seem to be talking about it, and I’ve discussed the idea with several chief executives recently. Why? Because slowly, then all at once, it feels like too many digital leaders have lost their minds.",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "da035311-5af3-48bc-8279-d28d9f4ef2e2",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "It’s probably no surprise, considering the complex problems the tech industry faces. As one ethical quandary after another has hit its profoundly ill-prepared executives, their once-pristine reputations have fallen like palm trees in a hurricane. These last two weeks alone show how tech is stumbling to react to big world issues armed with only bubble world skills:",
            "text": {
              "content": "It’s probably no surprise, considering the complex problems the tech industry faces. As one ethical quandary after another has hit its profoundly ill-prepared executives, their once-pristine reputations have fallen like palm trees in a hurricane. These last two weeks alone show how tech is stumbling to react to big world issues armed with only bubble world skills:",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "63a60fca-4a11-43eb-8773-c5f0164a3117",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "As a journalist is beheaded and dismembered at the direction of Saudi Arabian leaders (allegedly, but the killers did bring a bone saw), Silicon Valley is swimming in oceans of money from the kingdom’s Public Investment Fund. Saudi funding includes hundreds of millions for Magic Leap, and huge investments in hot public companies like Tesla. Most significantly: Saudis have invested about $45 billion in SoftBank’s giant Vision Fund, which has in turn doused the tech landscape — $4.4 billion to WeWork, $250 million to Slack, and $300 million to the dog-walking app Wag. In total Uber has gotten almost $14 billion, either through direct investments from the Public Investment Fund or through the Saudis’ funding of the Vision Fund. A billion here, a billion there and it all adds up.",
            "text": {
              "content": "As a journalist is beheaded and dismembered at the direction of Saudi Arabian leaders (allegedly, but the killers did bring a bone saw), Silicon Valley is swimming in oceans of money from the kingdom’s Public Investment Fund. Saudi funding includes hundreds of millions for Magic Leap, and huge investments in hot public companies like Tesla. Most significantly: Saudis have invested about $45 billion in SoftBank’s giant Vision Fund, which has in turn doused the tech landscape — $4.4 billion to WeWork, $250 million to Slack, and $300 million to the dog-walking app Wag. In total Uber has gotten almost $14 billion, either through direct investments from the Public Investment Fund or through the Saudis’ funding of the Vision Fund. A billion here, a billion there and it all adds up.",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "8c58c8f1-86ae-4a14-b6b9-74f5fa579620",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "[",
            "text": {
              "content": "[",
              "link": null
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": true,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "Kara Swisher answered your questions about her column ",
            "text": {
              "content": "Kara Swisher answered your questions about her column ",
              "link": null
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": true,
              "strikethrough": false,
              "underline": false
            },
            "href": "https://twitter.com/karaswisher/status/1054842303922298880",
            "plain_text": "on Twitter",
            "text": {
              "content": "on Twitter",
              "link": {
                "url": "https://twitter.com/karaswisher/status/1054842303922298880"
              }
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": true,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": ".",
            "text": {
              "content": ".",
              "link": null
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "]",
            "text": {
              "content": "]",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "875d3aff-086b-45da-9ed1-bc3ddb185229",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "Facebook introduced a new home video device called Portal, and promised that what could be seen as a surveillance tool would not share data for the sake of ad targeting. Soon after, as ",
            "text": {
              "content": "Facebook introduced a new home video device called Portal, and promised that what could be seen as a surveillance tool would not share data for the sake of ad targeting. Soon after, as ",
              "link": null
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": "https://www.recode.net/2018/10/16/17966102/facebook-portal-ad-targeting-data-collection",
            "plain_text": "reported by Recode",
            "text": {
              "content": "reported by Recode",
              "link": {
                "url": "https://www.recode.net/2018/10/16/17966102/facebook-portal-ad-targeting-data-collection"
              }
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": ", Facebook admitted that “data about who you call and data about which apps you use on Portal ",
            "text": {
              "content": ", Facebook admitted that “data about who you call and data about which apps you use on Portal ",
              "link": null
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": true,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "can",
            "text": {
              "content": "can",
              "link": null
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": " be used to target you with ads on other Facebook-owned properties.” Oh. Um. That’s awkward.",
            "text": {
              "content": " be used to target you with ads on other Facebook-owned properties.” Oh. Um. That’s awkward.",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "306ab0fb-6daa-4c5b-b1f7-f51a5f92b6ff",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "After agreeing to pay $20 million to the Securities and Exchange Commission for an ill-advised tweet about possible funding (from the Saudis, by the way), the Tesla co-founder Elon Musk proceeded to troll the regulatory agency on, you got it, Twitter. And even though the ",
            "text": {
              "content": "After agreeing to pay $20 million to the Securities and Exchange Commission for an ill-advised tweet about possible funding (from the Saudis, by the way), the Tesla co-founder Elon Musk proceeded to troll the regulatory agency on, you got it, Twitter. And even though the ",
              "link": null
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": "https://www.sec.gov/news/press-release/2018-226",
            "plain_text": "settlement called for some kind of control of his communications",
            "text": {
              "content": "settlement called for some kind of control of his communications",
              "link": {
                "url": "https://www.sec.gov/news/press-release/2018-226"
              }
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": ", it appears that Mr. Musk will continue tweeting until someone steals his phone.",
            "text": {
              "content": ", it appears that Mr. Musk will continue tweeting until someone steals his phone.",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "122b1457-4129-4513-abaa-7cce7d66e4a1",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "Finally, Google took six months to make public that user data on its social network, Google Plus, ",
            "text": {
              "content": "Finally, Google took six months to make public that user data on its social network, Google Plus, ",
              "link": null
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": "https://www.nytimes.com/2018/10/08/technology/google-plus-security-disclosure.html?module=inline",
            "plain_text": "had been exposed",
            "text": {
              "content": "had been exposed",
              "link": {
                "url": "https://www.nytimes.com/2018/10/08/technology/google-plus-security-disclosure.html?module=inline"
              }
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": " and that profiles of up to 500,000 users may have been compromised. While the service failed long ago, because it was pretty much designed by antisocial people, this lack of concern for privacy was profound.",
            "text": {
              "content": " and that profiles of up to 500,000 users may have been compromised. While the service failed long ago, because it was pretty much designed by antisocial people, this lack of concern for privacy was profound.",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "4d4af599-556f-4d8b-af8e-4d01ebe2aa27",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "Grappling with what to say and do about the disasters they themselves create is only the beginning. Then there are the broader issues that the denizens of Silicon Valley expect their employers to have a stance on: immigration, income inequality, artificial intelligence, automation, transgender rights, climate change, privacy, data rights and whether tech companies should be helping the government do controversial things. It’s an ethical swamp out there.",
            "text": {
              "content": "Grappling with what to say and do about the disasters they themselves create is only the beginning. Then there are the broader issues that the denizens of Silicon Valley expect their employers to have a stance on: immigration, income inequality, artificial intelligence, automation, transgender rights, climate change, privacy, data rights and whether tech companies should be helping the government do controversial things. It’s an ethical swamp out there.",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "f5775df5-59eb-4533-a2cb-e150412ec4f6",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "That’s why, in a recent interview, Marc Benioff, the co-chief executive and a founder of Salesforce, told me he was in the process of hiring a chief ethical officer to help anticipate and address any thorny conundrums it might encounter as a business — like the decision it had to make a few months back about whether it should stop providing recruitment software for Customs and Border Protection because of the government’s policy of separating immigrant families at the border.",
            "text": {
              "content": "That’s why, in a recent interview, Marc Benioff, the co-chief executive and a founder of Salesforce, told me he was in the process of hiring a chief ethical officer to help anticipate and address any thorny conundrums it might encounter as a business — like the decision it had to make a few months back about whether it should stop providing recruitment software for Customs and Border Protection because of the government’s policy of separating immigrant families at the border.",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "31405c6e-7ece-4667-8c4d-36c9d79a0bfa",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "Amid much criticism, Mr. Benioff decided to keep the contract, but said he would focus more on social and political issues.",
            "text": {
              "content": "Amid much criticism, Mr. Benioff decided to keep the contract, but said he would focus more on social and political issues.",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "a2ab7e8a-d521-401d-89ae-9eb27efb9990",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "At a recent company event, he elaborated: “We can have a structured conversation not just with our own employees myopically, but by bringing in the key advisers, supporters and pundits and philosophers and everybody necessary to ask the question if what we are doing today is ethical and humane.”",
            "text": {
              "content": "At a recent company event, he elaborated: “We can have a structured conversation not just with our own employees myopically, but by bringing in the key advisers, supporters and pundits and philosophers and everybody necessary to ask the question if what we are doing today is ethical and humane.”",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "a4498e1e-8b85-48d7-802a-db447ca7d1ac",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "23andMe has also toyed with the idea of hiring a chief ethics officer. In an interview I did this week with its chief executive, Anne Wojcicki, she said the genetics company had even interviewed candidates, but that many of them wanted to remain in academia to be freer to ponder these issues. She acknowledged that the collection of DNA data is rife with ethical considerations, but said, “I think it has to be our management and leaders who have to add this to our skill set, rather than just hire one person to determine this.”",
            "text": {
              "content": "23andMe has also toyed with the idea of hiring a chief ethics officer. In an interview I did this week with its chief executive, Anne Wojcicki, she said the genetics company had even interviewed candidates, but that many of them wanted to remain in academia to be freer to ponder these issues. She acknowledged that the collection of DNA data is rife with ethical considerations, but said, “I think it has to be our management and leaders who have to add this to our skill set, rather than just hire one person to determine this.”",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "cbf7e7e0-5552-4b3f-b09e-9dcca120931c",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "When asked about the idea of a single source of wisdom on ethics, some point out that legal or diversity/inclusion departments are designed for that purpose and that the ethics should really come from the top — the chief executive.",
            "text": {
              "content": "When asked about the idea of a single source of wisdom on ethics, some point out that legal or diversity/inclusion departments are designed for that purpose and that the ethics should really come from the top — the chief executive.",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "d24b2887-0f1f-4e91-99c1-c295bed8ad65",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "Also of concern is the possibility that a single person would not get listened to or, worse, get steamrollered. And, if the person was bad at the job, of course, it could drag the whole thing down.",
            "text": {
              "content": "Also of concern is the possibility that a single person would not get listened to or, worse, get steamrollered. And, if the person was bad at the job, of course, it could drag the whole thing down.",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "78c55f65-c8b8-4364-a369-c40699968e90",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "Others are more worried that the move would be nothing but window dressing. One consultant who focuses on ethics, but did not want to be named, told me: “We haven’t even defined ethics, so what even is ethical use, especially for Silicon Valley companies that are babies in this game?”",
            "text": {
              "content": "Others are more worried that the move would be nothing but window dressing. One consultant who focuses on ethics, but did not want to be named, told me: “We haven’t even defined ethics, so what even is ethical use, especially for Silicon Valley companies that are babies in this game?”",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "0b492111-1586-4a73-8848-04f0c391aadc",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "How can an industry that, unlike other business sectors, persistently promotes itself as doing good, learn to do that in reality? Do you want to not do harm, or do you want to do good? These are two totally different things.",
            "text": {
              "content": "How can an industry that, unlike other business sectors, persistently promotes itself as doing good, learn to do that in reality? Do you want to not do harm, or do you want to do good? These are two totally different things.",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "302f8229-2404-460b-8c3c-e7058b4365e5",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "And how do you put an official ethical system in place without it seeming like you’re telling everyone how to behave? Who gets to decide those rules anyway, setting a moral path for the industry and — considering tech companies’ enormous power — the world.",
            "text": {
              "content": "And how do you put an official ethical system in place without it seeming like you’re telling everyone how to behave? Who gets to decide those rules anyway, setting a moral path for the industry and — considering tech companies’ enormous power — the world.",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "8f9bc91c-5662-4b3f-a110-809f46b79f49",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": false,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "Like I said, adult supervision. Or maybe, better still, Silicon Valley itself has to grow up.",
            "text": {
              "content": "Like I said, adult supervision. Or maybe, better still, Silicon Valley itself has to grow up.",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    },
    {
      "created_time": "2021-04-27T20:38:19.437Z",
      "has_children": false,
      "id": "7bea1831-a25c-4b3e-8c9b-b37de814f948",
      "last_edited_time": "2021-04-27T20:38:19.437Z",
      "object": "block",
      "paragraph": {
        "text": [
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": true,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": "Follow The New York Times Opinion section on ",
            "text": {
              "content": "Follow The New York Times Opinion section on ",
              "link": null
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": true,
              "strikethrough": false,
              "underline": false
            },
            "href": "https://www.facebook.com/nytopinion",
            "plain_text": "Facebook",
            "text": {
              "content": "Facebook",
              "link": {
                "url": "https://www.facebook.com/nytopinion"
              }
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": true,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": ", ",
            "text": {
              "content": ", ",
              "link": null
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": true,
              "strikethrough": false,
              "underline": false
            },
            "href": "http://twitter.com/NYTOpinion",
            "plain_text": "Twitter (@NYTopinion)",
            "text": {
              "content": "Twitter (@NYTopinion)",
              "link": {
                "url": "http://twitter.com/NYTOpinion"
              }
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": true,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": " and ",
            "text": {
              "content": " and ",
              "link": null
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": true,
              "strikethrough": false,
              "underline": false
            },
            "href": "https://www.instagram.com/nytopinion/",
            "plain_text": "Instagram",
            "text": {
              "content": "Instagram",
              "link": {
                "url": "https://www.instagram.com/nytopinion/"
              }
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": true,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": ", and sign up for the ",
            "text": {
              "content": ", and sign up for the ",
              "link": null
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": true,
              "strikethrough": false,
              "underline": false
            },
            "href": "http://www.nytimes.com/newsletters/opiniontoday/",
            "plain_text": "Opinion Today newsletter",
            "text": {
              "content": "Opinion Today newsletter",
              "link": {
                "url": "http://www.nytimes.com/newsletters/opiniontoday/"
              }
            },
            "type": "text"
          },
          {
            "annotations": {
              "bold": false,
              "code": false,
              "color": "default",
              "italic": true,
              "strikethrough": false,
              "underline": false
            },
            "href": null,
            "plain_text": ".",
            "text": {
              "content": ".",
              "link": null
            },
            "type": "text"
          }
        ]
      },
      "type": "paragraph"
    }
  ]
}
PATCH Update a block
{{baseUrl}}/v1/blocks/:id
BODY json

{
  "paragraph": {
    "rich_text": [
      {
        "text": {
          "content": ""
        },
        "type": ""
      }
    ]
  }
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/blocks/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"paragraph\": {\n    \"rich_text\": [\n      {\n        \"text\": {\n          \"content\": \"\"\n        },\n        \"type\": \"\"\n      }\n    ]\n  }\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/v1/blocks/:id" {:content-type :json
                                                           :form-params {:paragraph {:rich_text [{:text {:content ""}
                                                                                                  :type ""}]}}})
require "http/client"

url = "{{baseUrl}}/v1/blocks/:id"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"paragraph\": {\n    \"rich_text\": [\n      {\n        \"text\": {\n          \"content\": \"\"\n        },\n        \"type\": \"\"\n      }\n    ]\n  }\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/v1/blocks/:id"),
    Content = new StringContent("{\n  \"paragraph\": {\n    \"rich_text\": [\n      {\n        \"text\": {\n          \"content\": \"\"\n        },\n        \"type\": \"\"\n      }\n    ]\n  }\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/blocks/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"paragraph\": {\n    \"rich_text\": [\n      {\n        \"text\": {\n          \"content\": \"\"\n        },\n        \"type\": \"\"\n      }\n    ]\n  }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/blocks/:id"

	payload := strings.NewReader("{\n  \"paragraph\": {\n    \"rich_text\": [\n      {\n        \"text\": {\n          \"content\": \"\"\n        },\n        \"type\": \"\"\n      }\n    ]\n  }\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PATCH /baseUrl/v1/blocks/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 137

{
  "paragraph": {
    "rich_text": [
      {
        "text": {
          "content": ""
        },
        "type": ""
      }
    ]
  }
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1/blocks/:id")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"paragraph\": {\n    \"rich_text\": [\n      {\n        \"text\": {\n          \"content\": \"\"\n        },\n        \"type\": \"\"\n      }\n    ]\n  }\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/blocks/:id"))
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"paragraph\": {\n    \"rich_text\": [\n      {\n        \"text\": {\n          \"content\": \"\"\n        },\n        \"type\": \"\"\n      }\n    ]\n  }\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"paragraph\": {\n    \"rich_text\": [\n      {\n        \"text\": {\n          \"content\": \"\"\n        },\n        \"type\": \"\"\n      }\n    ]\n  }\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/blocks/:id")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v1/blocks/:id")
  .header("content-type", "application/json")
  .body("{\n  \"paragraph\": {\n    \"rich_text\": [\n      {\n        \"text\": {\n          \"content\": \"\"\n        },\n        \"type\": \"\"\n      }\n    ]\n  }\n}")
  .asString();
const data = JSON.stringify({
  paragraph: {
    rich_text: [
      {
        text: {
          content: ''
        },
        type: ''
      }
    ]
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/v1/blocks/:id');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/blocks/:id',
  headers: {'content-type': 'application/json'},
  data: {paragraph: {rich_text: [{text: {content: ''}, type: ''}]}}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/blocks/:id';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"paragraph":{"rich_text":[{"text":{"content":""},"type":""}]}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/blocks/:id',
  method: 'PATCH',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "paragraph": {\n    "rich_text": [\n      {\n        "text": {\n          "content": ""\n        },\n        "type": ""\n      }\n    ]\n  }\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"paragraph\": {\n    \"rich_text\": [\n      {\n        \"text\": {\n          \"content\": \"\"\n        },\n        \"type\": \"\"\n      }\n    ]\n  }\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/blocks/:id")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/blocks/:id',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({paragraph: {rich_text: [{text: {content: ''}, type: ''}]}}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/blocks/:id',
  headers: {'content-type': 'application/json'},
  body: {paragraph: {rich_text: [{text: {content: ''}, type: ''}]}},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/v1/blocks/:id');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  paragraph: {
    rich_text: [
      {
        text: {
          content: ''
        },
        type: ''
      }
    ]
  }
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/blocks/:id',
  headers: {'content-type': 'application/json'},
  data: {paragraph: {rich_text: [{text: {content: ''}, type: ''}]}}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/blocks/:id';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"paragraph":{"rich_text":[{"text":{"content":""},"type":""}]}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"paragraph": @{ @"rich_text": @[ @{ @"text": @{ @"content": @"" }, @"type": @"" } ] } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/blocks/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/blocks/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"paragraph\": {\n    \"rich_text\": [\n      {\n        \"text\": {\n          \"content\": \"\"\n        },\n        \"type\": \"\"\n      }\n    ]\n  }\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/blocks/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'paragraph' => [
        'rich_text' => [
                [
                                'text' => [
                                                                'content' => ''
                                ],
                                'type' => ''
                ]
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/v1/blocks/:id', [
  'body' => '{
  "paragraph": {
    "rich_text": [
      {
        "text": {
          "content": ""
        },
        "type": ""
      }
    ]
  }
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/blocks/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'paragraph' => [
    'rich_text' => [
        [
                'text' => [
                                'content' => ''
                ],
                'type' => ''
        ]
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'paragraph' => [
    'rich_text' => [
        [
                'text' => [
                                'content' => ''
                ],
                'type' => ''
        ]
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1/blocks/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/blocks/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "paragraph": {
    "rich_text": [
      {
        "text": {
          "content": ""
        },
        "type": ""
      }
    ]
  }
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/blocks/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "paragraph": {
    "rich_text": [
      {
        "text": {
          "content": ""
        },
        "type": ""
      }
    ]
  }
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"paragraph\": {\n    \"rich_text\": [\n      {\n        \"text\": {\n          \"content\": \"\"\n        },\n        \"type\": \"\"\n      }\n    ]\n  }\n}"

headers = { 'content-type': "application/json" }

conn.request("PATCH", "/baseUrl/v1/blocks/:id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/blocks/:id"

payload = { "paragraph": { "rich_text": [
            {
                "text": { "content": "" },
                "type": ""
            }
        ] } }
headers = {"content-type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/blocks/:id"

payload <- "{\n  \"paragraph\": {\n    \"rich_text\": [\n      {\n        \"text\": {\n          \"content\": \"\"\n        },\n        \"type\": \"\"\n      }\n    ]\n  }\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/blocks/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"paragraph\": {\n    \"rich_text\": [\n      {\n        \"text\": {\n          \"content\": \"\"\n        },\n        \"type\": \"\"\n      }\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/v1/blocks/:id') do |req|
  req.body = "{\n  \"paragraph\": {\n    \"rich_text\": [\n      {\n        \"text\": {\n          \"content\": \"\"\n        },\n        \"type\": \"\"\n      }\n    ]\n  }\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/blocks/:id";

    let payload = json!({"paragraph": json!({"rich_text": (
                json!({
                    "text": json!({"content": ""}),
                    "type": ""
                })
            )})});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/v1/blocks/:id \
  --header 'content-type: application/json' \
  --data '{
  "paragraph": {
    "rich_text": [
      {
        "text": {
          "content": ""
        },
        "type": ""
      }
    ]
  }
}'
echo '{
  "paragraph": {
    "rich_text": [
      {
        "text": {
          "content": ""
        },
        "type": ""
      }
    ]
  }
}' |  \
  http PATCH {{baseUrl}}/v1/blocks/:id \
  content-type:application/json
wget --quiet \
  --method PATCH \
  --header 'content-type: application/json' \
  --body-data '{\n  "paragraph": {\n    "rich_text": [\n      {\n        "text": {\n          "content": ""\n        },\n        "type": ""\n      }\n    ]\n  }\n}' \
  --output-document \
  - {{baseUrl}}/v1/blocks/:id
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["paragraph": ["rich_text": [
      [
        "text": ["content": ""],
        "type": ""
      ]
    ]]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/blocks/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "created_time": "2021-08-06T17:46:00.000Z",
  "has_children": false,
  "id": "4868767d-9029-4b9d-a41b-652ef4c9c7b9",
  "last_edited_time": "2021-08-12T00:12:00.000Z",
  "object": "block",
  "paragraph": {
    "text": [
      {
        "annotations": {
          "bold": false,
          "code": false,
          "color": "default",
          "italic": false,
          "strikethrough": false,
          "underline": false
        },
        "href": null,
        "plain_text": "hello to you",
        "text": {
          "content": "hello to you",
          "link": null
        },
        "type": "text"
      }
    ]
  },
  "type": "paragraph"
}
GET Retrieve comments
{{baseUrl}}/v1/comments
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/comments");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/comments")
require "http/client"

url = "{{baseUrl}}/v1/comments"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/comments"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/comments");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/comments"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/comments HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/comments")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/comments"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/comments")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/comments")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/comments');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1/comments'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/comments';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/comments',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/comments")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/comments',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/v1/comments'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/comments');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/v1/comments'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/comments';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/comments"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/comments" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/comments",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/comments');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/comments');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/comments');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/comments' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/comments' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = ""

conn.request("GET", "/baseUrl/v1/comments", payload)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/comments"

payload = ""

response = requests.get(url, data=payload)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/comments"

payload <- ""

response <- VERB("GET", url, body = payload, content_type(""))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/comments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/comments') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/comments";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/comments
http GET {{baseUrl}}/v1/comments
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/comments
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/comments")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "comment": {},
  "has_more": false,
  "next_cursor": null,
  "object": "list",
  "results": [
    {
      "created_by": {
        "id": "952f41bb-da96-4d36-9c2e-74924eee8ef1",
        "object": "user"
      },
      "created_time": "2022-07-15T21:38:00.000Z",
      "discussion_id": "ce18f8c6-ef2a-427f-b416-43531fc7c117",
      "id": "ed4c62f2-c0ad-4081-b6b8-dad025637741",
      "last_edited_time": "2022-07-15T21:38:00.000Z",
      "object": "comment",
      "parent": {
        "block_id": "5d4ca33c-d6b7-4675-93d9-84b70af45d1c",
        "type": "block_id"
      },
      "rich_text": [
        {
          "annotations": {
            "bold": false,
            "code": false,
            "color": "default",
            "italic": false,
            "strikethrough": false,
            "underline": false
          },
          "href": null,
          "plain_text": "Please cite your source",
          "text": {
            "content": "Please cite your source",
            "link": null
          },
          "type": "text"
        }
      ]
    },
    {
      "created_by": {
        "id": "952f41bb-da96-4d36-9c2e-74924eee8ef1",
        "object": "user"
      },
      "created_time": "2022-07-15T21:38:00.000Z",
      "discussion_id": "e63f446f-a84a-4cab-8f5a-b9e7779ecb67",
      "id": "8949cb38-aee6-4c62-ba96-6ef7df9b4cf2",
      "last_edited_time": "2022-07-15T21:38:00.000Z",
      "object": "comment",
      "parent": {
        "block_id": "5d4ca33c-d6b7-4675-93d9-84b70af45d1c",
        "type": "block_id"
      },
      "rich_text": [
        {
          "annotations": {
            "bold": false,
            "code": false,
            "color": "default",
            "italic": false,
            "strikethrough": false,
            "underline": false
          },
          "href": null,
          "plain_text": "What other nutrients does kale have?",
          "text": {
            "content": "What other nutrients does kale have?",
            "link": null
          },
          "type": "text"
        }
      ]
    },
    {
      "created_by": {
        "id": "e450a39e-9051-4d36-bc4e-8581611fc592",
        "object": "user"
      },
      "created_time": "2022-07-18T21:48:00.000Z",
      "discussion_id": "ce18f8c6-ef2a-427f-b416-43531fc7c117",
      "id": "6cd52483-6d55-4f8a-a724-4adb1c17ed43",
      "last_edited_time": "2022-07-18T21:48:00.000Z",
      "object": "comment",
      "parent": {
        "block_id": "5d4ca33c-d6b7-4675-93d9-84b70af45d1c",
        "type": "block_id"
      },
      "rich_text": [
        {
          "annotations": {
            "bold": false,
            "code": false,
            "color": "default",
            "italic": false,
            "strikethrough": false,
            "underline": false
          },
          "href": "https://www.healthline.com/nutrition/10-proven-benefits-of-kale",
          "plain_text": "https://www.healthline.com/nutrition/10-proven-benefits-of-kale",
          "text": {
            "content": "https://www.healthline.com/nutrition/10-proven-benefits-of-kale",
            "link": {
              "url": "https://www.healthline.com/nutrition/10-proven-benefits-of-kale"
            }
          },
          "type": "text"
        }
      ]
    }
  ],
  "type": "comment"
}
POST Query a database
{{baseUrl}}/v1/databases/:id/query
BODY json

{
  "filter": {
    "property": "",
    "select": {
      "equals": ""
    }
  }
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/databases/:id/query");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"filter\": {\n    \"property\": \"\",\n    \"select\": {\n      \"equals\": \"\"\n    }\n  }\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/databases/:id/query" {:content-type :json
                                                                   :form-params {:filter {:property ""
                                                                                          :select {:equals ""}}}})
require "http/client"

url = "{{baseUrl}}/v1/databases/:id/query"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"filter\": {\n    \"property\": \"\",\n    \"select\": {\n      \"equals\": \"\"\n    }\n  }\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/databases/:id/query"),
    Content = new StringContent("{\n  \"filter\": {\n    \"property\": \"\",\n    \"select\": {\n      \"equals\": \"\"\n    }\n  }\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/databases/:id/query");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"filter\": {\n    \"property\": \"\",\n    \"select\": {\n      \"equals\": \"\"\n    }\n  }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/databases/:id/query"

	payload := strings.NewReader("{\n  \"filter\": {\n    \"property\": \"\",\n    \"select\": {\n      \"equals\": \"\"\n    }\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/databases/:id/query HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 82

{
  "filter": {
    "property": "",
    "select": {
      "equals": ""
    }
  }
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/databases/:id/query")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"filter\": {\n    \"property\": \"\",\n    \"select\": {\n      \"equals\": \"\"\n    }\n  }\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/databases/:id/query"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"filter\": {\n    \"property\": \"\",\n    \"select\": {\n      \"equals\": \"\"\n    }\n  }\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"filter\": {\n    \"property\": \"\",\n    \"select\": {\n      \"equals\": \"\"\n    }\n  }\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/databases/:id/query")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/databases/:id/query")
  .header("content-type", "application/json")
  .body("{\n  \"filter\": {\n    \"property\": \"\",\n    \"select\": {\n      \"equals\": \"\"\n    }\n  }\n}")
  .asString();
const data = JSON.stringify({
  filter: {
    property: '',
    select: {
      equals: ''
    }
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/databases/:id/query');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/databases/:id/query',
  headers: {'content-type': 'application/json'},
  data: {filter: {property: '', select: {equals: ''}}}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/databases/:id/query';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"filter":{"property":"","select":{"equals":""}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/databases/:id/query',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "filter": {\n    "property": "",\n    "select": {\n      "equals": ""\n    }\n  }\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"filter\": {\n    \"property\": \"\",\n    \"select\": {\n      \"equals\": \"\"\n    }\n  }\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/databases/:id/query")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/databases/:id/query',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({filter: {property: '', select: {equals: ''}}}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/databases/:id/query',
  headers: {'content-type': 'application/json'},
  body: {filter: {property: '', select: {equals: ''}}},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/databases/:id/query');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  filter: {
    property: '',
    select: {
      equals: ''
    }
  }
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/databases/:id/query',
  headers: {'content-type': 'application/json'},
  data: {filter: {property: '', select: {equals: ''}}}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/databases/:id/query';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"filter":{"property":"","select":{"equals":""}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"filter": @{ @"property": @"", @"select": @{ @"equals": @"" } } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/databases/:id/query"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/databases/:id/query" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"filter\": {\n    \"property\": \"\",\n    \"select\": {\n      \"equals\": \"\"\n    }\n  }\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/databases/:id/query",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'filter' => [
        'property' => '',
        'select' => [
                'equals' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/databases/:id/query', [
  'body' => '{
  "filter": {
    "property": "",
    "select": {
      "equals": ""
    }
  }
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/databases/:id/query');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'filter' => [
    'property' => '',
    'select' => [
        'equals' => ''
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'filter' => [
    'property' => '',
    'select' => [
        'equals' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1/databases/:id/query');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/databases/:id/query' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "filter": {
    "property": "",
    "select": {
      "equals": ""
    }
  }
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/databases/:id/query' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "filter": {
    "property": "",
    "select": {
      "equals": ""
    }
  }
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"filter\": {\n    \"property\": \"\",\n    \"select\": {\n      \"equals\": \"\"\n    }\n  }\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1/databases/:id/query", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/databases/:id/query"

payload = { "filter": {
        "property": "",
        "select": { "equals": "" }
    } }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/databases/:id/query"

payload <- "{\n  \"filter\": {\n    \"property\": \"\",\n    \"select\": {\n      \"equals\": \"\"\n    }\n  }\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/databases/:id/query")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"filter\": {\n    \"property\": \"\",\n    \"select\": {\n      \"equals\": \"\"\n    }\n  }\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/databases/:id/query') do |req|
  req.body = "{\n  \"filter\": {\n    \"property\": \"\",\n    \"select\": {\n      \"equals\": \"\"\n    }\n  }\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/databases/:id/query";

    let payload = json!({"filter": json!({
            "property": "",
            "select": json!({"equals": ""})
        })});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/databases/:id/query \
  --header 'content-type: application/json' \
  --data '{
  "filter": {
    "property": "",
    "select": {
      "equals": ""
    }
  }
}'
echo '{
  "filter": {
    "property": "",
    "select": {
      "equals": ""
    }
  }
}' |  \
  http POST {{baseUrl}}/v1/databases/:id/query \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "filter": {\n    "property": "",\n    "select": {\n      "equals": ""\n    }\n  }\n}' \
  --output-document \
  - {{baseUrl}}/v1/databases/:id/query
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["filter": [
    "property": "",
    "select": ["equals": ""]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/databases/:id/query")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "has_more": false,
  "next_cursor": null,
  "object": "list",
  "results": [
    {
      "archived": false,
      "cover": null,
      "created_by": {
        "id": "6794760a-1f15-45cd-9c65-0dfe42f5135a",
        "object": "user"
      },
      "created_time": "2021-04-27T20:38:00.000Z",
      "icon": null,
      "id": "557ef501-bfdb-4586-918e-4434f31bca8c",
      "last_edited_by": {
        "id": "6794760a-1f15-45cd-9c65-0dfe42f5135a",
        "object": "user"
      },
      "last_edited_time": "2021-04-27T20:38:00.000Z",
      "object": "page",
      "parent": {
        "database_id": "8e2c2b76-9e1d-47d2-87b9-ed3035d607ae",
        "type": "database_id"
      },
      "properties": {
        "Author": {
          "id": "qNw_",
          "multi_select": [
            {
              "color": "default",
              "id": "ae3a2cbe-1fc9-4376-be35-331628b34623",
              "name": "Karen Swallow Prior"
            }
          ],
          "type": "multi_select"
        },
        "Link": {
          "id": "VVMi",
          "type": "url",
          "url": "https://www.theatlantic.com/entertainment/archive/2016/03/how-jane-eyre-created-the-modern-self/460461/"
        },
        "Name": {
          "id": "title",
          "title": [
            {
              "annotations": {
                "bold": false,
                "code": false,
                "color": "default",
                "italic": true,
                "strikethrough": false,
                "underline": false
              },
              "href": null,
              "plain_text": "Jane Eyre",
              "text": {
                "content": "Jane Eyre",
                "link": null
              },
              "type": "text"
            },
            {
              "annotations": {
                "bold": false,
                "code": false,
                "color": "default",
                "italic": false,
                "strikethrough": false,
                "underline": false
              },
              "href": null,
              "plain_text": " and the Invention of Self",
              "text": {
                "content": " and the Invention of Self",
                "link": null
              },
              "type": "text"
            }
          ],
          "type": "title"
        },
        "Publisher": {
          "id": "%3E%24Pb",
          "select": {
            "color": "red",
            "id": "01f82d08-aa1f-4884-a4e0-3bc32f909ec4",
            "name": "The Atlantic"
          },
          "type": "select"
        },
        "Publishing/Release Date": {
          "date": {
            "end": null,
            "start": "2016-10-03",
            "time_zone": null
          },
          "id": "%3Fex%2B",
          "type": "date"
        },
        "Read": {
          "checkbox": false,
          "id": "_MWJ",
          "type": "checkbox"
        },
        "Score /5": {
          "id": ")Y7%22",
          "select": {
            "color": "default",
            "id": "66d3d050-086c-4a91-8c56-d55dc67e7789",
            "name": "⭐️⭐️"
          },
          "type": "select"
        },
        "Status": {
          "id": "%60zz5",
          "select": {
            "color": "red",
            "id": "5925ba22-0126-4b58-90c7-b8bbb2c3c895",
            "name": "Reading"
          },
          "type": "select"
        },
        "Summary": {
          "id": "%3F%5C25",
          "rich_text": [],
          "type": "rich_text"
        },
        "Type": {
          "id": "%2F7eo",
          "select": {
            "color": "default",
            "id": "9cc30548-59d6-4cd3-94bc-d234081525c4",
            "name": "Essay Resource"
          },
          "type": "select"
        }
      },
      "url": "https://www.notion.so/Jane-Eyre-and-the-Invention-of-Self-557ef501bfdb4586918e4434f31bca8c"
    },
    {
      "archived": false,
      "cover": null,
      "created_by": {
        "id": "6794760a-1f15-45cd-9c65-0dfe42f5135a",
        "object": "user"
      },
      "created_time": "2021-04-27T20:38:00.000Z",
      "icon": null,
      "id": "a1712d54-53e4-4893-a69d-4d581cd2c845",
      "last_edited_by": {
        "id": "92a680bb-6970-4726-952b-4f4c03bff617",
        "object": "user"
      },
      "last_edited_time": "2021-05-12T06:07:00.000Z",
      "object": "page",
      "parent": {
        "database_id": "8e2c2b76-9e1d-47d2-87b9-ed3035d607ae",
        "type": "database_id"
      },
      "properties": {
        "Author": {
          "id": "qNw_",
          "multi_select": [
            {
              "color": "default",
              "id": "833e2c78-35ed-4601-badc-50c323341d76",
              "name": "Kara Swisher"
            }
          ],
          "type": "multi_select"
        },
        "Link": {
          "id": "VVMi",
          "type": "url",
          "url": "https://www.nytimes.com/2018/10/21/opinion/who-will-teach-silicon-valley-to-be-ethical.html"
        },
        "Name": {
          "id": "title",
          "title": [
            {
              "annotations": {
                "bold": false,
                "code": false,
                "color": "default",
                "italic": false,
                "strikethrough": false,
                "underline": false
              },
              "href": null,
              "plain_text": "Who Will Teach Silicon Valley to Be Ethical? ",
              "text": {
                "content": "Who Will Teach Silicon Valley to Be Ethical? ",
                "link": null
              },
              "type": "text"
            }
          ],
          "type": "title"
        },
        "Publisher": {
          "id": "%3E%24Pb",
          "select": {
            "color": "default",
            "id": "c5ee409a-f307-4176-99ee-6e424fa89afa",
            "name": "NYT"
          },
          "type": "select"
        },
        "Publishing/Release Date": {
          "date": {
            "end": null,
            "start": "2018-10-21",
            "time_zone": null
          },
          "id": "%3Fex%2B",
          "type": "date"
        },
        "Read": {
          "checkbox": true,
          "id": "_MWJ",
          "type": "checkbox"
        },
        "Score /5": {
          "id": ")Y7%22",
          "select": {
            "color": "default",
            "id": "b7307e35-c80a-4cb5-bb6b-6054523b394a",
            "name": "⭐️⭐️⭐️⭐️"
          },
          "type": "select"
        },
        "Status": {
          "id": "%60zz5",
          "select": {
            "color": "red",
            "id": "5925ba22-0126-4b58-90c7-b8bbb2c3c895",
            "name": "Reading"
          },
          "type": "select"
        },
        "Summary": {
          "id": "%3F%5C25",
          "rich_text": [
            {
              "annotations": {
                "bold": false,
                "code": false,
                "color": "default",
                "italic": false,
                "strikethrough": false,
                "underline": false
              },
              "href": null,
              "plain_text": "Some think chief ethics officers could help technology companies navigate political and social questions.",
              "text": {
                "content": "Some think chief ethics officers could help technology companies navigate political and social questions.",
                "link": null
              },
              "type": "text"
            }
          ],
          "type": "rich_text"
        },
        "Type": {
          "id": "%2F7eo",
          "select": {
            "color": "default",
            "id": "f96d0d0a-5564-4a20-ab15-5f040d49759e",
            "name": "Article"
          },
          "type": "select"
        }
      },
      "url": "https://www.notion.so/Who-Will-Teach-Silicon-Valley-to-Be-Ethical-a1712d5453e44893a69d4d581cd2c845"
    }
  ]
}
GET Retrieve a database
{{baseUrl}}/v1/databases/:id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/databases/:id");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/databases/:id")
require "http/client"

url = "{{baseUrl}}/v1/databases/:id"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/databases/:id"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/databases/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/databases/:id"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/databases/:id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/databases/:id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/databases/:id"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/databases/:id")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/databases/:id")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/databases/:id');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1/databases/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/databases/:id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/databases/:id',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/databases/:id")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/databases/:id',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/v1/databases/:id'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/databases/:id');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/v1/databases/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/databases/:id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/databases/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/databases/:id" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/databases/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/databases/:id');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/databases/:id');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/databases/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/databases/:id' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/databases/:id' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/databases/:id")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/databases/:id"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/databases/:id"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/databases/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/databases/:id') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/databases/:id";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/databases/:id
http GET {{baseUrl}}/v1/databases/:id
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/databases/:id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/databases/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "archived": false,
  "cover": null,
  "created_by": {
    "id": "6794760a-1f15-45cd-9c65-0dfe42f5135a",
    "object": "user"
  },
  "created_time": "2021-04-27T20:38:00.000Z",
  "icon": null,
  "id": "8e2c2b76-9e1d-47d2-87b9-ed3035d607ae",
  "last_edited_by": {
    "id": "6794760a-1f15-45cd-9c65-0dfe42f5135a",
    "object": "user"
  },
  "last_edited_time": "2022-02-24T22:14:00.000Z",
  "object": "database",
  "parent": {
    "page_id": "c4d39556-6364-46a1-8a61-ebbb668f7445",
    "type": "page_id"
  },
  "properties": {
    "Author": {
      "id": "qNw_",
      "multi_select": {
        "options": [
          {
            "color": "default",
            "id": "15592971-7b30-43d5-9406-2eb69b13fcae",
            "name": "Spencer Greenberg"
          },
          {
            "color": "default",
            "id": "b80a988e-dccf-4f74-b764-6ca0e49ed1b8",
            "name": "Seth Stephens-Davidowitz"
          },
          {
            "color": "default",
            "id": "0e71ee06-199d-46a4-834c-01084c8f76cb",
            "name": "Andrew Russell"
          },
          {
            "color": "default",
            "id": "5807ec38-4879-4455-9f30-5352e90e8b79",
            "name": "Lee Vinsel"
          },
          {
            "color": "default",
            "id": "4cf10a64-f3da-449c-8e04-ce6e338bbdbd",
            "name": "Megan Greenwell"
          },
          {
            "color": "default",
            "id": "833e2c78-35ed-4601-badc-50c323341d76",
            "name": "Kara Swisher"
          },
          {
            "color": "default",
            "id": "82e594e2-b1c5-4271-ac19-1a723a94a533",
            "name": "Paul Romer"
          },
          {
            "color": "default",
            "id": "ae3a2cbe-1fc9-4376-be35-331628b34623",
            "name": "Karen Swallow Prior"
          },
          {
            "color": "default",
            "id": "da068e78-dfe2-4434-9fd7-b7450b3e5830",
            "name": "Judith Shulevitz"
          }
        ]
      },
      "name": "Author",
      "type": "multi_select"
    },
    "Link": {
      "id": "VVMi",
      "name": "Link",
      "type": "url",
      "url": {}
    },
    "Name": {
      "id": "title",
      "name": "Name",
      "title": {},
      "type": "title"
    },
    "Publisher": {
      "id": "%3E%24Pb",
      "name": "Publisher",
      "select": {
        "options": [
          {
            "color": "default",
            "id": "c5ee409a-f307-4176-99ee-6e424fa89afa",
            "name": "NYT"
          },
          {
            "color": "blue",
            "id": "1b9b0c0c-17b0-4292-ad12-1364a51849de",
            "name": "Netflix"
          },
          {
            "color": "brown",
            "id": "f3533637-278f-4501-b394-d9753bf3c101",
            "name": "Indie"
          },
          {
            "color": "yellow",
            "id": "e70d713c-4be4-4b40-a44d-fb413c8b9d7e",
            "name": "Bon Appetit"
          },
          {
            "color": "pink",
            "id": "9c2bd667-0a10-4be4-a044-35a537a14ab9",
            "name": "Franklin Institute"
          },
          {
            "color": "orange",
            "id": "6849b5f0-e641-4ec5-83cb-1ffe23011060",
            "name": "Springer"
          },
          {
            "color": "gray",
            "id": "6a5bff63-a72d-4464-a5d0-1a601af2adf6",
            "name": "Emerald Group"
          },
          {
            "color": "red",
            "id": "01f82d08-aa1f-4884-a4e0-3bc32f909ec4",
            "name": "The Atlantic"
          }
        ]
      },
      "type": "select"
    },
    "Publishing/Release Date": {
      "date": {},
      "id": "%3Fex%2B",
      "name": "Publishing/Release Date",
      "type": "date"
    },
    "Read": {
      "checkbox": {},
      "id": "_MWJ",
      "name": "Read",
      "type": "checkbox"
    },
    "Score /5": {
      "id": ")Y7%22",
      "name": "Score /5",
      "select": {
        "options": [
          {
            "color": "default",
            "id": "5c944de7-3f4b-4567-b3a1-fa2c71c540b6",
            "name": "⭐️⭐️⭐️⭐️⭐️"
          },
          {
            "color": "default",
            "id": "b7307e35-c80a-4cb5-bb6b-6054523b394a",
            "name": "⭐️⭐️⭐️⭐️"
          },
          {
            "color": "default",
            "id": "9b1e1349-8e24-40ba-bbca-84a61296bc81",
            "name": "⭐️⭐️⭐️"
          },
          {
            "color": "default",
            "id": "66d3d050-086c-4a91-8c56-d55dc67e7789",
            "name": "⭐️⭐️"
          },
          {
            "color": "default",
            "id": "d3782c76-0396-467f-928e-46bf0c9d5fba",
            "name": "⭐️"
          }
        ]
      },
      "type": "select"
    },
    "Status": {
      "id": "%60zz5",
      "name": "Status",
      "select": {
        "options": [
          {
            "color": "yellow",
            "id": "8c4a056e-6709-4dd1-ba58-d34d9480855a",
            "name": "Ready to Start"
          },
          {
            "color": "red",
            "id": "5925ba22-0126-4b58-90c7-b8bbb2c3c895",
            "name": "Reading"
          },
          {
            "color": "blue",
            "id": "59aa9043-07b4-4bf4-8734-3164b13af44a",
            "name": "Finished"
          },
          {
            "color": "red",
            "id": "f961978d-02eb-4998-933a-33c2ec378564",
            "name": "Listening"
          },
          {
            "color": "red",
            "id": "1d450853-b27a-45e2-979f-448aa1bd35de",
            "name": "Watching"
          }
        ]
      },
      "type": "select"
    },
    "Summary": {
      "id": "%3F%5C25",
      "name": "Summary",
      "rich_text": {},
      "type": "rich_text"
    },
    "Type": {
      "id": "%2F7eo",
      "name": "Type",
      "select": {
        "options": [
          {
            "color": "default",
            "id": "f96d0d0a-5564-4a20-ab15-5f040d49759e",
            "name": "Article"
          },
          {
            "color": "default",
            "id": "4ac85597-5db1-4e0a-9c02-445575c38f76",
            "name": "TV Series"
          },
          {
            "color": "default",
            "id": "2991748a-5745-4c3b-9c9b-2d6846a6fa1f",
            "name": "Film"
          },
          {
            "color": "default",
            "id": "82f3bace-be25-410d-87fe-561c9c22492f",
            "name": "Podcast"
          },
          {
            "color": "default",
            "id": "861f1076-1cc4-429a-a781-54947d727a4a",
            "name": "Academic Journal"
          },
          {
            "color": "default",
            "id": "9cc30548-59d6-4cd3-94bc-d234081525c4",
            "name": "Essay Resource"
          }
        ]
      },
      "type": "select"
    }
  },
  "title": [
    {
      "annotations": {
        "bold": false,
        "code": false,
        "color": "default",
        "italic": false,
        "strikethrough": false,
        "underline": false
      },
      "href": null,
      "plain_text": "Ever Better Reading List Title",
      "text": {
        "content": "Ever Better Reading List Title",
        "link": null
      },
      "type": "text"
    }
  ],
  "url": "https://www.notion.so/8e2c2b769e1d47d287b9ed3035d607ae"
}
PATCH Update a database
{{baseUrl}}/v1/databases/:id
BODY json

{
  "properties": {
    "Wine Pairing": {
      "rich_text": {}
    }
  },
  "title": [
    {
      "text": {
        "content": ""
      }
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/databases/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"properties\": {\n    \"Wine Pairing\": {\n      \"rich_text\": {}\n    }\n  },\n  \"title\": [\n    {\n      \"text\": {\n        \"content\": \"\"\n      }\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/v1/databases/:id" {:content-type :json
                                                              :form-params {:properties {:Wine Pairing {:rich_text {}}}
                                                                            :title [{:text {:content ""}}]}})
require "http/client"

url = "{{baseUrl}}/v1/databases/:id"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"properties\": {\n    \"Wine Pairing\": {\n      \"rich_text\": {}\n    }\n  },\n  \"title\": [\n    {\n      \"text\": {\n        \"content\": \"\"\n      }\n    }\n  ]\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/v1/databases/:id"),
    Content = new StringContent("{\n  \"properties\": {\n    \"Wine Pairing\": {\n      \"rich_text\": {}\n    }\n  },\n  \"title\": [\n    {\n      \"text\": {\n        \"content\": \"\"\n      }\n    }\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/databases/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"properties\": {\n    \"Wine Pairing\": {\n      \"rich_text\": {}\n    }\n  },\n  \"title\": [\n    {\n      \"text\": {\n        \"content\": \"\"\n      }\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/databases/:id"

	payload := strings.NewReader("{\n  \"properties\": {\n    \"Wine Pairing\": {\n      \"rich_text\": {}\n    }\n  },\n  \"title\": [\n    {\n      \"text\": {\n        \"content\": \"\"\n      }\n    }\n  ]\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PATCH /baseUrl/v1/databases/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 151

{
  "properties": {
    "Wine Pairing": {
      "rich_text": {}
    }
  },
  "title": [
    {
      "text": {
        "content": ""
      }
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1/databases/:id")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"properties\": {\n    \"Wine Pairing\": {\n      \"rich_text\": {}\n    }\n  },\n  \"title\": [\n    {\n      \"text\": {\n        \"content\": \"\"\n      }\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/databases/:id"))
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"properties\": {\n    \"Wine Pairing\": {\n      \"rich_text\": {}\n    }\n  },\n  \"title\": [\n    {\n      \"text\": {\n        \"content\": \"\"\n      }\n    }\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"properties\": {\n    \"Wine Pairing\": {\n      \"rich_text\": {}\n    }\n  },\n  \"title\": [\n    {\n      \"text\": {\n        \"content\": \"\"\n      }\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/databases/:id")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v1/databases/:id")
  .header("content-type", "application/json")
  .body("{\n  \"properties\": {\n    \"Wine Pairing\": {\n      \"rich_text\": {}\n    }\n  },\n  \"title\": [\n    {\n      \"text\": {\n        \"content\": \"\"\n      }\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  properties: {
    'Wine Pairing': {
      rich_text: {}
    }
  },
  title: [
    {
      text: {
        content: ''
      }
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/v1/databases/:id');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/databases/:id',
  headers: {'content-type': 'application/json'},
  data: {properties: {'Wine Pairing': {rich_text: {}}}, title: [{text: {content: ''}}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/databases/:id';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"properties":{"Wine Pairing":{"rich_text":{}}},"title":[{"text":{"content":""}}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/databases/:id',
  method: 'PATCH',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "properties": {\n    "Wine Pairing": {\n      "rich_text": {}\n    }\n  },\n  "title": [\n    {\n      "text": {\n        "content": ""\n      }\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"properties\": {\n    \"Wine Pairing\": {\n      \"rich_text\": {}\n    }\n  },\n  \"title\": [\n    {\n      \"text\": {\n        \"content\": \"\"\n      }\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/databases/:id")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/databases/:id',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({properties: {'Wine Pairing': {rich_text: {}}}, title: [{text: {content: ''}}]}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/databases/:id',
  headers: {'content-type': 'application/json'},
  body: {properties: {'Wine Pairing': {rich_text: {}}}, title: [{text: {content: ''}}]},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/v1/databases/:id');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  properties: {
    'Wine Pairing': {
      rich_text: {}
    }
  },
  title: [
    {
      text: {
        content: ''
      }
    }
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/databases/:id',
  headers: {'content-type': 'application/json'},
  data: {properties: {'Wine Pairing': {rich_text: {}}}, title: [{text: {content: ''}}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/databases/:id';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"properties":{"Wine Pairing":{"rich_text":{}}},"title":[{"text":{"content":""}}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"properties": @{ @"Wine Pairing": @{ @"rich_text": @{  } } },
                              @"title": @[ @{ @"text": @{ @"content": @"" } } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/databases/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/databases/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"properties\": {\n    \"Wine Pairing\": {\n      \"rich_text\": {}\n    }\n  },\n  \"title\": [\n    {\n      \"text\": {\n        \"content\": \"\"\n      }\n    }\n  ]\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/databases/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'properties' => [
        'Wine Pairing' => [
                'rich_text' => [
                                
                ]
        ]
    ],
    'title' => [
        [
                'text' => [
                                'content' => ''
                ]
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/v1/databases/:id', [
  'body' => '{
  "properties": {
    "Wine Pairing": {
      "rich_text": {}
    }
  },
  "title": [
    {
      "text": {
        "content": ""
      }
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/databases/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'properties' => [
    'Wine Pairing' => [
        'rich_text' => [
                
        ]
    ]
  ],
  'title' => [
    [
        'text' => [
                'content' => ''
        ]
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'properties' => [
    'Wine Pairing' => [
        'rich_text' => [
                
        ]
    ]
  ],
  'title' => [
    [
        'text' => [
                'content' => ''
        ]
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1/databases/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/databases/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "properties": {
    "Wine Pairing": {
      "rich_text": {}
    }
  },
  "title": [
    {
      "text": {
        "content": ""
      }
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/databases/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "properties": {
    "Wine Pairing": {
      "rich_text": {}
    }
  },
  "title": [
    {
      "text": {
        "content": ""
      }
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"properties\": {\n    \"Wine Pairing\": {\n      \"rich_text\": {}\n    }\n  },\n  \"title\": [\n    {\n      \"text\": {\n        \"content\": \"\"\n      }\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("PATCH", "/baseUrl/v1/databases/:id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/databases/:id"

payload = {
    "properties": { "Wine Pairing": { "rich_text": {} } },
    "title": [{ "text": { "content": "" } }]
}
headers = {"content-type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/databases/:id"

payload <- "{\n  \"properties\": {\n    \"Wine Pairing\": {\n      \"rich_text\": {}\n    }\n  },\n  \"title\": [\n    {\n      \"text\": {\n        \"content\": \"\"\n      }\n    }\n  ]\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/databases/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"properties\": {\n    \"Wine Pairing\": {\n      \"rich_text\": {}\n    }\n  },\n  \"title\": [\n    {\n      \"text\": {\n        \"content\": \"\"\n      }\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/v1/databases/:id') do |req|
  req.body = "{\n  \"properties\": {\n    \"Wine Pairing\": {\n      \"rich_text\": {}\n    }\n  },\n  \"title\": [\n    {\n      \"text\": {\n        \"content\": \"\"\n      }\n    }\n  ]\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/databases/:id";

    let payload = json!({
        "properties": json!({"Wine Pairing": json!({"rich_text": json!({})})}),
        "title": (json!({"text": json!({"content": ""})}))
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/v1/databases/:id \
  --header 'content-type: application/json' \
  --data '{
  "properties": {
    "Wine Pairing": {
      "rich_text": {}
    }
  },
  "title": [
    {
      "text": {
        "content": ""
      }
    }
  ]
}'
echo '{
  "properties": {
    "Wine Pairing": {
      "rich_text": {}
    }
  },
  "title": [
    {
      "text": {
        "content": ""
      }
    }
  ]
}' |  \
  http PATCH {{baseUrl}}/v1/databases/:id \
  content-type:application/json
wget --quiet \
  --method PATCH \
  --header 'content-type: application/json' \
  --body-data '{\n  "properties": {\n    "Wine Pairing": {\n      "rich_text": {}\n    }\n  },\n  "title": [\n    {\n      "text": {\n        "content": ""\n      }\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/v1/databases/:id
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "properties": ["Wine Pairing": ["rich_text": []]],
  "title": [["text": ["content": ""]]]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/databases/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "archived": false,
  "cover": null,
  "created_by": {
    "id": "6794760a-1f15-45cd-9c65-0dfe42f5135a",
    "object": "user"
  },
  "created_time": "2021-04-27T20:38:00.000Z",
  "icon": null,
  "id": "8e2c2b76-9e1d-47d2-87b9-ed3035d607ae",
  "last_edited_by": {
    "id": "92a680bb-6970-4726-952b-4f4c03bff617",
    "object": "user"
  },
  "last_edited_time": "2022-02-24T22:08:00.000Z",
  "object": "database",
  "parent": {
    "page_id": "c4d39556-6364-46a1-8a61-ebbb668f7445",
    "type": "page_id"
  },
  "properties": {
    "Author": {
      "id": "qNw_",
      "multi_select": {
        "options": [
          {
            "color": "default",
            "id": "15592971-7b30-43d5-9406-2eb69b13fcae",
            "name": "Spencer Greenberg"
          },
          {
            "color": "default",
            "id": "b80a988e-dccf-4f74-b764-6ca0e49ed1b8",
            "name": "Seth Stephens-Davidowitz"
          },
          {
            "color": "default",
            "id": "0e71ee06-199d-46a4-834c-01084c8f76cb",
            "name": "Andrew Russell"
          },
          {
            "color": "default",
            "id": "5807ec38-4879-4455-9f30-5352e90e8b79",
            "name": "Lee Vinsel"
          },
          {
            "color": "default",
            "id": "4cf10a64-f3da-449c-8e04-ce6e338bbdbd",
            "name": "Megan Greenwell"
          },
          {
            "color": "default",
            "id": "833e2c78-35ed-4601-badc-50c323341d76",
            "name": "Kara Swisher"
          },
          {
            "color": "default",
            "id": "82e594e2-b1c5-4271-ac19-1a723a94a533",
            "name": "Paul Romer"
          },
          {
            "color": "default",
            "id": "ae3a2cbe-1fc9-4376-be35-331628b34623",
            "name": "Karen Swallow Prior"
          },
          {
            "color": "default",
            "id": "da068e78-dfe2-4434-9fd7-b7450b3e5830",
            "name": "Judith Shulevitz"
          }
        ]
      },
      "name": "Author",
      "type": "multi_select"
    },
    "Link": {
      "id": "VVMi",
      "name": "Link",
      "type": "url",
      "url": {}
    },
    "Name": {
      "id": "title",
      "name": "Name",
      "title": {},
      "type": "title"
    },
    "Publisher": {
      "id": ">$Pb",
      "name": "Publisher",
      "select": {
        "options": [
          {
            "color": "default",
            "id": "c5ee409a-f307-4176-99ee-6e424fa89afa",
            "name": "NYT"
          },
          {
            "color": "blue",
            "id": "1b9b0c0c-17b0-4292-ad12-1364a51849de",
            "name": "Netflix"
          },
          {
            "color": "brown",
            "id": "f3533637-278f-4501-b394-d9753bf3c101",
            "name": "Indie"
          },
          {
            "color": "yellow",
            "id": "e70d713c-4be4-4b40-a44d-fb413c8b9d7e",
            "name": "Bon Appetit"
          },
          {
            "color": "pink",
            "id": "9c2bd667-0a10-4be4-a044-35a537a14ab9",
            "name": "Franklin Institute"
          },
          {
            "color": "orange",
            "id": "6849b5f0-e641-4ec5-83cb-1ffe23011060",
            "name": "Springer"
          },
          {
            "color": "gray",
            "id": "6a5bff63-a72d-4464-a5d0-1a601af2adf6",
            "name": "Emerald Group"
          },
          {
            "color": "red",
            "id": "01f82d08-aa1f-4884-a4e0-3bc32f909ec4",
            "name": "The Atlantic"
          }
        ]
      },
      "type": "select"
    },
    "Publishing/Release Date": {
      "date": {},
      "id": "?ex+",
      "name": "Publishing/Release Date",
      "type": "date"
    },
    "Read": {
      "checkbox": {},
      "id": "_MWJ",
      "name": "Read",
      "type": "checkbox"
    },
    "Score /5": {
      "id": ")Y7\"",
      "name": "Score /5",
      "select": {
        "options": [
          {
            "color": "default",
            "id": "5c944de7-3f4b-4567-b3a1-fa2c71c540b6",
            "name": "⭐️⭐️⭐️⭐️⭐️"
          },
          {
            "color": "default",
            "id": "b7307e35-c80a-4cb5-bb6b-6054523b394a",
            "name": "⭐️⭐️⭐️⭐️"
          },
          {
            "color": "default",
            "id": "9b1e1349-8e24-40ba-bbca-84a61296bc81",
            "name": "⭐️⭐️⭐️"
          },
          {
            "color": "default",
            "id": "66d3d050-086c-4a91-8c56-d55dc67e7789",
            "name": "⭐️⭐️"
          },
          {
            "color": "default",
            "id": "d3782c76-0396-467f-928e-46bf0c9d5fba",
            "name": "⭐️"
          }
        ]
      },
      "type": "select"
    },
    "Status": {
      "id": "`zz5",
      "name": "Status",
      "select": {
        "options": [
          {
            "color": "yellow",
            "id": "8c4a056e-6709-4dd1-ba58-d34d9480855a",
            "name": "Ready to Start"
          },
          {
            "color": "red",
            "id": "5925ba22-0126-4b58-90c7-b8bbb2c3c895",
            "name": "Reading"
          },
          {
            "color": "blue",
            "id": "59aa9043-07b4-4bf4-8734-3164b13af44a",
            "name": "Finished"
          },
          {
            "color": "red",
            "id": "f961978d-02eb-4998-933a-33c2ec378564",
            "name": "Listening"
          },
          {
            "color": "red",
            "id": "1d450853-b27a-45e2-979f-448aa1bd35de",
            "name": "Watching"
          }
        ]
      },
      "type": "select"
    },
    "Summary": {
      "id": "?\\25",
      "name": "Summary",
      "rich_text": {},
      "type": "rich_text"
    },
    "Type": {
      "id": "/7eo",
      "name": "Type",
      "select": {
        "options": [
          {
            "color": "default",
            "id": "f96d0d0a-5564-4a20-ab15-5f040d49759e",
            "name": "Article"
          },
          {
            "color": "default",
            "id": "4ac85597-5db1-4e0a-9c02-445575c38f76",
            "name": "TV Series"
          },
          {
            "color": "default",
            "id": "2991748a-5745-4c3b-9c9b-2d6846a6fa1f",
            "name": "Film"
          },
          {
            "color": "default",
            "id": "82f3bace-be25-410d-87fe-561c9c22492f",
            "name": "Podcast"
          },
          {
            "color": "default",
            "id": "861f1076-1cc4-429a-a781-54947d727a4a",
            "name": "Academic Journal"
          },
          {
            "color": "default",
            "id": "9cc30548-59d6-4cd3-94bc-d234081525c4",
            "name": "Essay Resource"
          }
        ]
      },
      "type": "select"
    },
    "Wine Pairing": {
      "id": "Y=H]",
      "name": "Wine Pairing",
      "rich_text": {},
      "type": "rich_text"
    }
  },
  "title": [
    {
      "annotations": {
        "bold": false,
        "code": false,
        "color": "default",
        "italic": false,
        "strikethrough": false,
        "underline": false
      },
      "href": null,
      "plain_text": "Ever Better Reading List Title",
      "text": {
        "content": "Ever Better Reading List Title",
        "link": null
      },
      "type": "text"
    }
  ],
  "url": "https://www.notion.so/8e2c2b769e1d47d287b9ed3035d607ae"
}
GET Retrieve a Page Property Item
{{baseUrl}}/v1/pages/:page_id/properties/:property_id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/pages/:page_id/properties/:property_id");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/pages/:page_id/properties/:property_id")
require "http/client"

url = "{{baseUrl}}/v1/pages/:page_id/properties/:property_id"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/pages/:page_id/properties/:property_id"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/pages/:page_id/properties/:property_id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/pages/:page_id/properties/:property_id"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/pages/:page_id/properties/:property_id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/pages/:page_id/properties/:property_id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/pages/:page_id/properties/:property_id"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/pages/:page_id/properties/:property_id")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/pages/:page_id/properties/:property_id")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/pages/:page_id/properties/:property_id');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/pages/:page_id/properties/:property_id'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/pages/:page_id/properties/:property_id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/pages/:page_id/properties/:property_id',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/pages/:page_id/properties/:property_id")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/pages/:page_id/properties/:property_id',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/pages/:page_id/properties/:property_id'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/pages/:page_id/properties/:property_id');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/pages/:page_id/properties/:property_id'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/pages/:page_id/properties/:property_id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/pages/:page_id/properties/:property_id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/pages/:page_id/properties/:property_id" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/pages/:page_id/properties/:property_id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/pages/:page_id/properties/:property_id');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/pages/:page_id/properties/:property_id');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/pages/:page_id/properties/:property_id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/pages/:page_id/properties/:property_id' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/pages/:page_id/properties/:property_id' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/pages/:page_id/properties/:property_id")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/pages/:page_id/properties/:property_id"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/pages/:page_id/properties/:property_id"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/pages/:page_id/properties/:property_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/pages/:page_id/properties/:property_id') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/pages/:page_id/properties/:property_id";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/pages/:page_id/properties/:property_id
http GET {{baseUrl}}/v1/pages/:page_id/properties/:property_id
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/pages/:page_id/properties/:property_id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/pages/:page_id/properties/:property_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "object": "property_item",
  "select": {
    "color": "default",
    "id": "5c944de7-3f4b-4567-b3a1-fa2c71c540b6",
    "name": "⭐️⭐️⭐️⭐️⭐️"
  },
  "type": "select"
}
GET Retrieve a Page
{{baseUrl}}/v1/pages/:id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/pages/:id");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/pages/:id")
require "http/client"

url = "{{baseUrl}}/v1/pages/:id"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/pages/:id"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/pages/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/pages/:id"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/pages/:id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/pages/:id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/pages/:id"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/pages/:id")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/pages/:id")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/pages/:id');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1/pages/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/pages/:id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/pages/:id',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/pages/:id")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/pages/:id',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/v1/pages/:id'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/pages/:id');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/v1/pages/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/pages/:id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/pages/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/pages/:id" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/pages/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/pages/:id');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/pages/:id');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/pages/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/pages/:id' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/pages/:id' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/pages/:id")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/pages/:id"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/pages/:id"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/pages/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/pages/:id') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/pages/:id";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/pages/:id
http GET {{baseUrl}}/v1/pages/:id
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/pages/:id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/pages/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "archived": false,
  "cover": null,
  "created_by": {
    "id": "6794760a-1f15-45cd-9c65-0dfe42f5135a",
    "object": "user"
  },
  "created_time": "2021-04-27T20:38:00.000Z",
  "icon": {
    "emoji": "📕",
    "type": "emoji"
  },
  "id": "c4d39556-6364-46a1-8a61-ebbb668f7445",
  "last_edited_by": {
    "id": "92a680bb-6970-4726-952b-4f4c03bff617",
    "object": "user"
  },
  "last_edited_time": "2022-03-02T05:22:00.000Z",
  "object": "page",
  "parent": {
    "page_id": "c1218692-102d-4b47-ab38-c21900b3557b",
    "type": "page_id"
  },
  "properties": {
    "title": {
      "id": "title",
      "title": [
        {
          "annotations": {
            "bold": false,
            "code": false,
            "color": "default",
            "italic": false,
            "strikethrough": false,
            "underline": false
          },
          "href": null,
          "plain_text": "Reading List",
          "text": {
            "content": "Reading List",
            "link": null
          },
          "type": "text"
        }
      ],
      "type": "title"
    }
  },
  "url": "https://www.notion.so/Reading-List-c4d39556636446a18a61ebbb668f7445"
}
PATCH Update Page properties
{{baseUrl}}/v1/pages/:id
BODY json

{
  "properties": {
    "Status": {
      "select": {
        "name": ""
      }
    }
  }
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/pages/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"properties\": {\n    \"Status\": {\n      \"select\": {\n        \"name\": \"\"\n      }\n    }\n  }\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/v1/pages/:id" {:content-type :json
                                                          :form-params {:properties {:Status {:select {:name ""}}}}})
require "http/client"

url = "{{baseUrl}}/v1/pages/:id"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"properties\": {\n    \"Status\": {\n      \"select\": {\n        \"name\": \"\"\n      }\n    }\n  }\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/v1/pages/:id"),
    Content = new StringContent("{\n  \"properties\": {\n    \"Status\": {\n      \"select\": {\n        \"name\": \"\"\n      }\n    }\n  }\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/pages/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"properties\": {\n    \"Status\": {\n      \"select\": {\n        \"name\": \"\"\n      }\n    }\n  }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/pages/:id"

	payload := strings.NewReader("{\n  \"properties\": {\n    \"Status\": {\n      \"select\": {\n        \"name\": \"\"\n      }\n    }\n  }\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PATCH /baseUrl/v1/pages/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 92

{
  "properties": {
    "Status": {
      "select": {
        "name": ""
      }
    }
  }
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1/pages/:id")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"properties\": {\n    \"Status\": {\n      \"select\": {\n        \"name\": \"\"\n      }\n    }\n  }\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/pages/:id"))
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"properties\": {\n    \"Status\": {\n      \"select\": {\n        \"name\": \"\"\n      }\n    }\n  }\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"properties\": {\n    \"Status\": {\n      \"select\": {\n        \"name\": \"\"\n      }\n    }\n  }\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/pages/:id")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v1/pages/:id")
  .header("content-type", "application/json")
  .body("{\n  \"properties\": {\n    \"Status\": {\n      \"select\": {\n        \"name\": \"\"\n      }\n    }\n  }\n}")
  .asString();
const data = JSON.stringify({
  properties: {
    Status: {
      select: {
        name: ''
      }
    }
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/v1/pages/:id');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/pages/:id',
  headers: {'content-type': 'application/json'},
  data: {properties: {Status: {select: {name: ''}}}}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/pages/:id';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"properties":{"Status":{"select":{"name":""}}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/pages/:id',
  method: 'PATCH',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "properties": {\n    "Status": {\n      "select": {\n        "name": ""\n      }\n    }\n  }\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"properties\": {\n    \"Status\": {\n      \"select\": {\n        \"name\": \"\"\n      }\n    }\n  }\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/pages/:id")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/pages/:id',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({properties: {Status: {select: {name: ''}}}}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/pages/:id',
  headers: {'content-type': 'application/json'},
  body: {properties: {Status: {select: {name: ''}}}},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/v1/pages/:id');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  properties: {
    Status: {
      select: {
        name: ''
      }
    }
  }
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/pages/:id',
  headers: {'content-type': 'application/json'},
  data: {properties: {Status: {select: {name: ''}}}}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/pages/:id';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"properties":{"Status":{"select":{"name":""}}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"properties": @{ @"Status": @{ @"select": @{ @"name": @"" } } } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/pages/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/pages/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"properties\": {\n    \"Status\": {\n      \"select\": {\n        \"name\": \"\"\n      }\n    }\n  }\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/pages/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'properties' => [
        'Status' => [
                'select' => [
                                'name' => ''
                ]
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/v1/pages/:id', [
  'body' => '{
  "properties": {
    "Status": {
      "select": {
        "name": ""
      }
    }
  }
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/pages/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'properties' => [
    'Status' => [
        'select' => [
                'name' => ''
        ]
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'properties' => [
    'Status' => [
        'select' => [
                'name' => ''
        ]
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1/pages/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/pages/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "properties": {
    "Status": {
      "select": {
        "name": ""
      }
    }
  }
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/pages/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "properties": {
    "Status": {
      "select": {
        "name": ""
      }
    }
  }
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"properties\": {\n    \"Status\": {\n      \"select\": {\n        \"name\": \"\"\n      }\n    }\n  }\n}"

headers = { 'content-type': "application/json" }

conn.request("PATCH", "/baseUrl/v1/pages/:id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/pages/:id"

payload = { "properties": { "Status": { "select": { "name": "" } } } }
headers = {"content-type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/pages/:id"

payload <- "{\n  \"properties\": {\n    \"Status\": {\n      \"select\": {\n        \"name\": \"\"\n      }\n    }\n  }\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/pages/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"properties\": {\n    \"Status\": {\n      \"select\": {\n        \"name\": \"\"\n      }\n    }\n  }\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/v1/pages/:id') do |req|
  req.body = "{\n  \"properties\": {\n    \"Status\": {\n      \"select\": {\n        \"name\": \"\"\n      }\n    }\n  }\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/pages/:id";

    let payload = json!({"properties": json!({"Status": json!({"select": json!({"name": ""})})})});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/v1/pages/:id \
  --header 'content-type: application/json' \
  --data '{
  "properties": {
    "Status": {
      "select": {
        "name": ""
      }
    }
  }
}'
echo '{
  "properties": {
    "Status": {
      "select": {
        "name": ""
      }
    }
  }
}' |  \
  http PATCH {{baseUrl}}/v1/pages/:id \
  content-type:application/json
wget --quiet \
  --method PATCH \
  --header 'content-type: application/json' \
  --body-data '{\n  "properties": {\n    "Status": {\n      "select": {\n        "name": ""\n      }\n    }\n  }\n}' \
  --output-document \
  - {{baseUrl}}/v1/pages/:id
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["properties": ["Status": ["select": ["name": ""]]]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/pages/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "archived": false,
  "created_time": "2021-04-27T20:38:19.437Z",
  "id": "a1712d54-53e4-4893-a69d-4d581cd2c845",
  "last_edited_time": "2021-04-28T23:12:53.160Z",
  "object": "page",
  "parent": {
    "database_id": "8e2c2b76-9e1d-47d2-87b9-ed3035d607ae",
    "type": "database_id"
  },
  "properties": {
    "Author": {
      "id": "qNw_",
      "multi_select": [
        {
          "color": "default",
          "id": "833e2c78-35ed-4601-badc-50c323341d76",
          "name": "Kara Swisher"
        }
      ],
      "type": "multi_select"
    },
    "Link": {
      "id": "VVMi",
      "type": "url",
      "url": "https://www.nytimes.com/2018/10/21/opinion/who-will-teach-silicon-valley-to-be-ethical.html"
    },
    "Name": {
      "id": "title",
      "title": [
        {
          "annotations": {
            "bold": false,
            "code": false,
            "color": "default",
            "italic": false,
            "strikethrough": false,
            "underline": false
          },
          "href": null,
          "plain_text": "Who Will Teach Silicon Valley to Be Ethical? ",
          "text": {
            "content": "Who Will Teach Silicon Valley to Be Ethical? ",
            "link": null
          },
          "type": "text"
        }
      ],
      "type": "title"
    },
    "Publisher": {
      "id": ">$Pb",
      "select": {
        "color": "default",
        "id": "c5ee409a-f307-4176-99ee-6e424fa89afa",
        "name": "NYT"
      },
      "type": "select"
    },
    "Publishing/Release Date": {
      "date": {
        "end": null,
        "start": "2018-10-21"
      },
      "id": "?ex+",
      "type": "date"
    },
    "Read": {
      "checkbox": true,
      "id": "_MWJ",
      "type": "checkbox"
    },
    "Score /5": {
      "id": ")Y7\"",
      "select": {
        "color": "default",
        "id": "b7307e35-c80a-4cb5-bb6b-6054523b394a",
        "name": "⭐️⭐️⭐️⭐️"
      },
      "type": "select"
    },
    "Status": {
      "id": "`zz5",
      "select": {
        "color": "red",
        "id": "5925ba22-0126-4b58-90c7-b8bbb2c3c895",
        "name": "Reading"
      },
      "type": "select"
    },
    "Summary": {
      "id": "?\\25",
      "rich_text": [
        {
          "annotations": {
            "bold": false,
            "code": false,
            "color": "default",
            "italic": false,
            "strikethrough": false,
            "underline": false
          },
          "href": null,
          "plain_text": "Some think chief ethics officers could help technology companies navigate political and social questions.",
          "text": {
            "content": "Some think chief ethics officers could help technology companies navigate political and social questions.",
            "link": null
          },
          "type": "text"
        }
      ],
      "type": "rich_text"
    },
    "Type": {
      "id": "/7eo",
      "select": {
        "color": "default",
        "id": "f96d0d0a-5564-4a20-ab15-5f040d49759e",
        "name": "Article"
      },
      "type": "select"
    }
  }
}
GET Retrieve a user
{{baseUrl}}/v1/users/:id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/users/:id");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/users/:id")
require "http/client"

url = "{{baseUrl}}/v1/users/:id"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/users/:id"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/users/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/users/:id"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/users/:id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/users/:id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/users/:id"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/users/:id")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/users/:id")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/users/:id');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1/users/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/users/:id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/users/:id',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/users/:id")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/users/:id',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/v1/users/:id'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/users/:id');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/v1/users/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/users/:id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/users/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/users/:id" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/users/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/users/:id');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/users/:id');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/users/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/users/:id' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/users/:id' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = ""

conn.request("GET", "/baseUrl/v1/users/:id", payload)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/users/:id"

payload = ""

response = requests.get(url, data=payload)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/users/:id"

payload <- ""

response <- VERB("GET", url, body = payload, content_type(""))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/users/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/users/:id') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/users/:id";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/users/:id
http GET {{baseUrl}}/v1/users/:id
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/users/:id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/users/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "avatar_url": null,
  "id": "6794760a-1f15-45cd-9c65-0dfe42f5135a",
  "name": "Aman Gupta",
  "object": "user",
  "person": {
    "email": "XXXXXXXXXXX"
  },
  "type": "person"
}