01Run it
Straight from the command's own help.
p202 system traffic-source-owners repair 12 --all <all>p202 system traffic-source-owners repair 12 --to-user-id 3 --all <all>p202 system traffic-source-owners repair <ppc_network_id> --all --force02What you get
--json, --csv or --ndjson for scripts, or -q for ids only. An AI agent gets compact JSON without asking. All output formats03Build your command
Pick values and the command line writes itself, quoted and ready to paste.
p202 system traffic-source-owners repairSet flags below; the command updates as you type.
04Flags
3 flags, plus the global flags every command takes.
| Flag | What it does |
|---|---|
| --allboolrequired | Move every source the report names a user for |
| --force, -fbool | Move it without asking |
| --to-user-idstring | Move it to this user, one whose traffic source accounts name it |
05How it works
Moves the source to the user show names under repair_to; --to-user-id moves it to another user
whose accounts name it, the only way to move an ambiguous source. --all moves every source the
report names a user for, and leaves the ambiguous ones. It reads the report first, says what it
would move and asks (--force skips the question); one changed since is left (skipped: changed).
Only the source's user changes. Its accounts' clicks are queued for the cron job's report rollup.
Each move is logged on the server. Cannot be staged.
Needs an Admin or Super user key whose role has access_to_settings (as Account › Settings asks), whose user may act on both users (Account › Users' rule), and system:write.
06For agents
Running this from an agent
- Read the same facts as JSON:
p202 commands system traffic-source-owners repair --json. - With
AI_AGENT,CLAUDECODEor another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with ahint. - Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure, 6 no Pro licence on the install.
{
"path": "p202 system traffic-source-owners repair",
"use": "repair <ppc_network_id> | --all",
"short": "Move a traffic source back to the user whose traffic source accounts name it (asks first)",
"long": "Moves the source to the user `show` names under repair_to; --to-user-id moves it to another user\nwhose accounts name it, the only way to move an ambiguous source. --all moves every source the\nreport names a user for, and leaves the ambiguous ones. It reads the report first, says what it\nwould move and asks (--force skips the question); one changed since is left (skipped: changed).\nOnly the source's user changes. Its accounts' clicks are queued for the cron job's report rollup.\nEach move is logged on the server. Cannot be staged.\n\nNeeds an Admin or Super user key whose role has access_to_settings (as Account › Settings asks), whose user may act on both users (Account › Users' rule), and system:write.",
"runnable": true,
"example": "p202 system traffic-source-owners repair 12\n p202 system traffic-source-owners repair 12 --to-user-id 3\n p202 system traffic-source-owners repair --all --force",
"flags": [
{
"name": "all",
"type": "bool",
"default": "false",
"usage": "Move every source the report names a user for",
"required": false
},
{
"name": "force",
"shorthand": "f",
"type": "bool",
"default": "false",
"usage": "Move it without asking",
"required": false
},
{
"name": "to-user-id",
"type": "string",
"default": "",
"usage": "Move it to this user, one whose traffic source accounts name it",
"required": false
}
]
}