Key points
allowed_callersnames explicituser,service_account, orauth_teamcallers.variable_mappingpulls run variables fromevent_type,payload.<path>,variables.<name>, a direct payload path, orliteral:<value>.payload_schemaguards required fields and basic property types before a run starts.rate_limit.per_minutecaps invocations over the previous minute.idempotency_keyon the request is scoped by trigger and caller, so a retry returns the original run.
Field reference
nameexternal triggerstringRequiredNone
Trigger name used in the API path and the UI registry.
name: deploy-from-servicenowservices/nopsai/external_triggers_gitops.go
pipelineexternal triggerstringRequiredNone
Pipeline started when the trigger is invoked.
pipeline: platform/deploy-serviceservices/nopsai/external_triggers_gitops.go
enabledexternal triggerbooleanOptionaltrue
Whether invocations are accepted. Disabled triggers reject calls without starting a run.
enabled: truescopeexternal triggerstringOptionalDefault runtime scope
Runtime scope used to resolve variables and secrets for triggered runs.
scope: platform/productionrun_team_pathexternal triggerstringOptionalglobal
Team path applied to the resulting Pipeline Run for ownership and notifications.
run_team_path: platform/paymentsallowed_callersexternal triggerobject[]OptionalNone
Explicit callers permitted to invoke the trigger.
allowed_callers:
- service_account: release-bot
- auth_team: platform/sreuser, service_account, auth_team
An empty list does not widen access; AAA still authorizes the caller against the trigger resource.
services/nopsai/external_triggers_gitops.go
variable_mappingexternal triggermap<string,string>OptionalNone
Maps invocation data into run variables. Sources are event_type, payload.<path>, variables.<name>, a direct payload path, or literal:<value>.
variable_mapping:
SERVICE: payload.service.name
ENVIRONMENT: literal:productionservices/nopsai/external_triggers_gitops.go
payload_schemaexternal triggerobjectOptionalNone
Object-schema guard with required fields and basic property type checks applied before a run starts.
payload_schema:
type: object
required: [service]
properties:
service:
type: stringservices/nopsai/external_triggers_gitops.go
rate_limit.per_minuteexternal triggerintegerOptionalNone
Maximum invocations accepted for this trigger over the previous minute.
rate_limit:
per_minute: 30services/nopsai/external_triggers_gitops.go
idempotency_keyinvoke requeststringOptionalNone
Retry key sent on the invoke request. Scoped by trigger and caller so a repeated call returns the original run instead of starting a second one.
{"idempotency_key": "change-4821"}services/nopsai/external_triggers.go
Examples
name: deploy-from-change-request
pipeline: platform/deploy-service
enabled: true
scope: platform/production
run_team_path: platform/payments
allowed_callers:
- service_account: change-management
payload_schema:
type: object
required: [service, change_id]
properties:
service: { type: string }
change_id: { type: string }
variable_mapping:
SERVICE: payload.service
CHANGE_ID: payload.change_id
ENVIRONMENT: literal:production
rate_limit:
per_minute: 10curl -sX POST "$NOPSAI_URL/v1/external-triggers/$TRIGGER_ID/invoke" \
-H "Authorization: Bearer $NOPSAI_TOKEN" \
-H "Content-Type: application/json" \
-d '{"idempotency_key":"change-4821","payload":{"service":"payments","change_id":"4821"}}'How it works
An empty allowed_callers list does not widen access. AAA still authorizes the caller against the trigger resource, so the list narrows an already-authorized set rather than granting anything.
Invocation history is available per trigger, which is usually the fastest way to diagnose a caller that believes it is triggering runs but is being rejected.
Implementation evidence
services/nopsai/external_triggers_gitops.goExternal trigger GitOps document schema.
services/nopsai/external_triggers.goInvocation, idempotency, and rate-limit handling.

