PgBeam
PgBeam Docs
Honeytokens

GetHoneytoken

Get a honeytoken

Returns a single honeytoken by ID.

Usage

result, err := client.Honeytokens.GetHoneytoken(ctx, "prj_xxx", "hnt_xxx")

Parameters

ParameterTypeRequiredDescription
ctxcontext.ContextYesRequest context
projectIDstringYesUnique project identifier (prefixed, e.g. prj_xxx).
honeytokenIDstringYesUnique honeytoken identifier (prefixed, e.g. hnt_xxx).

Response

(*pgbeam.Honeytoken, error): the honeytoken.

Example

import pgbeam "go.pgbeam.com/sdk"

client := pgbeam.NewClient(&pgbeam.ClientOptions{
  APIKey: "pgb_your_api_key",
})

result, err := client.Honeytokens.GetHoneytoken(ctx, "prj_xxx", "hnt_xxx")
if err != nil {
  log.Fatal(err)
}
fmt.Println(result)

Errors

StatusDescription
400Invalid request parameters.
401Missing or invalid authentication.
403Operation not allowed by current plan limits.
404Resource not found.

On this page