Honeytokens
Create a honeytoken within a context
This endpoint allows you to create a honeytoken of a given type within a context. The context is a realistic file in which your honeytoken is inserted.
If language, project_extensions and filename are not provided, a random context will be generated.
post/v1/honeytokens/with-context
Request body
Example request
{
"name": "honeytoken name",
"description": "This honeytoken was placed in the repository test",
"type": "AWS",
"custom_tags": [
{
"id": "d45a123f-b15d-4fea-abf6-ff2a8479de5b",
"key": "env",
"value": "prod"
}
],
"language": "python",
"filename": "test_config.py",
"project_extensions": [
".c",
".h"
]
}Response
Honeytoken within a context created
Example response
{
"filepath": "config_prod.py",
"language": "python",
"suggested_commit_message": "adding test config",
"honeytoken_id": "d45a123f-b15d-4fea-abf6-ff2a8479de5b",
"gitguardian_url": "https://dashboard.gitguardian.com/workspace/1/honeytokens/948025a2-6969-493c-8696-3849c1e9f769"
}