Il plugin espone API REST pubbliche (GET, senza autenticazione) .
Namespace: opendata/v1
Base URL: https://tuosito.it/wp-json/opendata/v1/
| Metodo | Percorso | Descrizione |
|---|---|---|
| GET | package_list |
Elenco identificativi dataset |
| GET | package_show/{id} |
Dettaglio dataset |
| GET | organization_list |
Elenco organizzazioni |
| GET | organization_show/{id} |
Dettaglio organizzazione |
| GET | group_list |
Elenco gruppi |
{
"success": true,
"result": ["c_d171:D.1", "c_d171:D.2"]
}
Restituisce gli identificativi DCAT (o lo slug se l'identificativo non è impostato).
Il parametro {id} accetta:
c_d171:D.1)dataset-{id} (fallback)result| Campo | Tipo | Descrizione |
|---|---|---|
id |
string | Identificativo dataset |
name |
string | Slug post |
title |
string | Titolo |
description |
string | Contenuto HTML |
modified |
string | Data/ora ultima modifica |
issued |
string | Data emissione (YYYY-MM-DD) |
language |
string | URI lingua |
theme_uri |
string | URI tema dataset |
accrual_uri |
string | URI frequenza aggiornamento |
keywords |
array | Parole chiave |
dcat_jsonld |
string | URL endpoint JSON-LD |
organization |
object | { "id", "name" } |
resources |
array | Distribuzioni |
resources[]| Campo | Descrizione |
|---|---|
id |
ID post risorsa |
name |
Titolo |
url |
URL di accesso effettivo |
format |
URI formato EU o MIME |
license |
URI licenza (default CC BY 4.0) |
byte_size |
Dimensione file se nota |
{
"success": true,
"result": {
"id": "5",
"name": "Comune di Esempio",
"identifier": "c_d171"
}
}
Risposta 404 con oggetto WP_Error se dataset o organizzazione non trovati.
:) in package_show possono richiedere URL encoding; l'endpoint /dataset/{id}/jsonld accetta pattern più permissivo ([^/]+).