Aller au contenu

🔗 Endpoints API Arkalia-LUNA Pro

🎯 Vue d'ensemble

Cette page documente tous les endpoints API disponibles dans Arkalia-LUNA Pro v2.8.0.


🌐 API Principale (Helloria)

Base URL

http://localhost:8000

Endpoints Principaux

GET / - Page d'accueil

GET /

Description : Page d'accueil de l'API Réponse : HTML de la page d'accueil

GET /health - Health Check

GET /health

Description : Vérification de l'état de santé Réponse :

{
  "status": "healthy",
  "timestamp": "2025-06-30T21:10:00Z",
  "version": "2.8.1"
}

GET /status - Statut détaillé

GET /status

Description : Statut détaillé de tous les modules Réponse :

{
  "overall_status": "good",
  "components": {
    "arkalia_api (port 8000)": "healthy",
    "zeroia": "healthy",
    "reflexia": "healthy",
    "sandozia": "healthy",
    "cognitive_reactor": "healthy",
    "assistantia": "healthy"
  },
  "metrics": {
    "total_requests": 1234,
    "active_connections": 5,
    "uptime": "2d 5h 30m"
  }
}

GET /metrics - Métriques Prometheus

GET /metrics

Description : Métriques au format Prometheus Réponse : Métriques au format Prometheus


🧠 ZeroIA - Moteur de Décision Autonome

Base URL

http://localhost:8000

Endpoints

POST /api/v1/chat - Interface de chat avec l'IA

Endpoint : POST /api/v1/chat

Description : Interface de chat avec l'IA pour la prise de décision et l'assistance

Port : 8001 (AssistantIA)

GET /patterns - Patterns comportementaux

GET /patterns

Réponse :

{
  "patterns": [
    {
      "id": "pattern_1",
      "name": "High CPU Usage",
      "confidence": 0.9,
      "last_seen": "2025-06-30T21:10:00Z"
    }
  ]
}

👁️ Reflexia - Observateur Cognitif

Base URL

http://localhost:8002

Endpoints

GET /monitor - Monitoring système

GET /monitor

Réponse :

{
  "system": {
    "cpu_usage": 45.2,
    "memory_usage": 67.8,
    "disk_usage": 23.1,
    "network_io": {
      "bytes_sent": 1024000,
      "bytes_recv": 2048000
    }
  },
  "timestamp": "2025-06-30T21:10:00Z"
}

GET /observations - Observations cognitives

GET /observations

Réponse :

{
  "observations": [
    {
      "id": "obs_1",
      "type": "anomaly",
      "severity": "medium",
      "description": "Unusual CPU pattern detected",
      "timestamp": "2025-06-30T21:10:00Z"
    }
  ]
}

🔍 Sandozia - Intelligence Croisée

Base URL

http://localhost:8003

Endpoints

POST /analyze - Analyse croisée

POST /analyze
Content-Type: application/json

{
  "data": "string",
  "context": "string",
  "analysis_type": "pattern"
}

Réponse :

{
  "analysis": {
    "result": "string",
    "confidence": 0.85,
    "patterns_found": 3,
    "recommendations": ["rec1", "rec2"]
  },
  "timestamp": "2025-06-30T21:10:00Z"
}

🤖 AssistantIA - Assistant IA

Base URL

http://localhost:8001

Endpoints

POST /api/v1/chat - Conversation IA

POST /api/v1/chat
Content-Type: application/json

{
  "message": "string",
  "context": "string",
  "user_id": "string"
}

Réponse :

{
  "response": "string",
  "confidence": 0.9,
  "suggestions": ["suggestion1", "suggestion2"],
  "timestamp": "2025-06-30T21:10:00Z"
}

POST /api/v1/validate - Validation de prompt

POST /api/v1/validate
Content-Type: application/json

{
  "prompt": "string",
  "user_id": "string"
}

Réponse :

{
  "valid": true,
  "risk_level": "low",
  "warnings": [],
  "timestamp": "2025-06-30T21:10:00Z"
}

📊 Monitoring - Métriques

Prometheus

http://localhost:9090/metrics

Grafana

http://localhost:3000

AlertManager

http://localhost:9093

Loki (Logs)

http://localhost:3100

🔒 Sécurité

Authentification

Tous les endpoints sensibles nécessitent une authentification via header :

Authorization: Bearer <token>

Rate Limiting

  • Limite : 1000 requêtes par minute par IP
  • Headers : X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

CORS

Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, PUT, DELETE
Access-Control-Allow-Headers: Content-Type, Authorization

📝 Codes de Réponse

Code Description
200 Succès
201 Créé
400 Requête invalide
401 Non autorisé
403 Interdit
404 Non trouvé
429 Trop de requêtes
500 Erreur serveur

🔧 Exemples d'Utilisation

cURL - Health Check

curl -X GET http://localhost:8000/health

cURL - Décision ZeroIA

curl -X POST http://localhost:8000/zeroia/decision \
  -H "Content-Type: application/json" \
  -d '{
    "context": "High CPU usage detected",
    "options": ["scale_up", "optimize", "ignore"],
    "confidence_threshold": 0.8
  }'

cURL - Chat AssistantIA

curl -X POST http://localhost:8001/api/v1/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "Analysez cette situation et prenez une décision"}'

📚 Documentation Complète


Arkalia-LUNA Pro v2.8.0 - Documentation des endpoints API Dernière mise à jour : 30 juin 2025