请求模板变量表
curl --request GET \
--url https://api-datahub.bazhuayu.com/v1/data-apps/template-variablesimport requests
url = "https://api-datahub.bazhuayu.com/v1/data-apps/template-variables"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api-datahub.bazhuayu.com/v1/data-apps/template-variables', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET'};
fetch('https://api-datahub.bazhuayu.com/v1/data-apps/template-variables', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-datahub.bazhuayu.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-datahub.bazhuayu.com/v1/data-apps/template-variables")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-datahub.bazhuayu.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;
}require 'uri'
require 'net/http'
url = URI("https://api-datahub.bazhuayu.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_bodyusing RestSharp;
var options = new RestClientOptions("https://api-datahub.bazhuayu.com/v1/data-apps/template-variables");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
val client = OkHttpClient()
val request = Request.Builder()
.url("https://api-datahub.bazhuayu.com/v1/data-apps/template-variables")
.get()
.build()
val response = client.newCall(request).execute()false发现 Data App
请求模板变量表
列出 api 型 App 的请求模板可引用的占位符。
GET
/
v1
/
data-apps
/
template-variables
请求模板变量表
curl --request GET \
--url https://api-datahub.bazhuayu.com/v1/data-apps/template-variablesimport requests
url = "https://api-datahub.bazhuayu.com/v1/data-apps/template-variables"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api-datahub.bazhuayu.com/v1/data-apps/template-variables', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET'};
fetch('https://api-datahub.bazhuayu.com/v1/data-apps/template-variables', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-datahub.bazhuayu.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-datahub.bazhuayu.com/v1/data-apps/template-variables")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-datahub.bazhuayu.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;
}require 'uri'
require 'net/http'
url = URI("https://api-datahub.bazhuayu.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_bodyusing RestSharp;
var options = new RestClientOptions("https://api-datahub.bazhuayu.com/v1/data-apps/template-variables");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
val client = OkHttpClient()
val request = Request.Builder()
.url("https://api-datahub.bazhuayu.com/v1/data-apps/template-variables")
.get()
.build()
val response = client.newCall(request).execute()false端点
GET https://api-datahub.bazhuayu.com/v1/data-apps/template-variables
请求
示例请求
curl \
"https://api-datahub.bazhuayu.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 …",
"variables": [
{
"name": "input.<field>",
"description": "A caller-supplied input value; <field> must be a top-level property of input.schema. When the placeholder is the whole s…",
"example": "wireless charger",
"stages": [
"submit",
"status",
"…"
]
},
{
"name": "env.<alias>",
"description": "The value of a platform-side environment entry declared in runtime.env under <alias>; delivered per run and always treat…",
"example": "https://api.example-upstream.com",
"stages": [
"submit",
"status",
"…"
]
},
"…"
]
}
}
syntax 说明占位符语法,variables[] 逐个列出变量名、说明、示例值与可用阶段。
