マニフェストスキーマ(JSON Schema)
curl --request GET \
--url https://api.example.com/v1/data-apps/manifest-schemaimport requests
url = "https://api.example.com/v1/data-apps/manifest-schema"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/data-apps/manifest-schema', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/data-apps/manifest-schema",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/data-apps/manifest-schema"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/data-apps/manifest-schema")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/data-apps/manifest-schema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyDiscovery
マニフェストスキーマ(JSON Schema)
manifest 検証用 JSON Schema。
GET
/
v1
/
data-apps
/
manifest-schema
マニフェストスキーマ(JSON Schema)
curl --request GET \
--url https://api.example.com/v1/data-apps/manifest-schemaimport requests
url = "https://api.example.com/v1/data-apps/manifest-schema"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/data-apps/manifest-schema', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/data-apps/manifest-schema",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/data-apps/manifest-schema"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/data-apps/manifest-schema")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/data-apps/manifest-schema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyGET https://api-datahub.octoparse.com/v1/data-apps/manifest-schema
認証:不要。匿名で呼び出し可能。
マニフェスト仕様 0.2 の機読形(JSON Schema 2020-12)。プラットフォームが検証に使うそのものです。スキーマが正本で、本ページはフィールド表を複製しません。
エディタ、コーディング支援、第三者バリデータ向け。 合否は マニフェスト検証 のみが定義。
リクエスト
リクエスト例
curl \
"https://api-datahub.octoparse.com/v1/data-apps/manifest-schema"
レスポンス
200 成功
{
"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": "Machine-readable 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"
}
}
}
}
}
}
data の値自体が JSON Schema 文書。上は冒頭のみ。