{
  "opencollection": "1.0.0",
  "info": {
    "name": "Cloudflare D1 API",
    "version": "4.0.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "D1",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List D1 Databases",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/d1/database",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "name",
                "value": "",
                "type": "query"
              },
              {
                "name": "page",
                "value": "",
                "type": "query"
              },
              {
                "name": "per_page",
                "value": "",
                "type": "query"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Returns a list of D1 databases."
        },
        {
          "info": {
            "name": "Create D1 Database",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/d1/database",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Returns the created D1 database."
        },
        {
          "info": {
            "name": "Get D1 Database",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/d1/database/:database_id",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "database_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "fields",
                "value": "uuid,name,version",
                "type": "query",
                "description": "Comma-separated list of fields to include in the response. When omitted,\nall fields are returned.\n"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Returns the specified D1 database."
        },
        {
          "info": {
            "name": "Update D1 Database",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/d1/database/:database_id",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "database_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Updates the specified D1 database."
        },
        {
          "info": {
            "name": "Update D1 Database partially",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/d1/database/:database_id",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "database_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Updates partially the specified D1 database."
        },
        {
          "info": {
            "name": "Delete D1 Database",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/d1/database/:database_id",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "database_id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Deletes the specified D1 database."
        },
        {
          "info": {
            "name": "Export D1 Database as SQL",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/d1/database/:database_id/export",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "database_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Returns a URL where the SQL contents of your D1 can be downloaded. Note: this process may take\nsome time for larger DBs, during which your D1 will be unavailable to serve queries. To avoid\nblocking your DB unnecessarily, an in-progress export must be continually polled or will automatically cancel.\n"
        },
        {
          "info": {
            "name": "Import SQL into your D1 Database",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/d1/database/:database_id/import",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "database_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Generates a temporary URL for uploading an SQL file to, then instructing the D1 to import it\nand polling it for status updates. Imports block the D1 for their duration.\n"
        },
        {
          "info": {
            "name": "Query D1 Database",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/d1/database/:database_id/query",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "database_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Returns the query result as an object."
        },
        {
          "info": {
            "name": "Raw D1 Database query",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/d1/database/:database_id/raw",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "database_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Returns the query result rows as arrays rather than objects. This is a performance-optimized version of the /query endpoint."
        },
        {
          "info": {
            "name": "Get D1 database bookmark",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/d1/database/:database_id/time_travel/bookmark",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "database_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "timestamp",
                "value": "",
                "type": "query",
                "description": "An optional ISO 8601 timestamp. If provided, returns the nearest available bookmark at or before this timestamp. If omitted, returns the current bookmark."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Retrieves the current bookmark, or the nearest bookmark at or before a provided timestamp.\nBookmarks can be used with the restore endpoint to revert the database to a previous point in time.\n"
        },
        {
          "info": {
            "name": "Restore D1 Database to a bookmark or point in time",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/d1/database/:database_id/time_travel/restore",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "database_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "bookmark",
                "value": "",
                "type": "query",
                "description": "A bookmark to restore the database to. Required if `timestamp` is not provided."
              },
              {
                "name": "timestamp",
                "value": "",
                "type": "query",
                "description": "An ISO 8601 timestamp to restore the database to. Required if `bookmark` is not provided."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Restores a D1 database to a previous point in time either via a bookmark or a timestamp.\n"
        }
      ]
    }
  ],
  "bundled": true
}