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
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:
@@ -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}
|
||||
)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user