Skip to main content
GET
/
llm-application
/
open
/
knowledge
/
{id}
知识库详情
curl --request GET \
  --url https://open.bigmodel.cn/api/llm-application/open/knowledge/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://open.bigmodel.cn/api/llm-application/open/knowledge/{id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://open.bigmodel.cn/api/llm-application/open/knowledge/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
HttpResponse<String> response = Unirest.get("https://open.bigmodel.cn/api/llm-application/open/knowledge/{id}")
.header("Authorization", "Bearer <token>")
.asString();
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://open.bigmodel.cn/api/llm-application/open/knowledge/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://open.bigmodel.cn/api/llm-application/open/knowledge/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
  "data": {
    "id": "<string>",
    "embedding_id": 123,
    "name": "<string>",
    "description": "<string>",
    "contextual": 123,
    "background": "<string>",
    "icon": "<string>",
    "document_size": 123,
    "length": 123,
    "word_num": 123
  },
  "code": 123,
  "message": "<string>",
  "timestamp": 123
}
{
"code": 123,
"message": "<string>"
}

Authorizations

Authorization
string
header
required

标准的 HTTP Bearer 认证方式,在 API Keys 页面获取密钥。

Path Parameters

id
string
required

知识库id

Response

业务处理成功

data
object
code
integer

响应码,200为成功

message
string

响应信息

timestamp
integer

响应时间戳