refactor: update CLI commands to use /v1 API versioning prefix
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
CLI Tests / test-cli (push) Has been cancelled

- Changed monitor.py job endpoints from /jobs to /v1/jobs
- Changed monitor.py miner endpoints from /miners to /v1/miners
- Changed operations.py agent discovery from /agents/discover to /v1/agents/discover
- Changed system.py agent endpoints from /agents/* to /v1/agents/*
- Updated agent status, registration, discovery, and retrieval endpoints
- Aligns CLI with coordinator-api versioning structure for business logic endpoints
This commit is contained in:
aitbc
2026-05-19 11:42:17 +02:00
parent d6727be43f
commit 00bd0e5e5e
3 changed files with 8 additions and 8 deletions

View File

@@ -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}
)

View File

@@ -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()