계약 분할
curl --request POST \
--url https://api.example.com/v1/data-apps/contract/split \
--header 'Content-Type: application/json' \
--data '
{
"manifest": {},
"translations": {}
}
'import requests
url = "https://api.example.com/v1/data-apps/contract/split"
payload = {
"manifest": {},
"translations": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({manifest: {}, translations: {}})
};
fetch('https://api.example.com/v1/data-apps/contract/split', 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/contract/split",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'manifest' => [
],
'translations' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/data-apps/contract/split"
payload := strings.NewReader("{\n \"manifest\": {},\n \"translations\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/data-apps/contract/split")
.header("Content-Type", "application/json")
.body("{\n \"manifest\": {},\n \"translations\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/data-apps/contract/split")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"manifest\": {},\n \"translations\": {}\n}"
response = http.request(request)
puts response.read_body{
"files": {},
"folder_name": "<string>"
}Publishing
계약 분할
조립의 역: 매니페스트 하나를 정규 계약 폴더 파일 맵으로 분할.
POST
/
v1
/
data-apps
/
contract
/
split
계약 분할
curl --request POST \
--url https://api.example.com/v1/data-apps/contract/split \
--header 'Content-Type: application/json' \
--data '
{
"manifest": {},
"translations": {}
}
'import requests
url = "https://api.example.com/v1/data-apps/contract/split"
payload = {
"manifest": {},
"translations": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({manifest: {}, translations: {}})
};
fetch('https://api.example.com/v1/data-apps/contract/split', 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/contract/split",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'manifest' => [
],
'translations' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/data-apps/contract/split"
payload := strings.NewReader("{\n \"manifest\": {},\n \"translations\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/data-apps/contract/split")
.header("Content-Type", "application/json")
.body("{\n \"manifest\": {},\n \"translations\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/data-apps/contract/split")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"manifest\": {},\n \"translations\": {}\n}"
response = http.request(request)
puts response.read_body{
"files": {},
"folder_name": "<string>"
}POST https://api-datahub.octoparse.com/v1/data-apps/contract/split
인증: 없음. 익명 호출 가능.
조립의 역: 자기완결 매니페스트 → 정규 계약 폴더 파일 맵(각 파일은 JSON 텍스트. zip은 클라이언트).
분할 의미(단일 정본): 플랫폼 주입 읽기 키(scope / status / namespace) 제거. input / output은 각각 schema 래퍼 한 단 제거, output.id_field는 형제로. 결과 파일 맵은 조립의 역.
요청
요청 body
object
필수
매니페스트 객체.
object
선택 번역 세트
{source, locales}.요청 예시
curl -X POST \
-H "Content-Type: application/json" \
-d '{"manifest": {"spec_version": "0.2", "identity": {"app_name": "reviews-query"}, "…": "…"}}' \
"https://api-datahub.octoparse.com/v1/data-apps/contract/split"
응답
200 성공
{
"data": {
"files": {
"dataapp.json": "{\n \"spec_version\": \"0.2\",\n …",
"input_schema.json": "{…}",
"output_schema.json": "{…}",
"runtime.json": "{…}",
"pricing.json": "{…}",
"examples.json": "[…]"
},
"warnings": []
}
}
data로 감쌉니다. 필드:
object
파일 맵. 키는 파일명, 값은 JSON 텍스트.
string
—