查询 Endpoint 详情
curl --request GET \
--url https://api.ppio.com/gpus/v2/endpoints/{endpoint_id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.ppio.com/gpus/v2/endpoints/{endpoint_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.ppio.com/gpus/v2/endpoints/{endpoint_id}', 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.ppio.com/gpus/v2/endpoints/{endpoint_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: <authorization>"
],
]);
$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.ppio.com/gpus/v2/endpoints/{endpoint_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.ppio.com/gpus/v2/endpoints/{endpoint_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/gpus/v2/endpoints/{endpoint_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "endpoint-id",
"type": "<string>",
"name": "example-endpoint",
"app_name": "example-app",
"status": {
"status": "running",
"error": "",
"message": ""
},
"url": "https://endpoint.example.com/endpoint-id",
"product_id": "<string>",
"worker_config": {
"min_replicas": 0,
"max_replicas": 2,
"idle_timeout": 300,
"max_concurrent_per_worker": 10,
"gpu_num": 1,
"rootfs_size_gb": 20,
"min_cuda_version": "12.4",
"request_timeout": 60
},
"policy": {
"type": "queue",
"value": 100
},
"image": "registry.example.com/namespace/image:tag",
"registry_auth_id": "registry-auth-id",
"entrypoint": "",
"command": "cargo run",
"volumes": [
{
"id": "storage-id",
"type": "network",
"mount_point": "/data"
}
],
"envs": [
{
"key": "ENV_NAME",
"value": "ENV_VALUE"
}
],
"ports": [
8080
],
"workers": [
{
"id": "worker-id",
"status": {
"status": "ready",
"error": "",
"message": ""
},
"log": "https://logs.example.com/worker-id",
"health": true,
"drain": false
}
],
"health_check": {
"path": "/healthz",
"port": 8080
},
"region_id": "region-id",
"member_id": "member-id",
"owner_id": "550e8400-e29b-41d4-a716-446655440000",
"created_at": 1710000000
}Endpoint
查询 Endpoint 详情
GET
/
gpus
/
v2
/
endpoints
/
{endpoint_id}
查询 Endpoint 详情
curl --request GET \
--url https://api.ppio.com/gpus/v2/endpoints/{endpoint_id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.ppio.com/gpus/v2/endpoints/{endpoint_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.ppio.com/gpus/v2/endpoints/{endpoint_id}', 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.ppio.com/gpus/v2/endpoints/{endpoint_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: <authorization>"
],
]);
$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.ppio.com/gpus/v2/endpoints/{endpoint_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.ppio.com/gpus/v2/endpoints/{endpoint_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/gpus/v2/endpoints/{endpoint_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "endpoint-id",
"type": "<string>",
"name": "example-endpoint",
"app_name": "example-app",
"status": {
"status": "running",
"error": "",
"message": ""
},
"url": "https://endpoint.example.com/endpoint-id",
"product_id": "<string>",
"worker_config": {
"min_replicas": 0,
"max_replicas": 2,
"idle_timeout": 300,
"max_concurrent_per_worker": 10,
"gpu_num": 1,
"rootfs_size_gb": 20,
"min_cuda_version": "12.4",
"request_timeout": 60
},
"policy": {
"type": "queue",
"value": 100
},
"image": "registry.example.com/namespace/image:tag",
"registry_auth_id": "registry-auth-id",
"entrypoint": "",
"command": "cargo run",
"volumes": [
{
"id": "storage-id",
"type": "network",
"mount_point": "/data"
}
],
"envs": [
{
"key": "ENV_NAME",
"value": "ENV_VALUE"
}
],
"ports": [
8080
],
"workers": [
{
"id": "worker-id",
"status": {
"status": "ready",
"error": "",
"message": ""
},
"log": "https://logs.example.com/worker-id",
"health": true,
"drain": false
}
],
"health_check": {
"path": "/healthz",
"port": 8080
},
"region_id": "region-id",
"member_id": "member-id",
"owner_id": "550e8400-e29b-41d4-a716-446655440000",
"created_at": 1710000000
}请求头
Bearer 身份验证格式,例如:Bearer {{API 密钥}}。
路径参数
Endpoint ID。字符串,长度限制:1-255 字符。
响应
200 - application/json
查询成功
Endpoint ID
示例:
"endpoint-id"
Endpoint 类型。可选值:sync、async
Endpoint 名称
示例:
"example-endpoint"
应用名称
示例:
"example-app"
Endpoint 状态信息
Show child attributes
Show child attributes
访问地址
示例:
"https://endpoint.example.com/endpoint-id"
Serverless 产品 ID
Worker 配置
示例:
{
"min_replicas": 0,
"max_replicas": 2,
"idle_timeout": 300,
"max_concurrent_per_worker": 10,
"gpu_num": 1,
"rootfs_size_gb": 20,
"min_cuda_version": "12.4",
"request_timeout": 60
}
策略配置
示例:
{ "type": "queue", "value": 100 }
镜像地址
示例:
"registry.example.com/namespace/image:tag"
镜像仓库认证 ID
示例:
"registry-auth-id"
容器 entrypoint
示例:
""
启动命令
示例:
"cargo run"
挂载卷列表
示例:
[
{
"id": "storage-id",
"type": "network",
"mount_point": "/data"
}
]
环境变量列表
示例:
[{ "key": "ENV_NAME", "value": "ENV_VALUE" }]
端口号列表
示例:
[8080]
Worker 列表
Show child attributes
Show child attributes
健康检查配置
示例:
{ "path": "/healthz", "port": 8080 }
区域 ID
示例:
"region-id"
成员 ID
示例:
"member-id"
所有者 ID
示例:
"550e8400-e29b-41d4-a716-446655440000"
创建时间。Unix 时间戳
示例:
1710000000
最后修改于 2026年6月26日
⌘I