Publishing
Assemble a contract folder
Merge multi-file contract JSON into one fully validated manifest. Anonymous access allowed.
POST
Assemble a contract folder
POST https://api-datahub.octoparse.com/v1/data-apps/contract/assemble
Authentication: none. Anonymous access allowed.
Merge a contract folder (a file map keyed by relative path, order preserved) into one self-contained manifest. This endpoint is the single source of truth for assembly rules. The portal import wizard and the contract skill self-check both use it.
Slot files: dataapp.json / input_schema.json / output_schema.json / runtime.json / pricing.json / examples.json / README.md (filenames are case-insensitive; dotted forms such as input.schema.json are accepted and normalized in picked). Pricing and examples may also be inlined in dataapp.json. The merged manifest goes through full author-side validation (same rules as Validate a manifest). Deliverable only when issues is empty. Recoverable anomalies (missing files, cross-layer name collisions, ignored non-contract files, folder name mismatch, and so on) return as structured warnings (code + params, localized by the presentation layer) and are not errors.
Hard failures (400): a slot file is not valid JSON, has the wrong shape (examples.json must be an array; other slots are objects), or exceeds 1MB; no contract file at all; total size over 12MB. The contract path covers api-kind only; runtime.kind=code produces an issue.
Optional 8th file i18n.json ({source, locales}, up to 4MB) is not merged into the manifest. It is parsed and returned as translations for the caller to save via the translation endpoints. source is required; illegal locales yield 400; a locale equal to source is skipped with i18n-locale-is-source; path-level problems return as i18n-* warnings.
Anonymous access is allowed: assembly is a pure function of the request body, it neither reads nor writes platform data, and file/total size limits are the only gate.
Request
Request body
object
required
File map. Keys are relative paths; values are file text.
Example request
Response
200 success
data. Fields:
object
required
Merged manifest object.
string[]
Map of slot files that were actually recognized.
string
—
object[]
Validation issues. Empty means deliverable.
object[]
Structured warnings.
object
Parsed
i18n.json content, or null when absent.Errors
Error responses use
{"error": {code, category, message, retryable}}. See Errors.