リクエストテンプレート変数
curl --request GET \
--url https://api.example.com/v1/data-apps/template-variablesimport requests
url = "https://api.example.com/v1/data-apps/template-variables"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/data-apps/template-variables', 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/template-variables",
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/template-variables"
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/template-variables")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/data-apps/template-variables")
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
リクエストテンプレート変数
api-kind テンプレート用プレースホルダ。
GET
/
v1
/
data-apps
/
template-variables
リクエストテンプレート変数
curl --request GET \
--url https://api.example.com/v1/data-apps/template-variablesimport requests
url = "https://api.example.com/v1/data-apps/template-variables"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/data-apps/template-variables', 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/template-variables",
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/template-variables"
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/template-variables")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/data-apps/template-variables")
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/template-variables
認証:不要。匿名で呼び出し可能。
api-kind リクエストテンプレートが各ステージ(url/query/headers/body)で使えるプレースホルダ一覧。各変数に短い説明、描画例、利用可能ステージ。
公開パイプラインが検証に使う語彙と同じ。エディタやコーディング支援がずれたリストをコピーせず正確に提示できる。
リクエスト
リクエスト例
curl "https://api-datahub.octoparse.com/v1/data-apps/template-variables"
レスポンス
200 成功
{
"data": {
"syntax": "Single curly braces; a placeholder should be the whole string value ("{input.keyword}"), except inside url where it may be embedded.",
"variables": [
{
"name": "input.<field>",
"description": "A caller-supplied input value; <field> must be a top-level property of input.schema.",
"example": "wireless charger",
"stages": ["submit", "status", "fetch"]
},
{
"name": "env.<alias>",
"description": "Value of a platform-side environment entry declared in runtime.env under <alias>.",
"example": "https://api.example-upstream.com",
"stages": ["submit", "status", "fetch"]
}
]
}
}
syntax はプレースホルダ構文。variables[] は name・description・example・stages。