数据集详情
curl --request GET \
--url https://api-datahub.bazhuayu.com/v1/datasets/{dataset_id}import requests
url = "https://api-datahub.bazhuayu.com/v1/datasets/{dataset_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api-datahub.bazhuayu.com/v1/datasets/{dataset_id}', 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/datasets/{dataset_id}', 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/datasets/{dataset_id}"
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/datasets/{dataset_id}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-datahub.bazhuayu.com/v1/datasets/{dataset_id}",
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/datasets/{dataset_id}")
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/datasets/{dataset_id}");
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/datasets/{dataset_id}")
.get()
.build()
val response = client.newCall(request).execute()false{
"dataset_id": "<string>",
"name": "<string>",
"scope": "<string>",
"source": "<string>",
"row_count": 123,
"retained": true,
"created_at": "<string>",
"updated_at": "<string>"
}数据集
数据集详情
读取一个数据集的元信息。
GET
/
v1
/
datasets
/
{dataset_id}
数据集详情
curl --request GET \
--url https://api-datahub.bazhuayu.com/v1/datasets/{dataset_id}import requests
url = "https://api-datahub.bazhuayu.com/v1/datasets/{dataset_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api-datahub.bazhuayu.com/v1/datasets/{dataset_id}', 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/datasets/{dataset_id}', 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/datasets/{dataset_id}"
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/datasets/{dataset_id}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-datahub.bazhuayu.com/v1/datasets/{dataset_id}",
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/datasets/{dataset_id}")
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/datasets/{dataset_id}");
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/datasets/{dataset_id}")
.get()
.build()
val response = client.newCall(request).execute()false{
"dataset_id": "<string>",
"name": "<string>",
"scope": "<string>",
"source": "<string>",
"row_count": 123,
"retained": true,
"created_at": "<string>",
"updated_at": "<string>"
}端点
GET https://api-datahub.bazhuayu.com/v1/datasets/{dataset_id}
Authorization: Bearer <API Key>)。
数据集元信息。别人的数据集与不存在的数据集返回同样的 404。
请求
路径参数
string
必填
数据集标识。
示例请求
curl \
-H "Authorization: Bearer $BAZHUAYU_API_KEY" \
"https://api-datahub.bazhuayu.com/v1/datasets/ds_0bd5345d13d0"
响应
200 成功
{
"data": {
"dataset_id": "ds_0bd5345d13d0",
"name": "app_6dfe4e839ccf run output",
"scope": "private",
"source": "run",
"row_count": 20,
"retained": false,
"created_at": "2026-09-15T07:45:40.407451+00:00",
"updated_at": "2026-09-15T07:45:40.772143+00:00"
}
}
data 字段中,其内容如下。
string
必填
—
string
必填
—
string
—
string
—
integer
—
boolean
—
string
—
string
—
错误
| HTTP | code | category | 说明 |
|---|---|---|---|
| 401 | unauthorized | forbidden | 缺少或无效的 API Key。 |
| 404 | dataset-not-found | not_found | 数据集不存在、不属于当前账号,或是平台公共样例集(不可标记)。 |
{"error": {code, category, message, retryable}},见错误。
