Skip to main content
POST
/
enrichment
/
upsert
Upsert enrichment rules
curl --request POST \
  --url 'https://api.flashcat.cloud/enrichment/upsert?app_key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "integration_id": 5001,
  "rules": [
    {
      "kind": "extraction",
      "settings": {
        "source_field": "labels.env",
        "result_label": "environment",
        "pattern": "(?P<result>prod|staging|dev)",
        "override": true
      }
    },
    {
      "kind": "composition",
      "settings": {
        "result_label": "full_env",
        "template": "{{.labels.region}}-{{.labels.environment}}",
        "override": false
      }
    }
  ]
}
'
{
  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
  "data": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.flashcat.cloud/llms.txt

Use this file to discover all available pages before exploring further.

Restrictions

AspectValue
Rate limits1,000 requests/minute; 50 requests/second per account
PermissionsChannels Manage (on-call) or Integrations Manage (on-call)

Usage

  • Enrichment rules are evaluated in order.
  • Each rule has a kind: extraction (regex/gjson extraction), composition (template-based label composition), mapping (lookup via mapping schema or API), or drop (remove labels).
  • The optional if field is an AndFilters condition: if it does not match, the rule is skipped.
  • For kind: extraction: source_field must be title, description, or a labels.* key; specify exactly one of pattern (regex with named group result) or g_json (GJson path).
  • For kind: composition: template uses Go text/template syntax referencing labels.* keys.
  • For kind: mapping: mapping_type is schema (default) or api; provide schema_id or api_id accordingly.
  • For kind: drop: drop_labels lists the label keys to remove.
  • Every call is recorded in the account audit log. Don’t put secrets in request fields.

Authorizations

app_key
string
query
required

App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account.

Body

application/json
integration_id
integer<int64>
required

Integration ID to configure enrichment rules for.

rules
object[]
required

Ordered list of enrichment rules. Replaces all existing rules.

Response

Success

Success response envelope. On every 2xx response, request_id identifies the call (also mirrored in the Flashcat-Request-Id header) and data holds the endpoint-specific payload. Failure responses use a different shape — see ErrorResponse.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

data
object
required

Empty response body. The server returns data: null on success.