You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
3 weeks ago | |
|---|---|---|
| .. | ||
| app | 3 weeks ago | |
| docs | 4 weeks ago | |
| static | 4 weeks ago | |
| README.md | 4 weeks ago | |
| pyproject.toml | 4 weeks ago | |
README.md
GeoNetAgent Collector (FastAPI)
Ingress API untuk data agent endpoint → PostgreSQL CMDB.
Dokumentasi API
Panduan konsumsi (curl, PowerShell, Python): docs/API.md
Kontrak formal: .cursor/api-contracts.md
Quick start
cd collector
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .
# dari repo root — salin .env dengan DATABASE_URL & AGENT_BEARER_TOKEN
uvicorn app.main:app --reload --port 8000
- Health: http://localhost:8000/api/v1/health
- Swagger: http://localhost:8000/docs
Struktur
collector/
├── app/
│ ├── main.py
│ ├── config.py
│ ├── api/v1/ # routes
│ ├── core/ # auth
│ ├── db/ # SQLAlchemy models
│ ├── schemas/ # Pydantic
│ └── services/ # business logic
├── docs/API.md # panduan konsumen API
└── pyproject.toml
Environment
| Variable | Default | Keterangan |
|---|---|---|
DATABASE_URL |
localhost | PostgreSQL geonetagent_dev |
AGENT_BEARER_TOKEN |
dev placeholder | Token agent MVP |
AGENT_TOKEN_CHECK_DB |
false | Validasi ke agent_tokens |