(日本語版)Notion API - Public Beta
  1. データベース
(日本語版)Notion API - Public Beta
  • 概要
  • インテグレーション機能
  • リクエスト制限
  • ステータス コード
  • ブロック
  • ユーザー
  • コメント
  • リンク プレビューのUnfurl属性オブジェクト
  • バージョン変更
    • バージョニング
    • バージョンによる変更
  • ページ
    • ページ
    • ページのプロパティ
  • データベース
    • データベース
    • データベースのプロパティ
  • その他
    • 絵文字オブジェクト
    • ファイルオブジェクト
    • 親オブジェクト
    • リッチテキストオブジェクト
  • エンドポイント
    • 認証
      • 認証
      • Tokenを作成
    • ブロック
      • ブロックを取得
      • ブロックを更新
      • ブロックの子を取得
      • ブロックの子を追加
      • ブロックを削除
    • データベース
      • データベース エントリのフィルタ
      • データベース エントリの並べ替え
      • データベースのプロパティを更新する
      • データベースを作成
        POST
      • データベースを取得
        GET
      • データベースを更新
        PATCH
      • データベースにクエリを実行
        POST
    • ユーザー
      • 全てユーザーのリストを取得
      • トークンのボットユーザーを取得
      • ユーザーを取得
    • ページ
      • ページをアーカイブ
      • ページを作成
      • ページを取得
      • ページプロパティアイテムを取得
      • ページプロパティを更新
    • コメント
      • コメントを作成
      • コメントを取得
    • 検索
      • タイトルで検索
  1. データベース

データベースを更新

PATCH
/v1/databases/{database_id}
データベースを更新します。
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://api.notion.com/v1/databases/' \
--header 'Notion-Version;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "properties": {
        "Wine Pairing": {
            "rich_text": {}
        }
    },
    "title": [
        {
            "text": {
                "content": "Ever Better Reading List Title"
            }
        }
    ]
}'
Response Response Example
200 - 200 Success - Update a database
{
  "object": "database",
  "id": "668d797c-76fa-4934-9b05-ad288df2d136",
  "created_time": "2020-03-17T19:10:00.000Z",
  "last_edited_time": "2021-08-11T17:26:00.000Z",
  "parent": {
    "type": "page_id",
    "page_id": "48f8fee9-cd79-4180-bc2f-ec0398253067"
  },  
  "icon": {
    "type": "emoji",
    "emoji": "📝"
 	},
  "cover": {
  	"type": "external",
    "external": {
    	"url": "https://website.domain/images/image.png"
    }
  },
  "url": "https://www.notion.so/668d797c76fa49349b05ad288df2d136",
  "title": [
    {
      "type": "text",
      "text": {
        "content": "Today'\''s grocery list",
        "link": null
      },
      "annotations": {
        "bold": false,
        "italic": false,
        "strikethrough": false,
        "underline": false,
        "code": false,
        "color": "default"
      },
      "plain_text": "Today'\''s grocery list",
      "href": null
    }
  ],
  "description": [
    {
      "type": "text",
      "text": {
        "content": "Grocery list for just kale 🥬",
        "link": null
      },
      "annotations": {
        "bold": false,
        "italic": false,
        "strikethrough": false,
        "underline": false,
        "code": false,
        "color": "default"
      },
      "plain_text": "Grocery list for just kale 🥬",
      "href": null
    }
  ],
  "properties": {
    "Name": {
      "id": "title",
			"name": "Name",
      "type": "title",
      "title": {}
    },
    "Description": {
      "id": "J@cS",
			"name": "Description",
      "type": "rich_text",
      "rich_text": {}
    },
    "In stock": {
      "id": "{xY`",
			"name": "In stock",
      "type": "checkbox",
      "checkbox": {}
    },
    "Food group": {
      "id": "TJmr",
			"name": "Food group",
      "type": "select",
      "select": {
        "options": [
          {
            "id": "96eb622f-4b88-4283-919d-ece2fbed3841",
            "name": "🥦Vegetable",
            "color": "green"
          },
          {
            "id": "bb443819-81dc-46fb-882d-ebee6e22c432",
            "name": "🍎Fruit",
            "color": "red"
          },
          {
            "id": "7da9d1b9-8685-472e-9da3-3af57bdb221e",
            "name": "💪Protein",
            "color": "yellow"
          }
        ]
      }
    },
    "Price": {
      "id": "cU^N",
			"name": "Price",
      "type": "number",
      "number": {
        "format": "dollar"
      }
    },
    "Cost of next trip": {
      "id": "p:sC",
			"name": "Cost of next trip",
      "type": "formula",
      "formula": {
        "value": "if(prop(\"In stock\"), 0, prop(\"Price\"))"
      }
    },
    "Last ordered": {
      "id": "]\\R[",
			"name": "Last ordered",
      "type": "date",
      "date": {}
    },
    "Meals": {
			"id": "gqk%60",
            "name": "Meals",
      "type": "relation",
      "relation": {
        "database": "668d797c-76fa-4934-9b05-ad288df2d136",
        "synced_property_name": null
      }
    },
    "Number of meals": {
      "id": "Z\\Eh",
			"name": "Number of meals",
      "type": "rollup",
      "rollup": {
        "rollup_property_name": "Name",
        "relation_property_name": "Meals",
        "rollup_property_id": "title",
        "relation_property_id": "mxp^",
        "function": "count"
      }
    },
    "Store availability": {
			"id": "G%7Dji",
      "name": "Store availability",
      "type": "multi_select",
      "multi_select": {
        "options": [
          [
            {
              "id": "d209b920-212c-4040-9d4a-bdf349dd8b2a",
              "name": "Duc Loi Market",
              "color": "blue"
            },
            {
              "id": "70104074-0f91-467b-9787-00d59e6e1e41",
              "name": "Rainbow Grocery",
              "color": "gray"
            },
            {
              "id": "6c3867c5-d542-4f84-b6e9-a420c43094e7",
              "name": "Gus's Community Market",
              "color": "yellow"
            },
            {
							"id": "a62fbb5f-fed4-44a4-8cac-cba5f518c1a1",
              "name": "The Good Life Grocery",
              "color": "orange"
           }
          ]
        ]
      }
    }
    "Photo": {
      "id": "aTIT",
			"name": "Photo",
      "type": "url",
      "url": {}
    }
  },
  "is_inline": false
}

Requestパラメータ

Pathパラメータ

Headerパラメータ

Request Bodyパラメータapplication/json

Examples

Response

🟢200成功例
application/json
Body

🟠400不正なRequest
🟠404レコードが存在しない
🟠429レート制限
更新日時 2023-04-28 09:50:32
前へ
データベースを取得
次へ
データベースにクエリを実行
Built with