API per l'Albo Pretorio Online della Sanità Pugliese.
Accesso pubblico (bandi, concorsi, delibere, determine) tramite OAuth2 client_credentials.
13 aziende sanitarie pugliesi disponibili.
Learn more at Aol Puglia.
Created by @aborruso (aborruso).
Quick Start
1. Install
See Install above.
2. Nessuna configurazione richiesta
Il CLI si autentica automaticamente tramite OAuth2 client_credentials pubblico.
Nessun token da ottenere, nessuna variabile d'ambiente da impostare.
3. Verify Setup
aol-puglia-pp-cli doctor
This checks your configuration and credentials.
4. Try Your First Command
# Lista le 13 aziende sanitarie con i loro identificatori
aol-puglia-pp-cli orgs
# Cerca bandi per la ASL Bari
aol-puglia-pp-cli atti search --azienda "ASL Bari" --tipo-item bando
# Esporta i risultati in CSV
aol-puglia-pp-cli fileexport --azienda "ASL Bari" --tipo-item bando --output bari-bandi.csv
Usage
Run aol-puglia-pp-cli --help for the full command reference and flag list.
Commands
atti
Manage atti
aol-puglia-pp-cli atti download-allegato - Restituisce il contenuto dell'allegato come base64 con il nome originale del file.
L'allegato ID è disponibile nel campo listaAllegati di ogni atto.
aol-puglia-pp-cli atti get-atto - Restituisce il dettaglio completo di un singolo atto inclusa la lista allegati.
aol-puglia-pp-cli atti get-trasparenza - Restituisce le sezioni di trasparenza disponibili per l'azienda.
aol-puglia-pp-cli atti search - Ricerca paginata degli atti pubblicati: bando, concorso, delibera,
determina (la disponibilità per tipo varia per azienda; alcune ASL non pubblicano delibere/determine).
Il valore repertorio restituisce la vista aggregata di tutti i tipi. Supporta filtri per data, proponente, oggetto, CIG.
config
Manage config
aol-puglia-pp-cli config get-configurazione-item - Restituisce la configurazione di durata pubblicazione e proroga per ogni tipo di atto dell'azienda.
aol-puglia-pp-cli config list-proponenti - Restituisce tutti i proponenti configurati per l'azienda e il tipo di documento.
aol-puglia-pp-cli config list-proponenti-attivi - Come getProponenti ma filtra solo i proponenti con attivo=true.
fileexport
Manage fileexport
aol-puglia-pp-cli fileexport - Esporta i risultati di una ricerca come file CSV.
Accetta gli stessi parametri di getListaAttiPaginata (senza page/numElementi).
Output Formats
# Human-readable table (default in terminal, JSON when piped)
aol-puglia-pp-cli atti search --azienda "ASL Bari" --tipo-item bando
# JSON for scripting and agents
aol-puglia-pp-cli atti search --azienda "ASL Bari" --tipo-item bando --json
# Filter to specific fields
aol-puglia-pp-cli atti search --azienda "ASL Bari" --tipo-item bando --json --select id,oggetto,dataAdozione
# Dry run — show the request without sending
aol-puglia-pp-cli atti search --azienda "ASL Bari" --tipo-item bando --dry-run
# Agent mode — JSON + compact + no prompts in one flag
aol-puglia-pp-cli atti search --azienda "ASL Bari" --tipo-item bando --agent
Agent Usage
This CLI is designed for AI agent consumption:
- Non-interactive - never prompts, every input is a flag
- Pipeable -
--json output to stdout, errors to stderr
- Filterable -
--select id,name returns only fields you need
- Previewable -
--dry-run shows the request without sending
- Explicit retries - add
--idempotent to create retries when a no-op success is acceptable
- Confirmable -
--yes for explicit confirmation of destructive actions
- Piped input - write commands can accept structured input when their help lists
--stdin
- Offline-friendly - sync/search commands can use the local SQLite store when available
- Agent-safe by default - no colors or formatting unless
--human-friendly is set
Exit codes: 0 success, 2 usage error, 3 not found, 4 auth error, 5 API error, 7 rate limited, 10 config error.
Health Check
aol-puglia-pp-cli doctor
Verifies configuration, credentials, and connectivity to the API.
Configuration
Config file: ~/.config/albo-online-puglia-pp-cli/config.toml
Static request headers can be configured under headers; per-command header overrides take precedence.
Environment variables:
| Name | Kind | Required | Description |
|---|
AOL_PUGLIA_BEARER_AUTH | per_call | Yes | Set to your API credential. |
agentcookie (optional)
If you use agentcookie to sync secrets across machines, this CLI auto-adopts agentcookie-managed credentials with no extra setup. When the daemon writes to this CLI's config, aol-puglia-pp-cli doctor reports agentcookie: detected and auth-status labels the source as agentcookie. Skip this section if you don't use agentcookie - the CLI works the same as any other.
Troubleshooting
Authentication errors (exit code 4)
- Run
aol-puglia-pp-cli doctor to check credentials
- Verify the environment variable is set:
echo $AOL_PUGLIA_BEARER_AUTH
Not found errors (exit code 3)
- Check the resource ID is correct
- Run the
list command to see available items
Generated by CLI Printing Press