> ## 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.

# Esquema del manifest (JSON Schema)

> Lee el JSON Schema que usa la plataforma para validar manifests.

**`GET`** `https://api-datahub.octoparse.com/v1/data-apps/manifest-schema`

Autenticación: ninguna. Acceso anónimo permitido.

Forma legible por máquina del spec de manifest (0.2), JSON Schema 2020-12. Este es el esquema exacto contra el que valida la plataforma. El esquema es la fuente de verdad; esta página no duplica una tabla de campos.

Para editores, asistentes de código y validadores de terceros. Aprobado/rechazado solo lo define <a href="/docs/es/datahub/api/reference/publishing/validate-manifest">Validar manifest</a>.

## Solicitud

### Ejemplo de solicitud

```bash theme={null}
curl \
  "https://api-datahub.octoparse.com/v1/data-apps/manifest-schema"
```

## Respuesta

### 200 correcto

```json theme={null}
{
  "data": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "urn:datahub:spec:manifest:0.2",
    "title": "Data App Manifest — spec 0.2",
    "description": "Legible por máquina spec for the Data App manifest (structure and field-level const…",
    "type": "object",
    "additionalProperties": false,
    "required": [
      "spec_version",
      "…"
    ],
    "properties": {
      "spec_version": {
        "const": "0.2"
      },
      "status": {
        "enum": [
          "draft",
          "…"
        ],
        "default": "published"
      },
      "identity": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "…"
        ],
        "properties": {
          "app_name": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]{1,63}$",
            "description": "Technical name slug. Consumed only at creation: required for one-step publish (P…"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "summary": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "enum": [
              "data",
              "…"
            ],
            "default": "data"
          },
          "scope": {
            "enum": [
              "public",
              "…"
            ],
            "default": "public"
          },
          "version": {
            "type": "string",
            "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
            "default": "0.1.0"
          }
        }
      },
      "discovery": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "capability": {
            "enum": [
              "data-acquisition",
              "…"
            ],
            "default": "data-acquisition"
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "boundary": {
            "type": "string"
          }
        }
      },
      "input": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema"
        ],
        "properties": {
          "schema": {
            "$ref": "#/$defs/io_schema"
          }
        }
      },
      "output": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id_field",
          "…"
        ],
        "properties": {
          "id_field": {
            "type": "string",
            "pattern": "^[a-z][a-zA-Z0-9_]{0,63}$"
          },
          "schema": {
            "$ref": "#/$defs/io_schema"
          }
        }
      },
      "execution": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "mode",
          "…"
        ],
        "properties": {
          "mode": {
            "enum": [
              "sync",
              "…"
            ]
          },
          "timeout_seconds": {
            "type": "number",
            "exclusiveMinimum": 0
          }
        }
      },
      "knowledge": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "when_to_use": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "when_not_to_use": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "failure_handling": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "pricing": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "events"
        ],
        "properties": {
          "events": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "event",
                "…"
              ],
              "properties": {
                "event": {
                  "$comment": "Built-in events: start (one task submitted, bills 1 at claim) and record (one re…",
                  "type": "string",
                  "pattern": "^[a-z][a-z0-9_]{0,31}$"
                },
                "label": {
                  "type": "string"
                },
                "unit_price": {
                  "type": "number",
                  "minimum": 0
                },
                "qty_from": {
                  "$comment": "Quantity rule for custom events: points to a number/integer field in output.sche…",
                  "type": "string",
                  "pattern": "^[a-z][a-zA-Z0-9_]{0,63}$"
                },
                "unit_size": {
                  "$comment": "Billing unit: charges per unit_size units of measure; qty converts to billing un…",
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          }
        }
      },
      "runtime": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind"
        ],
        "properties": {
          "kind": {
            "enum": [
              "api",
              "…"
            ]
          },
          "env": {
            "$comment": "Environment injection: alias -> platform-side environment entry name. Values are…",
            "type": "object",
            "propertyNames": {
              "pattern": "^[a-z][a-z0-9_]{0,31}$"
            },
            "additionalProperties": {
              "type": "string",
              "pattern": "^[A-Z][A-Z0-9_]{0,63}$"
            }
          },
          "api": {
            "$ref": "#/$defs/api_runtime"
          },
          "code": {
            "$ref": "#/$defs/code_runtime"
          }
        },
        "allOf": [
          {
            "$comment": "kind decides which block is required; the other block must be absent (leaving it…",
            "if": {
              "properties": {
                "kind": {
                  "const": "api"
                }
              },
              "required": [
                "kind"
              ]
            },
            "then": {
              "required": [
                "api"
              ],
              "not": {
                "required": [
                  "code"
                ]
              }
            }
          },
          "…"
        ]
      },
      "examples": {
        "type": "array",
        "items": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "id",
            "…"
          ],
          "properties": {
            "id": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
            },
            "goal": {
              "type": "string"
            },
            "input": {
              "type": "object"
            },
            "use_as_test": {
              "type": "boolean",
              "default": true
            }
          }
        }
      },
      "readme": {
        "type": "string"
      },
      "extensions": {
        "type": "object",
        "propertyNames": {
          "pattern": "^[a-z][a-z0-9_-]{0,31}$"
        },
        "additionalProperties": {
          "type": "object"
        }
      }
    },
    "allOf": [
      {
        "$comment": "When a submit stage exists (async interface), execution.mode must be async",
        "if": {
          "required": [
            "runtime"
          ],
          "properties": {
            "runtime": {
              "required": [
                "api"
              ],
              "properties": {
                "api": {
                  "required": [
                    "submit"
                  ]
                }
              }
            }
          }
        },
        "then": {
          "properties": {
            "execution": {
              "properties": {
                "mode": {
                  "const": "async"
                }
              }
            }
          }
        }
      }
    ],
    "$defs": {
      "io_schema": {
        "$comment": "Restricted subset of standard JSON Schema: keyword allowlist + platform extensio…",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "…"
        ],
        "properties": {
          "type": {
            "const": "object"
          },
          "properties": {
            "type": "object",
            "minProperties": 1,
            "propertyNames": {
              "pattern": "^[a-z][a-zA-Z0-9_]{0,63}$"
            },
            "additionalProperties": {
              "$ref": "#/$defs/io_field"
            }
          },
          "required": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          }
        }
      },
      "io_field": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "enum": [
              "string",
              "…"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "default": true,
          "enum": {
            "type": "array",
            "minItems": 1,
            "maxItems": 50
          },
          "enum_titles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 50
          },
          "minimum": {
            "type": "number"
          },
          "maximum": {
            "type": "number"
          },
          "pattern": {
            "type": "string"
          },
          "items": {
            "$ref": "#/$defs/io_field"
          },
          "minItems": {
            "type": "integer",
            "minimum": 0
          },
          "maxItems": {
            "type": "integer",
            "minimum": 1
          },
          "properties": {
            "type": "object",
            "propertyNames": {
              "pattern": "^[a-z][a-zA-Z0-9_]{0,63}$"
            },
            "additionalProperties": {
              "$ref": "#/$defs/io_field"
            }
          },
          "required": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "prefill": true,
          "sensitive": {
            "type": "boolean"
          }
        },
        "allOf": [
          {
            "$comment": "array must declare items (including items.type)",
            "if": {
              "properties": {
                "type": {
                  "const": "array"
                }
              },
              "required": [
                "type"
              ]
            },
            "then": {
              "required": [
                "items"
              ]
            }
          }
        ]
      },
      "request": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "method",
          "…"
        ],
        "properties": {
          "method": {
            "enum": [
              "GET",
              "…"
            ]
          },
          "url": {
            "type": "string",
            "minLength": 1
          },
          "query": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "…"
              ]
            }
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "body": {
            "type": "object"
          },
          "unset_inputs": {
            "enum": [
              "omit",
              "…"
            ]
          }
        }
      },
      "submit_stage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "request",
          "…"
        ],
        "properties": {
          "request": {
            "$ref": "#/$defs/request"
          },
          "response": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "task_id_path"
            ],
            "properties": {
              "task_id_path": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        }
      },
      "status_stage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "request",
          "…"
        ],
        "properties": {
          "request": {
            "$ref": "#/$defs/request"
          },
          "response": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "status_path"
            ],
            "properties": {
              "status_path": {
                "type": "string",
                "minLength": 1
              },
              "done_path": {
                "type": "string",
                "minLength": 1
              },
              "total_path": {
                "type": "string",
                "minLength": 1
              }
            }
          },
          "done_when": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": [
                "string",
                "…"
              ]
            }
          },
          "fail_when": {
            "type": "array",
            "items": {
              "type": [
                "string",
                "…"
              ]
            }
          },
          "every_seconds": {
            "type": "number",
            "exclusiveMinimum": 0,
            "default": 10
          },
          "timeout_seconds": {
            "type": "number",
            "exclusiveMinimum": 0,
            "default": 600
          }
        }
      },
      "cancel_stage": {
        "$comment": "Upstream cancel notification (async form only): sent best-effort once when the u…",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "request"
        ],
        "properties": {
          "request": {
            "$ref": "#/$defs/request"
          },
          "response": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "done_path": {
                "type": "string",
                "minLength": 1
              },
              "total_path": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        }
      },
      "fetch_stage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "request"
        ],
        "properties": {
          "request": {
            "$ref": "#/$defs/request"
          },
          "response": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "records_path": {
                "type": "string"
              },
              "field_map": {
                "type": "object",
                "propertyNames": {
                  "pattern": "^[a-z][a-zA-Z0-9_]{0,63}(\\.[a-z][a-zA-Z0-9_]{0,63})*$"
                },
                "additionalProperties": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "dedup_by": {
                "type": "string",
                "minLength": 1
              }
            }
          },
          "pagination": {
            "$ref": "#/$defs/pagination"
          }
        }
      },
      "pagination": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "enum": [
              "page",
              "…"
            ]
          },
          "start_page": {
            "type": "integer",
            "default": 1
          },
          "page_size": {
            "type": "integer",
            "minimum": 1
          },
          "cursor_path": {
            "type": "string",
            "minLength": 1
          },
          "stop_when_empty": {
            "type": "boolean",
            "default": true
          },
          "max_pages": {
            "type": "integer",
            "minimum": 1,
            "default": 100
          }
        },
        "allOf": [
          {
            "if": {
              "properties": {
                "mode": {
                  "const": "cursor"
                }
              },
              "required": [
                "mode"
              ]
            },
            "then": {
              "required": [
                "cursor_path"
              ]
            }
          },
          "…"
        ]
      },
      "auth": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "…"
        ],
        "properties": {
          "type": {
            "enum": [
              "bearer",
              "…"
            ]
          },
          "in": {
            "enum": [
              "header",
              "…"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "secret": {
            "$comment": "References an alias in runtime.env (the secret value is delivered by the platfor…",
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]{0,31}$"
          }
        },
        "allOf": [
          {
            "if": {
              "properties": {
                "type": {
                  "const": "api_key"
                }
              },
              "required": [
                "type"
              ]
            },
            "then": {
              "required": [
                "in",
                "…"
              ]
            }
          }
        ]
      },
      "api_runtime": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "fetch"
        ],
        "properties": {
          "request_timeout_seconds": {
            "type": "number",
            "exclusiveMinimum": 0,
            "default": 30
          },
          "auth": {
            "$ref": "#/$defs/auth"
          },
          "response_code": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "path",
              "…"
            ],
            "properties": {
              "path": {
                "type": "string",
                "minLength": 1
              },
              "ok_codes": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "type": [
                    "integer",
                    "…"
                  ]
                }
              },
              "message_path": {
                "type": "string"
              }
            }
          },
          "submit": {
            "$ref": "#/$defs/submit_stage"
          },
          "status": {
            "$ref": "#/$defs/status_stage"
          },
          "cancel": {
            "$ref": "#/$defs/cancel_stage"
          },
          "fetch": {
            "$ref": "#/$defs/fetch_stage"
          },
          "fetch_after_cancel": {
            "type": "boolean",
            "default": false
          }
        },
        "dependentRequired": {
          "submit": [
            "status"
          ],
          "status": [
            "submit"
          ],
          "cancel": [
            "submit"
          ]
        }
      },
      "code_runtime": {
        "$comment": "code kind will be finalized with the per-run container design; 0.2 keeps a minim…",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "entrypoint"
        ],
        "properties": {
          "entrypoint": {
            "type": "string",
            "minLength": 1
          },
          "seed_dataset": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

El valor de `data` es el documento JSON Schema en sí. Arriba solo se muestra el comienzo.

## Bibliotecas cliente

Los SDK de Python y JavaScript aún no encapsulan este endpoint. Llame a REST directamente.
