检查凭据覆盖情况
curl --request POST \
--url https://api.moonshot.cn/v1/vaults/credentials/check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mcp_server_urls": [
"https://example.invalid/mcp"
]
}
'import requests
url = "https://api.moonshot.cn/v1/vaults/credentials/check"
payload = { "mcp_server_urls": ["https://example.invalid/mcp"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({mcp_server_urls: ['https://example.invalid/mcp']})
};
fetch('https://api.moonshot.cn/v1/vaults/credentials/check', 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.moonshot.cn/v1/vaults/credentials/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mcp_server_urls' => [
'https://example.invalid/mcp'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.moonshot.cn/v1/vaults/credentials/check"
payload := strings.NewReader("{\n \"mcp_server_urls\": [\n \"https://example.invalid/mcp\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.moonshot.cn/v1/vaults/credentials/check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mcp_server_urls\": [\n \"https://example.invalid/mcp\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonshot.cn/v1/vaults/credentials/check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mcp_server_urls\": [\n \"https://example.invalid/mcp\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"coverage": [
{
"mcp_server_url": "https://example.invalid/mcp",
"matching_vault_ids": [
"vlt_01h455vb4pex5vsknk084sn02q"
]
}
]
}{
"error": {
"type": "invalid_parameter_error",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_parameter_error",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_parameter_error",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_parameter_error",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}按请求顺序,报告每个请求的 MCP 服务器 URL 分别在哪些凭据库(Vault)中持有活跃凭据。
- 只有
mcp_oauth和static_bearer凭据计入覆盖。environment_variable凭据从不作为覆盖出现。 - 每个 URL 在匹配前会做规范化。规范化失败的 URL 不报任何匹配。
- 省略
vault_ids时,搜索调用方可见的所有凭据库(Vault)。
POST
/
v1
/
vaults
/
credentials
/
check
检查凭据覆盖情况
curl --request POST \
--url https://api.moonshot.cn/v1/vaults/credentials/check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mcp_server_urls": [
"https://example.invalid/mcp"
]
}
'import requests
url = "https://api.moonshot.cn/v1/vaults/credentials/check"
payload = { "mcp_server_urls": ["https://example.invalid/mcp"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({mcp_server_urls: ['https://example.invalid/mcp']})
};
fetch('https://api.moonshot.cn/v1/vaults/credentials/check', 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.moonshot.cn/v1/vaults/credentials/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mcp_server_urls' => [
'https://example.invalid/mcp'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.moonshot.cn/v1/vaults/credentials/check"
payload := strings.NewReader("{\n \"mcp_server_urls\": [\n \"https://example.invalid/mcp\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.moonshot.cn/v1/vaults/credentials/check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mcp_server_urls\": [\n \"https://example.invalid/mcp\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonshot.cn/v1/vaults/credentials/check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mcp_server_urls\": [\n \"https://example.invalid/mcp\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"coverage": [
{
"mcp_server_url": "https://example.invalid/mcp",
"matching_vault_ids": [
"vlt_01h455vb4pex5vsknk084sn02q"
]
}
]
}{
"error": {
"type": "invalid_parameter_error",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_parameter_error",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_parameter_error",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_parameter_error",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}请求体
application/json
响应
按请求顺序排列的覆盖结果。
每个请求 URL 的覆盖情况,按请求顺序排列。
每个请求 URL 的覆盖情况。
Show child attributes
Show child attributes
此页面对您有帮助吗?