SDKs
Go
Use riptide.dev/clients/go/admin to call the Admin API from Go. The SDK provides typed operations, retries, timeouts, idempotency keys, structured errors, and helpers for paginated lists.
Install and call
Use the Admin SDK when a Go service needs to manage Riptide configuration, such as creating a publisher during customer onboarding. This example creates one publisher and collects the tenant's publisher list across pages. Use a sandbox tenant, its control-plane URL, and an API key with the required supply permissions.
go get riptide.dev/clients/go/admin
cl, err := admin.New("https://app.acme.example", admin.WithAPIKey(os.Getenv("RIPTIDE_API_KEY")))
resp, err := cl.CreatePublisherWithResponse(ctx, tenantID, &adminv1.CreatePublisherParams{},
adminv1.PublisherCreate{PublicId: "acme-pub", Name: "Acme"})
if err != nil { return err } // transport, after retries
if e := admin.ErrorOf(resp.StatusCode(), resp.Body); e != nil { // typed envelope
return fmt.Errorf("%s (code=%s hint=%s)", e, e.Code, e.Hint)
}
pubs, err := admin.Collect(ctx, func(ctx context.Context, cursor *string) ([]adminv1.Publisher, *string, error) {
r, err := cl.ListPublishersWithResponse(ctx, tenantID, &adminv1.ListPublishersParams{Cursor: cursor})
if err != nil { return nil, nil, err }
if e := admin.ErrorOf(r.StatusCode(), r.Body); e != nil { return nil, nil, e }
return r.JSON200.Items, r.JSON200.NextCursor, nil
})
Mutating calls send an Idempotency-Key header. The SDK generates a key unless
you supply one in the operation parameters, and reuses it on retries of that request.
Options: WithAPIKey, WithBearer, WithTimeout (30 s per attempt),
WithRetryPolicy (four attempts, 250 ms base, 5 s cap, full jitter; Retry-After
wins and is capped), WithIdempotencyKeys (a UUID per mutating call unless the params carry
one; nil disables), WithHTTPClient, and WithRequestEditorFn.
Related clients
The riptide CLI uses this SDK. To request ads through the Decision
API, use riptide.dev/clients/go/decision.
Check an ad from the command line
Follow the CLI walkthrough to load sample inventory and inspect a VAST response. For ad requests from your own Go application, use the Decision API guide.