## Get D1 Database `client.D1.Database.Get(ctx, databaseID, query) (*D1, error)` **get** `/accounts/{account_id}/d1/database/{database_id}` Returns the specified D1 database. ### Parameters - `databaseID string` D1 database identifier (UUID). - `query DatabaseGetParams` - `AccountID param.Field[string]` Account identifier tag. ### Returns - `type D1 struct{…}` The details of the D1 database. - `CreatedAt Time` Specifies the timestamp the resource was created as an ISO8601 string. - `FileSize float64` The D1 database's size, in bytes. - `Jurisdiction D1Jurisdiction` Specify the location to restrict the D1 database to run and store data. If this option is present, the location hint is ignored. - `const D1JurisdictionEu D1Jurisdiction = "eu"` - `const D1JurisdictionFedramp D1Jurisdiction = "fedramp"` - `Name string` D1 database name. - `NumTables float64` - `ReadReplication D1ReadReplication` Configuration for D1 read replication. - `Mode D1ReadReplicationMode` The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted). - `const D1ReadReplicationModeAuto D1ReadReplicationMode = "auto"` - `const D1ReadReplicationModeDisabled D1ReadReplicationMode = "disabled"` - `UUID string` D1 database identifier (UUID). - `Version string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/d1" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) d1, err := client.D1.Database.Get( context.TODO(), "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", d1.DatabaseGetParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", d1.UUID) } ``` #### Response ```json { "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 } ```