Build 생성
curl --request POST \
--url https://api.example.com/v1/data-apps/{app_id}/builds \
--header 'Content-Type: application/json' \
--data '
{
"expected_revision": 123
}
'import requests
url = "https://api.example.com/v1/data-apps/{app_id}/builds"
payload = { "expected_revision": 123 }
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({expected_revision: 123})
};
fetch('https://api.example.com/v1/data-apps/{app_id}/builds', 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/{app_id}/builds",
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([
'expected_revision' => 123
]),
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/{app_id}/builds"
payload := strings.NewReader("{\n \"expected_revision\": 123\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/{app_id}/builds")
.header("Content-Type", "application/json")
.body("{\n \"expected_revision\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/data-apps/{app_id}/builds")
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 \"expected_revision\": 123\n}"
response = http.request(request)
puts response.read_body{
"build_id": "<string>",
"build_status": "<string>",
"content_hash": "<string>",
"source_revision": 123,
"reused": true,
"created_at": "<string>"
}Publishing
Build 생성
현재 드래프트를 디버그 실행·게시에 쓰는 불변 스냅샷으로 고정.
POST
/
v1
/
data-apps
/
{app_id}
/
builds
Build 생성
curl --request POST \
--url https://api.example.com/v1/data-apps/{app_id}/builds \
--header 'Content-Type: application/json' \
--data '
{
"expected_revision": 123
}
'import requests
url = "https://api.example.com/v1/data-apps/{app_id}/builds"
payload = { "expected_revision": 123 }
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({expected_revision: 123})
};
fetch('https://api.example.com/v1/data-apps/{app_id}/builds', 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/{app_id}/builds",
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([
'expected_revision' => 123
]),
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/{app_id}/builds"
payload := strings.NewReader("{\n \"expected_revision\": 123\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/{app_id}/builds")
.header("Content-Type", "application/json")
.body("{\n \"expected_revision\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/data-apps/{app_id}/builds")
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 \"expected_revision\": 123\n}"
response = http.request(request)
puts response.read_body{
"build_id": "<string>",
"build_status": "<string>",
"content_hash": "<string>",
"source_revision": 123,
"reused": true,
"created_at": "<string>"
}POST https://api-datahub.octoparse.com/v1/data-apps/{app_id}/builds
인증: API 키 필요(Authorization: Bearer <API Key>). App 작성자만. 그 외 404.
현재 워크스페이스를 불변 스냅샷으로 고정 — 디버그 실행과 게시가 참조하는 객체.
전제: 워크스페이스 존재·내용 유효(아니면 422+issues). body에 expected_revision 가능(저장~고정 사이 드래프트 변경 시 409). 같은 content_hash ready 스냅샷이 있으면 재사용·중복 행 없음. api 형은 즉시 ready, code 형은 202로 이미지 Build 큐 — 같은 App 진행 중 재제출은 409. 비권장 App도 Build 가능. 거부되는 것은 신규 Release뿐.
요청
경로 파라미터
string
필수
App 참조.
요청 body
integer
기대하는 현재 드래프트 리비전. 불일치는
409.요청 예시
curl -X POST \
-H "Authorization: Bearer $OCTOPARSE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"expected_revision": 3}' \
"https://api-datahub.octoparse.com/v1/data-apps/carol/reviews-query/builds"
응답
200 성공
{
"data": {
"build_id": "string",
"build_status": "string",
"content_hash": "string",
"source_revision": 0,
"reused": false,
"created_at": "string"
}
}
data로 감쌉니다. 필드:
string
필수
Build ID.
string
필수
ready, building(code 유형) 또는 failed.string
필수
콘텐츠 해시.
integer
필수
고정 시점 드래프트 리비전.
boolean
동일 내용 기존 스냅샷 재사용 여부.
string
생성 시각.
오류
| HTTP | code | category | 설명 |
|---|---|---|---|
| 401 | unauthorized | forbidden | API 키 누락 또는 무효. |
| 404 | workspace-not-found | not_found | 진행 중 드래프트 없음. 정상 주경로 상태이며 오류가 아님. |
| 422 | build-failed | invalid_input | 워크스페이스 내용 검증 실패. issues[]에 문제 목록. |
| 409 | revision-conflict | invalid_input | expected_revision이 현재 드래프트 리비전과 불일치 — 동시 편집. |
{"error": {code, category, message, retryable}}입니다. 오류 참고.