## Get logs RayIDs `client.Logs.RayID.Get(ctx, RayID, params) (*unknown, error)` **get** `/zones/{zone_id}/logs/rayids/{ray_id}` The `/rayids` api route allows lookups by specific rayid. The rayids route will return zero, one, or more records (ray ids are not unique). ### Parameters - `RayID string` Ray identifier. - `params RayIDGetParams` - `ZoneID param.Field[string]` Path param: Identifier. - `Fields param.Field[string]` Query param: The `/received` route by default returns a limited set of fields, and allows customers to override the default field set by specifying individual fields. The reasons for this are: 1. Most customers require only a small subset of fields, but that subset varies from customer to customer; 2. Flat schema is much easier to work with downstream (importing into BigTable etc); 3. Performance (time to process, file size). If `?fields=` is not specified, default field set is returned. This default field set may change at any time. When `?fields=` is provided, each record is returned with the specified fields. `fields` must be specified as a comma separated list without any whitespaces, and all fields must exist. The order in which fields are specified does not matter, and the order of fields in the response is not specified. - `Timestamps param.Field[RayIDGetParamsTimestamps]` Query param: By default, timestamps in responses are returned as Unix nanosecond integers. The `?timestamps=` argument can be set to change the format in which response timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns timestamps as strings. - `const RayIDGetParamsTimestampsUnix RayIDGetParamsTimestamps = "unix"` - `const RayIDGetParamsTimestampsUnixnano RayIDGetParamsTimestamps = "unixnano"` - `const RayIDGetParamsTimestampsRfc3339 RayIDGetParamsTimestamps = "rfc3339"` ### Returns - `type RayIDGetResponse interface{…}` - `unknown` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/logs" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) RayID, err := client.Logs.RayID.Get( context.TODO(), "41ddf1740f67442d", logs.RayIDGetParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", RayID) } ``` #### Response ```json "{\"ClientIP\":\"192.0.2.1\",\"RayID\":\"41ddf1740f67442d\",\"EdgeStartTimestamp\":1526810289280000000}\n{\"ClientIP\":\"192.0.2.1\",\"RayID\":\"41ddf1740f67442d\",\"EdgeStartTimestamp\":1526810289280000000}\n{\"ClientIP\":\"192.0.2.1\",\"RayID\":\"41ddf1740f67442d\",\"EdgeStartTimestamp\":1526810289280000000}" ```