(Analytics)
package main
import(
"context"
unkeygo "github.com/unkeyed/unkey-go"
"github.com/unkeyed/unkey-go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := unkeygo.New(
unkeygo.WithSecurity("UNKEY_ROOT_KEY"),
)
res, err := s.Analytics.GetVerifications(ctx, operations.GetVerificationsRequest{
APIID: "<id>",
KeyID: unkeygo.Pointer(operations.CreateKeyIDArrayOfStr(
[]string{
"key_1234",
},
)),
Tag: unkeygo.Pointer(operations.CreateTagArrayOfStr(
[]string{
"key_1234",
},
)),
Start: unkeygo.Int64(1620000000000),
})
if err != nil {
log.Fatal(err)
}
if res.ResponseBodies != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetVerificationsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetVerificationsResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.ErrBadRequest | 400 | application/json |
sdkerrors.ErrUnauthorized | 401 | application/json |
sdkerrors.ErrForbidden | 403 | application/json |
sdkerrors.ErrNotFound | 404 | application/json |
sdkerrors.ErrConflict | 409 | application/json |
sdkerrors.ErrTooManyRequests | 429 | application/json |
sdkerrors.ErrInternalServerError | 500 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |