diff --git a/cli/aitbc_cli/commands/monitor.py b/cli/aitbc_cli/commands/monitor.py index 454bc291..ac43181a 100755 --- a/cli/aitbc_cli/commands/monitor.py +++ b/cli/aitbc_cli/commands/monitor.py @@ -128,7 +128,7 @@ def metrics(ctx, period: str, export_path: Optional[str]): # Job metrics try: resp = http_client.get( - f"{config.coordinator_url}/jobs", + f"{config.coordinator_url}/v1/jobs", headers={"X-Api-Key": config.api_key or ""}, params={"limit": 100} ) @@ -147,7 +147,7 @@ def metrics(ctx, period: str, export_path: Optional[str]): # Miner metrics try: resp = http_client.get( - f"{config.coordinator_url}/miners", + f"{config.coordinator_url}/v1/miners", headers={"X-Api-Key": config.api_key or ""} ) if resp.status_code == 200: @@ -273,7 +273,7 @@ def history(ctx, period: str): http_client = AITBCHTTPClient(base_url=config.exchange_service_url, timeout=10) try: resp = http_client.get( - f"{config.coordinator_url}/jobs", + f"{config.coordinator_url}/v1/jobs", headers={"X-Api-Key": config.api_key or ""}, params={"limit": 500} ) diff --git a/cli/aitbc_cli/commands/operations.py b/cli/aitbc_cli/commands/operations.py index 44a91637..b602e60d 100644 --- a/cli/aitbc_cli/commands/operations.py +++ b/cli/aitbc_cli/commands/operations.py @@ -247,7 +247,7 @@ def list(status: Optional[str], format: str): if status: query["status"] = status - response = requests.post(f"{coordinator_url}/agents/discover", json=query, timeout=10) + response = requests.post(f"{coordinator_url}/v1/agents/discover", json=query, timeout=10) if response.status_code == 200: data = response.json() diff --git a/cli/handlers/system.py b/cli/handlers/system.py index 4ec355b0..db583538 100644 --- a/cli/handlers/system.py +++ b/cli/handlers/system.py @@ -148,7 +148,7 @@ def handle_agent_sdk_action(args, render_mapping): try: import requests response = requests.put( - f"{coordinator_url}/agents/{agent_id}/status", + f"{coordinator_url}/v1/agents/{agent_id}/status", json=status_update_request, timeout=30 ) @@ -189,7 +189,7 @@ def handle_agent_sdk_action(args, render_mapping): try: import requests response = requests.post( - f"{coordinator_url}/agents/register", + f"{coordinator_url}/v1/agents/register", json=registration_request, timeout=30 ) @@ -223,7 +223,7 @@ def handle_agent_sdk_action(args, render_mapping): try: import requests response = requests.post( - f"{coordinator_url}/agents/discover", + f"{coordinator_url}/v1/agents/discover", json=query, timeout=30 ) @@ -249,7 +249,7 @@ def handle_agent_sdk_action(args, render_mapping): try: import requests response = requests.get( - f"{coordinator_url}/agents/{agent_id}", + f"{coordinator_url}/v1/agents/{agent_id}", timeout=30 )