Honeytokens
DeleteHoneytoken
Delete a honeytoken
Removes a honeytoken from the project.
Usage
err := client.Honeytokens.DeleteHoneytoken(ctx, "prj_xxx", "hnt_xxx")Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ctx | context.Context | Yes | Request context |
| projectID | string | Yes | Unique project identifier (prefixed, e.g. prj_xxx). |
| honeytokenID | string | Yes | Unique honeytoken identifier (prefixed, e.g. hnt_xxx). |
Response
error: returns nil on success.
Example
import pgbeam "go.pgbeam.com/sdk"
client := pgbeam.NewClient(&pgbeam.ClientOptions{
APIKey: "pgb_your_api_key",
})
err := client.Honeytokens.DeleteHoneytoken(ctx, "prj_xxx", "hnt_xxx")
if err != nil {
log.Fatal(err)
}Errors
| Status | Description |
|---|---|
| 400 | Invalid request parameters. |
| 401 | Missing or invalid authentication. |
| 403 | Operation not allowed by current plan limits. |
| 404 | Resource not found. |