Initial commit: LLM Automation Docs & Remediation Engine v2.0
Features: - Automated datacenter documentation generation - MCP integration for device connectivity - Auto-remediation engine with safety checks - Multi-factor reliability scoring (0-100%) - Human feedback learning loop - Pattern recognition and continuous improvement - Agentic chat support with AI - API for ticket resolution - Frontend React with Material-UI - CI/CD pipelines (GitLab + Gitea) - Docker & Kubernetes deployment - Complete documentation and guides v2.0 Highlights: - Auto-remediation with write operations (disabled by default) - Reliability calculator with 4-factor scoring - Human feedback system for continuous learning - Pattern-based progressive automation - Approval workflow for critical actions - Full audit trail and rollback capability
This commit is contained in:
135
docs/api/index.md
Normal file
135
docs/api/index.md
Normal file
@@ -0,0 +1,135 @@
|
||||
# API Documentation
|
||||
|
||||
La documentazione datacenter è accessibile tramite API REST ottimizzata per umani e LLM.
|
||||
|
||||
## Base URL
|
||||
|
||||
```
|
||||
https://docs.datacenter.local/api/v1
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
Attualmente l'API è accessibile senza autenticazione nella rete interna.
|
||||
Per accesso esterno è richiesta autenticazione API key.
|
||||
|
||||
## Endpoints
|
||||
|
||||
### GET /sections
|
||||
|
||||
Lista tutte le sezioni disponibili con metadata.
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "01_infrastruttura_fisica",
|
||||
"title": "Infrastruttura Fisica",
|
||||
"section": "01",
|
||||
"last_updated": "2025-01-20T10:30:00Z",
|
||||
"size_bytes": 45000,
|
||||
"token_estimate": 11250,
|
||||
"url": "/docs/sections/01_infrastruttura_fisica/",
|
||||
"api_url": "/api/v1/sections/01_infrastruttura_fisica"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### GET /sections/{section_id}
|
||||
|
||||
Ottieni contenuto completo di una sezione.
|
||||
|
||||
**Parameters:**
|
||||
- `format` (query): `markdown` | `html` | `json` (default: `markdown`)
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
curl https://docs.datacenter.local/api/v1/sections/02_networking?format=markdown
|
||||
```
|
||||
|
||||
### GET /summary
|
||||
|
||||
Summary ottimizzato per LLM con key points di ogni sezione.
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
[
|
||||
{
|
||||
"section_id": "01_infrastruttura_fisica",
|
||||
"title": "Infrastruttura Fisica",
|
||||
"key_points": [
|
||||
"Informazioni Generali Datacenter",
|
||||
"Layout e Organizzazione",
|
||||
"Sistema Elettrico"
|
||||
],
|
||||
"subsections": ["1.1", "1.2", "2.1", ...],
|
||||
"last_updated": "2025-01-20T10:30:00Z"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### GET /search
|
||||
|
||||
Ricerca full-text nella documentazione.
|
||||
|
||||
**Parameters:**
|
||||
- `q` (query, required): Search query
|
||||
- `limit` (query): Max results (default: 10, max: 50)
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
curl "https://docs.datacenter.local/api/v1/search?q=ups&limit=5"
|
||||
```
|
||||
|
||||
### GET /stats
|
||||
|
||||
Statistiche generali della documentazione.
|
||||
|
||||
### GET /llm-optimized/{section_id}
|
||||
|
||||
Contenuto ottimizzato specificamente per consumo LLM.
|
||||
|
||||
**Features:**
|
||||
- Markdown pulito
|
||||
- Metadata espliciti
|
||||
- Istruzioni per LLM
|
||||
- Token count
|
||||
|
||||
## Rate Limiting
|
||||
|
||||
- API pubblica: 100 req/min
|
||||
- Con API key: 1000 req/min
|
||||
|
||||
## Esempi d'uso
|
||||
|
||||
### Python
|
||||
```python
|
||||
import requests
|
||||
|
||||
# Get all sections
|
||||
response = requests.get('https://docs.datacenter.local/api/v1/sections')
|
||||
sections = response.json()
|
||||
|
||||
# Get specific section
|
||||
response = requests.get(
|
||||
'https://docs.datacenter.local/api/v1/sections/02_networking',
|
||||
params={'format': 'markdown'}
|
||||
)
|
||||
content = response.json()
|
||||
|
||||
print(f"Section: {content['metadata']['title']}")
|
||||
print(f"Tokens: {content['metadata']['token_estimate']}")
|
||||
print(content['content'])
|
||||
```
|
||||
|
||||
### cURL
|
||||
```bash
|
||||
# Get summary
|
||||
curl https://docs.datacenter.local/api/v1/summary | jq
|
||||
|
||||
# Search
|
||||
curl "https://docs.datacenter.local/api/v1/search?q=vmware&limit=10" | jq
|
||||
|
||||
# Get stats
|
||||
curl https://docs.datacenter.local/api/v1/stats | jq
|
||||
```
|
||||
Reference in New Issue
Block a user