ay exec (Alias: x)
Führt eine registrierte API-Action aus, identifiziert über operationId. Ruft die apiactions-Registry des Servers ab, um die Action-Definition (Host, Endpoint, Method, Params) aufzulösen, dann der eigentliche HTTP-Call mit dem User-Token.
Syntax
ay exec <operationId> [args] [flags]
Beispiele
# Custom-Action für einen Consumer
ay exec sendWelcomeMail --param consumerId=64a1b2c3
# AI-Generate-Aufruf
ay exec aiGenerate --param prompt="Schreibe eine Willkommens-Email"
# Action ohne Args
ay exec recomputeKpis
# Body via JSON
ay x publishCampaign --body '{"campaignId":"64a1...","scheduledAt":"2026-05-01T10:00:00Z"}'
Auflösungs-Reihenfolge
- CLI fragt
config-api/apiactions?q=<operationId>(für non-Admin User). - Bei 401/403 → Fallback auf
su/apiactions(Superuser-Path). - Exact-Match auf
operationId, sonst Partial-Match (erster Treffer). - Bei keinem Treffer → Exit 1; bei nur 403 in beiden Modulen → Exit 5.
Hinweis
Custom-Actions liegen unter /<collection>/:id/actions/<action-name>. Sub-Resource-GETs (z.B. /:id/logs) sind keine Actions — diese laufen via describe <collection> <id> <subResource>.