> ## Documentation Index
> Fetch the complete documentation index at: https://www.octoparse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Valida un manifest

> Valida un manifest senza scrivere nulla. Restituisce issues e una card di anteprima.

**`POST`** `https://api-datahub.octoparse.com/v1/data-apps/validate`

Autenticazione: API key obbligatoria (`Authorization: Bearer <API Key>`).

Prima fase della pubblicazione in due fasi: validazione completa di struttura, regole tra blocchi, protezioni per l'autopubblicazione, controlli del pacchetto di codice e dei nomi dei file, con le stesse regole usate al momento della pubblicazione. Restituisce l'elenco dei problemi e una scheda di anteprima. Questo endpoint è l'unica autorità sull'esito; non dedurlo dalle tabelle dei campi della documentazione.

## Richiesta

### Body della richiesta

<ParamField body="manifest" type="string" required>
  Testo sorgente del manifest come stringa YAML o JSON.
</ParamField>

<ParamField body="files" type="object">
  File allegati. Le key sono path relativi; i value sono testo (per code-kind o quando c’è un README).
</ParamField>

<ParamField body="secrets" type="object">
  Mappa da nome secret a plaintext. L’endpoint validate non li memorizza.
</ParamField>

### Esempio di richiesta

```bash theme={null}
curl -X POST \
  -H "Authorization: Bearer $OCTOPARSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"manifest": "spec_version: \"0.2\"\nidentity:\n  app_name: reviews-query\n  name: Product review lookup\n  …"}' \
  "https://api-datahub.octoparse.com/v1/data-apps/validate"
```

## Risposta

### 200 successo

```json theme={null}
{
  "data": {
    "valid": false,
    "errors": [
      {
        "path": "$",
        "message": "'identity' is a required property"
      },
      {
        "path": "$",
        "message": "'input' is a required property"
      },
      "…"
    ],
    "card": null
  }
}
```

Il payload è wrappato in `data`. Campi:

<ResponseField name="valid" type="boolean" required>
  Se la validazione è passata.
</ResponseField>

<ResponseField name="errors" type="object[]">
  Lista issue. Ogni elemento ha `path` (JSON path) e `message`.

  <Expandable title="fields">
    <ResponseField name="path" type="string" required>
      —
    </ResponseField>

    <ResponseField name="message" type="string" required>
      —
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="card" type="object">
  Card di anteprima se valida; `null` se non valida.
</ResponseField>

### Errori

| HTTP | `code`         | `category`  | Descrizione                    |
| ---- | -------------- | ----------- | ------------------------------ |
| 401  | `unauthorized` | `forbidden` | API key mancante o non valida. |

Le risposte di errore usano `{"error": {code, category, message, retryable}}`. Vedi <a href="/docs/it/datahub/api/reference/introduction#errors">Errori</a>.

## Librerie client

Gli SDK Python e JavaScript non wrappano ancora questo endpoint. Chiama REST direttamente.
