## Get a relay `client.MoQ.Relays.Get(ctx, relayID, query) (*RelayGetResponse, error)` **get** `/accounts/{account_id}/moq/relays/{relay_id}` Retrieves a single MoQ relay including config and status. Tokens are NOT included. ### Parameters - `relayID string` - `query RelayGetParams` - `AccountID param.Field[string]` Cloudflare account identifier. ### Returns - `type RelayGetResponse struct{…}` Full relay details (no tokens). - `Config RelayGetResponseConfig` - `Upstreams RelayGetResponseConfigUpstreams` Upstreams are external MOQT server publishers that a relay falls back to when it has no local publisher for a requested namespace/track. - `Enabled bool` - `Upstreams []RelayGetResponseConfigUpstreamsUpstream` Ordered list of upstream MOQT server publishers. Each entry is an object (not a bare string) so per-upstream configuration can be added in the future without another breaking change. - `URL string` Upstream MOQT server publisher URL. - `Created Time` - `Modified Time` - `Name string` - `UID string` - `Status RelayGetResponseStatus` "connected" when active, omitted otherwise. - `const RelayGetResponseStatusConnected RelayGetResponseStatus = "connected"` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/moq" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) relay, err := client.MoQ.Relays.Get( context.TODO(), "a1b2c3d4e5f67890a1b2c3d4e5f67890", moq.RelayGetParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", relay.UID) } ``` #### Response ```json { "errors": [ { "code": 0, "message": "message" } ], "messages": [ { "code": 0, "message": "message" } ], "success": true, "result": { "config": { "upstreams": { "enabled": true, "upstreams": [ { "url": "url" } ] } }, "created": "2019-12-27T18:11:19.117Z", "modified": "2019-12-27T18:11:19.117Z", "name": "Production Live Stream", "uid": "a1b2c3d4e5f67890a1b2c3d4e5f67890", "status": "connected" } } ```