워크스페이스 저장
curl --request PUT \
--url https://api.example.com/v1/data-apps/{app_id}/workspace \
--header 'Content-Type: application/json' \
--data '
{
"manifest": "<string>",
"files": {},
"secrets": {},
"expected_revision": 123
}
'import requests
url = "https://api.example.com/v1/data-apps/{app_id}/workspace"
payload = {
"manifest": "<string>",
"files": {},
"secrets": {},
"expected_revision": 123
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({manifest: '<string>', files: {}, secrets: {}, expected_revision: 123})
};
fetch('https://api.example.com/v1/data-apps/{app_id}/workspace', 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}/workspace",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'manifest' => '<string>',
'files' => [
],
'secrets' => [
],
'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}/workspace"
payload := strings.NewReader("{\n \"manifest\": \"<string>\",\n \"files\": {},\n \"secrets\": {},\n \"expected_revision\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.example.com/v1/data-apps/{app_id}/workspace")
.header("Content-Type", "application/json")
.body("{\n \"manifest\": \"<string>\",\n \"files\": {},\n \"secrets\": {},\n \"expected_revision\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/data-apps/{app_id}/workspace")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"manifest\": \"<string>\",\n \"files\": {},\n \"secrets\": {},\n \"expected_revision\": 123\n}"
response = http.request(request)
puts response.read_body{
"app_name": "<string>",
"app_id": "<string>",
"namespace": "<string>",
"revision": 123,
"valid": true,
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"missing_secrets": [
"<string>"
],
"secrets_deferred": [
"<string>"
],
"name_reused_from": "<string>"
}Publishing
워크스페이스 저장
가변 드래프트(워크스페이스) 저장. 무효 내용도 저장 가능. 검증 결과 포함.
PUT
/
v1
/
data-apps
/
{app_id}
/
workspace
워크스페이스 저장
curl --request PUT \
--url https://api.example.com/v1/data-apps/{app_id}/workspace \
--header 'Content-Type: application/json' \
--data '
{
"manifest": "<string>",
"files": {},
"secrets": {},
"expected_revision": 123
}
'import requests
url = "https://api.example.com/v1/data-apps/{app_id}/workspace"
payload = {
"manifest": "<string>",
"files": {},
"secrets": {},
"expected_revision": 123
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({manifest: '<string>', files: {}, secrets: {}, expected_revision: 123})
};
fetch('https://api.example.com/v1/data-apps/{app_id}/workspace', 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}/workspace",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'manifest' => '<string>',
'files' => [
],
'secrets' => [
],
'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}/workspace"
payload := strings.NewReader("{\n \"manifest\": \"<string>\",\n \"files\": {},\n \"secrets\": {},\n \"expected_revision\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.example.com/v1/data-apps/{app_id}/workspace")
.header("Content-Type", "application/json")
.body("{\n \"manifest\": \"<string>\",\n \"files\": {},\n \"secrets\": {},\n \"expected_revision\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/data-apps/{app_id}/workspace")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"manifest\": \"<string>\",\n \"files\": {},\n \"secrets\": {},\n \"expected_revision\": 123\n}"
response = http.request(request)
puts response.read_body{
"app_name": "<string>",
"app_id": "<string>",
"namespace": "<string>",
"revision": 123,
"valid": true,
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"missing_secrets": [
"<string>"
],
"secrets_deferred": [
"<string>"
],
"name_reused_from": "<string>"
}PUT https://api-datahub.octoparse.com/v1/data-apps/{app_id}/workspace
인증: API 키 필요(Authorization: Bearer <API Key>). App 작성자만. 그 외 404.
App 가변 드래프트를 저장. 검증 실패여도 저장은 거부되지 않음: 전체 검증은 돌고 결과(valid와 issues)가 반환. 무효 드래프트도 유지되어 고친 뒤 재저장 가능.
App 식별자는 첫 저장 시 암묵 생성 — 별도 「App 생성」 엔드포인트 없음. 하드 게이트 400은 3가지만: 계정에 사용자 이름 있음, 페이로드 크기 내, app_name 미사용.
expected_revision은 낙관적 잠금(409 revision-conflict)으로 여러 탭의 조용한 덮어쓰기를 막음. 첨부 시크릿은 이 저장이 유효할 때만 저장. 무효 저장에 이름만 남기지 않음.
요청
경로 파라미터
string
필수
App 참조:
app_<hex> 또는 <namespace>/<app_name>. 첫 저장에는 후자를 사용.요청 body
string
필수
원시 매니페스트 텍스트.
object
첨부 파일: 키는 상대 경로, 값은 텍스트.
object
시크릿 이름→평문. 이 저장이 유효할 때만 저장.
integer
기대하는 현재 드래프트 리비전. 불일치는
409.요청 예시
curl -X PUT \
-H "Authorization: Bearer $OCTOPARSE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"manifest": "spec_version: \"0.2\"\n…", "files": {}, "expected_revision": 3}' \
"https://api-datahub.octoparse.com/v1/data-apps/carol/reviews-query/workspace"
응답
200 성공
{
"data": {
"app_name": "string",
"app_id": "string",
"namespace": "string",
"revision": 0,
"valid": false,
"issues": [
{
"path": "string",
"message": "string"
}
],
"missing_secrets": [
"string"
],
"secrets_deferred": [
"string"
],
"name_reused_from": "string"
}
}
data로 감쌉니다. 필드:
string
필수
—
string
필수
안정적인 App ID.
string
—
integer
필수
저장 후 드래프트 리비전.
boolean
필수
현재 내용이 검증을 통과했는지.
string[]
—
string[]
이 저장이 무효라 저장되지 않은 시크릿 이름.
string
—
오류
| HTTP | code | category | 설명 |
|---|---|---|---|
| 401 | unauthorized | forbidden | API 키 누락 또는 무효. |
| 400 | username-required | invalid_input | 계정에 아직 사용자 이름이 없어 <username>/<app_name>을 만들 수 없음. |
| 409 | revision-conflict | invalid_input | expected_revision이 현재 드래프트 리비전과 불일치 — 동시 편집. |
| 400 | invalid-app-name | invalid_input | 이름이 명명 규칙을 충족하지 않거나 예약어입니다. |
| 409 | app-name-reserved | forbidden | 타인 이력 바인딩이 이름을 보유(사용자 이름 이전 후 30일 동결). |
| 413 | payload-too-large | invalid_input | 요청 body가 크기 상한 초과. |
{"error": {code, category, message, retryable}}입니다. 오류 참고.