| [ Web Proxy ] |
| Viewing: https://developers.cloudflare.com/api/resources/d1/subresources/database/methods/update | [Back] [Original] |
Updates the specified D1 database.
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYYThe previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
X-Auth-Email: user@example.comThe previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194D1 WriteThe details of the D1 database.
Specifies the timestamp the resource was created as an ISO8601 string.
Specify the location to restrict the D1 database to run and store data. If this option is present, the location hint is ignored.
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/d1/database/$DATABASE_ID \
-X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"read_replication": {
"mode": "auto"
}
}'{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"created_at": "2022-11-15T18:25:44.442097Z",
"file_size": 12,
"jurisdiction": "eu",
"name": "my-database",
"num_tables": 12,
"read_replication": {
"mode": "auto"
},
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"version": "production"
},
"success": true
}{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"created_at": "2022-11-15T18:25:44.442097Z",
"file_size": 12,
"jurisdiction": "eu",
"name": "my-database",
"num_tables": 12,
"read_replication": {
"mode": "auto"
},
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"version": "production"
},
"success": true
}| Web Proxy Viewer | New URL | Original Page |