build_campaign
Construit une campaign exécutable à partir d'une seule source, test_ids ou test_campaign_id. Lot éphémère de tests, supprimé après l'exécution.
Construit une campaign exécutable (un lot éphémère de tests, supprimé après l'exécution, NON sauvegardé) à partir d'exactement une source : test_ids ou test_campaign_id (pas les deux).
Lecture seule · Appelle des systèmes externes. Appel sûr : cet outil ne modifie pas les données.
Paramètres
| Champ | Type | Requis | Description |
|---|---|---|---|
name | string | Non | Nom optionnel de la campaign |
product | string | Non | Slug du produit (format : operator~product). Requis quand test_ids est utilisé avec "variants". Dérivé automatiquement de la test campaign quand test_campaign_id est utilisé. |
test_campaign_id | number | Non | Identifiant de la test campaign (depuis list_test_campaigns). Exactement un parmi test_ids ou test_campaign_id est requis. Le produit est dérivé automatiquement de la test campaign. |
test_ids | string | Non | Identifiants de tests séparés par des virgules (depuis list_tests). Exactement un parmi test_ids ou test_campaign_id est requis. |
variants | array | Non | Épinglez un variant par groupe de variables. Chaque entrée est "5" (ID numérique de variant) ou "GroupName:VariantName" (ex. "API:Staging"). Répétable. Les variables des groupes non épinglés utilisent le variant par défaut de ce groupe. Les globales émettent toujours {type:"global"}. Le mélange de formes numériques et nominales est autorisé. |
Exemple d'arguments
Arguments illustratifs qu'un agent fournit lors de l'appel de cet outil :
{
"name": "string",
"product": "string"
}
Description
SOURCE: test_ids — build an ad-hoc campaign from explicit test IDs.
SOURCE: test_campaign_id — load a saved Tests campaign and produce the same campaign template (product auto-derived). To create/save a reusable pack instead, use create_test_campaign; building from a Tests campaign never modifies it.
Two distinct concepts — don't confuse them: a "Tests campaign" is the SAVED, named pack you CRUD (see list_test_campaigns); a "campaign" is the throwaway JSON you build here and pass to run_campaign.
The template includes empty variable slots. Use get_test_detail to understand what each test needs, and list_resources to find device identifiers for direct_owners. Pass the template to run_campaign with an overrides map to fill or override values.
Pin variants per group via the variants array — same shape as create_monitor. Globals always emit a "global" bucket; variables in unpinned groups use that group's default variant. IMPORTANT (test_ids source): grouped (variable-group) variables and secrets are emitted with EMPTY values and are NOT auto-bucketed — pin the variant with variants=[…] (use get_test_detail to read each variable's variable_group_id / variant_id), or run_campaign / start_execution will reject the launch as empty + unresolvable. (With test_campaign_id, buckets come from the saved campaign.)
Associés
Et ensuite ?
Last updated on