Auto-Tagging
ZopNight predicts environment tags (prod, staging, dev) and a noStop flag for resources that are missing them. Predictions come from name patterns, existing tags, topology, and resource characteristics — not from an LLM — so they are reproducible and cheap to re-run.
How predictions work
- Discoverer emits a resource event with name, tags, parent, and type.
- Recommender evaluates deterministic rules (e.g. name contains
prod-, or parent EKS cluster is already tagged). - Each prediction carries a
confidencescore (1–100) and areasonstring. - Predictions are never auto-applied — you accept or reject them.
Accepted predictions are merged with cloud tags when computing Showback, so a resource can be attributed to a team or tag key even when the cloud account owner hasn't tagged it yet.
List Suggestions
GET
/autotaggingList open auto-tagging suggestions with filters.
Query Parameters
| Parameter | Description |
|---|---|
provider | Filter by cloud provider (aws, gcp, azure) |
resource_type | Filter by resource type |
status | open, accepted, rejected (default: open) |
min_confidence | Only return suggestions with confidence >= this value |
search | Search by resource name or UID |
page | Page number (default: 1) |
limit | Items per page (default: 20) |
Responsejson
{
"data": {
"items": [
{
"id": "tag_001",
"resourceUID": "i-0abc123def456",
"resourceName": "prod-api-server",
"resourceType": "aws-ec2",
"provider": "aws",
"predictedEnv": "prod",
"predictedNoStop": true,
"confidence": 92,
"reason": "Name contains 'prod', has production cluster parent, runs 24/7",
"status": "open",
"createdAt": "2026-04-20T08:00:00Z"
}
],
"total": 15,
"page": 1,
"limit": 20
}
}Count Suggestions
GET
/autotagging/countTotal open suggestions for the org. Accepts the same filters as the list endpoint and is used to render the badge on the Auto-Tagging nav entry.
Responsejson
{
"data": {
"open": 15,
"accepted": 84,
"rejected": 12
}
}Accept or Reject
PATCH
/autotagging/{resourceUID}Unified accept/reject endpoint. Pass the final verdict as status.
Request — Acceptbash
curl -X PATCH https://zopnight.com/api/autotagging/i-0abc123def456 \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"status": "accepted",
"env": "prod",
"noStop": true
}'Request — Rejectbash
curl -X PATCH https://zopnight.com/api/autotagging/i-0abc123def456 \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ "status": "rejected" }'Legacy endpoints
POST /autotagging/accept and POST /autotagging/reject still work but are deprecated. Target removal: 2026-07-01. Please move to the PATCH endpoint.Confidence Buckets
| Bucket | Range | Guidance |
|---|---|---|
| High | 80–100 | Safe to accept in bulk — the signal is strong (name + parent + existing tags agree) |
| Medium | 50–79 | Review individually — a single signal drove the prediction |
| Low | < 50 | Not shown in the UI by default; exposed only via min_confidence=0 |